improve gtk layout debugging

This commit is contained in:
Vincent Sanders 2024-08-06 21:06:07 +01:00
parent 35a1f27a3f
commit 1c6232da6a

View File

@ -137,6 +137,10 @@ nsfont_position_in_string(const plot_font_style_t *fstyle,
*char_offset = index; *char_offset = index;
*actual_x = PANGO_PIXELS(pos.x); *actual_x = PANGO_PIXELS(pos.x);
NSLOG(netsurf, DEEPDEBUG,
"fstyle: %p string:\"%.*s\", length: %" PRIsizet ", "
"search_x: %dpx, offset: %" PRIsizet ", actual_x: %dpx",
fstyle, (int)length, string, length, x, *char_offset, *actual_x);
return NSERROR_OK; return NSERROR_OK;
} }
@ -210,6 +214,10 @@ nsfont_split(const plot_font_style_t *fstyle,
/* Obtain the pixel offset of the split character */ /* Obtain the pixel offset of the split character */
nsfont_width(fstyle, string, index, actual_x); nsfont_width(fstyle, string, index, actual_x);
NSLOG(netsurf, DEEPDEBUG,
"fstyle: %p string:\"%.*s\", length: %" PRIsizet ", "
"split_x: %dpx, offset: %" PRIsizet ", actual_x: %dpx",
fstyle, (int)length, string, length, x, *char_offset, *actual_x);
return NSERROR_OK; return NSERROR_OK;
} }