Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update shape_with_trace to new logging messages #88

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions hbjs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ static hb_bool_t do_trace (hb_buffer_t *buffer,
unsigned int consumed;
unsigned int num_glyphs = hb_buffer_get_length (buffer);

if (strcmp(message, "start table GSUB") == 0) {
if (strncmp(message, "start table GSUB", 16) == 0) {
user_data->current_phase = HB_SHAPE_GSUB_PHASE;
} else if (strcmp(message, "start table GPOS") == 0) {
} else if (strncmp(message, "start table GPOS", 16) == 0) {
user_data->current_phase = HB_SHAPE_GPOS_PHASE;
}

Expand All @@ -170,10 +170,10 @@ static hb_bool_t do_trace (hb_buffer_t *buffer,
if (user_data->stop_phase != HB_SHAPE_DONT_STOP) {
// Do we need to start stopping?
char buf[12];
snprintf (buf, 12, "%d", user_data->stop_at);
snprintf (buf, 12, "%d ", user_data->stop_at);
if ((user_data->current_phase == user_data->stop_phase) &&
(strncmp(message, "end lookup ", 11) == 0) &&
(strcmp(message + 11, buf) == 0)) {
(strncmp(message + 11, buf, strlen(buf)) == 0)) {
user_data->stopping = true;
}
}
Expand Down