[HarfBuzz] How to override Harfbuzz's freetype functions?

Tom Hacohen tom.hacohen at partner.samsung.com
Wed Feb 2 00:44:40 PST 2011


On Wed, 2011-02-02 at 07:04 +0000, Tom Hacohen wrote:
> I guess you should add docs that suggest people to use
> "hb_ft_get_font_funcs" (or whatever engine they are using) or something
> to set the base and then they should override.
> 
> Anyhow, thanks a lot, weird I missed it, because I did skimmed through
> the headers.

Hey again,

Typo fix: I meant "... did skim..".

Anyhow, I changed my code to make harfbuzz use my cache, and as
expected, I got a major speed up, thanks a lot!

Regarding the way implementing font functions is implemented: it's
actually pretty annoying :( you can't sanely override single functions
because for example freetype already uses user_data for something, so I
can't use anything else unless I wrap each and every function :| We
really could use an "internal user data" that will be used by the inner
layer because wrapping each function is not only annoying, but very
broken by design, because this means I have to assume the user_data
freetype uses doesn't change, which is an internal design, and not part
of the API.

Thanks a lot,
Tom.




More information about the HarfBuzz mailing list