[HarfBuzz] inputting text already containing some glpyhs

Eric Wasylishen ewasylishen at gmail.com
Thu Apr 21 13:51:32 PDT 2011


Hi,
I have a use case where I want to shape some text which might contain a mix of glyph indices and unicode characters. For example, a string like "hello <glyph 123> world". 

I get the feeling that just having strings like this is discouraged. There are, however, files in the wild that do this (e.g. Apple RTF files will sometime contain glyph indices).

What would you think about allowing a Harfbuzz user preparing their buffer to call hb_buffer_add_glyph with a mask to indicate that the glyph being inserted is already a glyph index?  It looks like the first few phases of hb_ot_shape_execute_internal, up to when hb_substitute_default is called, would have to check for this mask and ignore the glyph or treat it as some placeholder unicode character.

Cheers,
Eric

P.S. I'm looking at adding Harfbuzz support to GNUstep, which is where this problem comes up.


More information about the HarfBuzz mailing list