Page MenuHomePhabricator

imlib2: imlib_get_text_size() and imlib_text_draw_with_return_metrics() return different width
Closed, ResolvedPublic


This is Debian bug reported by Robert Smeikal.
Not sure if this is the intended behavior of imlib2.

imlib_get_text_size(..) and imlib_text_draw_with_return_metrics(..) return different width when the text to be drawn contains
characters with code points not supported by the current font. i used utf-8 encoded text with 2-byte characters (cyrillic), i.e.
code point 0x0439, corresponding bytes d0b9. when a font is loaded with support for the code points, the two functions return the
same width, otherwise imlib_text_draw_with_return_metrics(..) returns the correct value, whereas imlib_get_text_size(..) returns a
small number (e.g. 17) which seems to be uncorrelated with the text.

apoleon created this task.Mar 7 2018, 6:43 AM
apoleon triaged this task as Normal priority.
kwo added a project: Restricted Project.Mar 10 2018, 12:22 PM