GNOME Bugzilla – Bug 328585
Need to know if a layout has unknown glyphs
Last modified: 2007-01-16 20:05:24 UTC
In dasher, we need to know whether a PangoLayout had a character that it could not render. A similar call API for the low-level Pango interface would be useful too.
*** This bug has been marked as a duplicate of 326693 ***
Created attachment 59235 [details] [review] get counts of unknown glyphs in a layout I add a new function about int pango_layout_get_unknown_glyphs(). The return value is the counts of unknown glyphs in a layout. If the return value is 0, then there is not unknown glyph in a layout. I have a question, do we only need to know whether a PangoLayout had a character that it could not render? And it is not important and not necessary for knowing the counts of unkown glyphs in a layout? If it is not important and not necessary, then I will modify the code of pango_layout_get_unknown_glyphs() for efficiency. The type of return value will be changed to gboolean. :)
Thanks. The patch looks generally good to me. I would name it pango_layout_get_unknown_glyphs_count though. As for returning an int or a boolean, int should be fine, compared to how heavy laying out the layout already is. We may want to cache this number in the layout though. But we can live without it for now.
Reworked and committed. 2007-01-16 Behdad Esfahbod <behdad@gnome.org> Bug 328585 – Need to know if a layout has unknown glyphs Patch from LingNing Zhang * pango/pango-layout-private.h: * pango/pango-layout.c (pango_layout_init), (pango_layout_copy), (pango_layout_get_unknown_glyphs_count), (pango_layout_clear_lines): * pango/pango-layout.h: New public function: pango_layout_get_unknown_glyphs_count() * pango/pango.def: * docs/tmpl/layout.sgml: * docs/pango-sections.txt: Update.