projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29b596a
)
[ft] hb_ft_get_glyph_from_name fails for the name of glyph id 0
author
Behdad Esfahbod
<behdad@behdad.org>
Thu, 11 Jul 2013 18:56:45 +0000
(14:56 -0400)
committer
Behdad Esfahbod
<behdad@behdad.org>
Thu, 11 Jul 2013 18:56:45 +0000
(14:56 -0400)
Based on patch from Jonathan Kew, as reported on the mailing list.
src/hb-ft.cc
patch
|
blob
|
history
diff --git
a/src/hb-ft.cc
b/src/hb-ft.cc
index
d63eba2
..
a4f4bbd
100644
(file)
--- a/
src/hb-ft.cc
+++ b/
src/hb-ft.cc
@@
-260,6
+260,15
@@
hb_ft_get_glyph_from_name (hb_font_t *font HB_UNUSED,
*glyph = FT_Get_Name_Index (ft_face, buf);
}
+ if (*glyph == 0)
+ {
+ /* Check whether the given name was actually the name of glyph 0. */
+ char buf[128];
+ if (!FT_Get_Glyph_Name(ft_face, 0, buf, sizeof (buf)) &&
+ len < 0 ? !strcmp (buf, name) : !strncmp (buf, name, len))
+ return true;
+ }
+
return *glyph != 0;
}