On Wed, Dec 12, 2012 at 11:40:40AM -0500, Behdad Esfahbod wrote: > On 12-11-14 05:32 PM, Khaled Hosny wrote: > > we > > also use some private API to read MATH table on our own, so if HarfBuzz > > provided an API to read MATH table that would help greatly. > > What kind of API do you currently have? Just want to get a feel of what's > needed.
Rather than what we have, I was thinking of something along the following lines: hb_math_get_constant (font, constant) hb_math_get_glyph_italic_correction (font, gid) hb_math_get_glyph_top_accent_attachment (font, gid) hb_math_get_glyph_kern (font, gid, side, height) hb_math_get_glyph_horizontal_variant (font, gid, width, good_fit) hb_math_get_glyph_vertical_variant (font, gid, height, good_fit) ‘good_fit’ is set to false if the returned glyph is the largest variant available but smaller than the requested size, so that the user calls the next functions. hb_math_get_glyph_horizontal_assembly (font, width, size) hb_math_get_glyph_vertical_assembly (font, height, size) Returns a positioned array of glyphs that fits in the requested size. May be it can combined with the above functions returning an array of length one for the case a single good fit variant was found. Those are the parts of the MATH table we currently use, there is also Murray Sargent blog post which describes the API they have: http://blogs.msdn.com/b/murrays/archive/2010/01/12/special-capabilities-of-a-math-font.aspx Regards, Khaled _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
