[HarfBuzz] hb_ft_get_glyph_from_name fails for the name of glyph id 0
behdad at behdad.org
Thu Jul 11 11:57:21 PDT 2013
Thanks. Pushed out a modified version.
On 13-07-11 02:50 PM, Jonathan Kew wrote:
> I've run into a small issue with hb_ft_get_glyph_from_name: when passed the
> name of glyph 0 (often, but not always, ".notdef"), although it will
> (correctly) find the glyph ID and set its glyph outparam appropriately, it
> will then return false (which normally indicates that a glyph with the given
> name was NOT found).
> This causes a problem when using hb_buffer_deserialize_glyphs if the buffer
> that was serialized included any instances of glyph 0, and the serialization
> used glyph names (rather than numeric IDs), as is the default behavior. In
> this case, deserialization stops when the .notdef glyph is encountered,
> resulting in a truncated buffer.
> As FT_Get_Name_Index doesn't seem to provide any direct means for a caller to
> distinguish the case of the .notdef glyph's name from an unknown glyph name, I
> suggest the attached patch. OK, so it's not pretty, but it should resolve the
More information about the HarfBuzz