After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 328585 - Need to know if a layout has unknown glyphs
Need to know if a layout has unknown glyphs
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2006-01-25 14:13 UTC by Behdad Esfahbod
Modified: 2007-01-16 20:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
get counts of unknown glyphs in a layout (1.77 KB, patch)
2006-02-13 07:02 UTC, LingNing Zhang
committed Details | Review

Description Behdad Esfahbod 2006-01-25 14:13:04 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.
Comment 1 Behdad Esfahbod 2006-01-29 01:57:34 UTC

*** This bug has been marked as a duplicate of 326693 ***
Comment 2 LingNing Zhang 2006-02-13 07:02:59 UTC
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.
:)
Comment 3 Behdad Esfahbod 2006-02-13 07:34:59 UTC
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.
Comment 4 Behdad Esfahbod 2007-01-16 20:05:24 UTC
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.