I've just grabbed a version with the new flags API, but I'm finding that I can't actually use hb_ft_font_get_load_flags and hb_ft_font_get_face in my custom funcs, as they fail the font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy test since I'm using a sub-font with a different destroy function.
Usually I'd work around this by adding my own functions to access those flags from the private data, however hb_ft_font_t is defined in a source file (rather than a private header), so I can't access it at all. Is there another way I can solve this? Should I just set and get the flags and face from the parent font instead? For your reference, this is how I create my font: hb_font_t* HarfBuzzFont = nullptr; { // Create a sub-font from the default FreeType implementation so we can override some font functions to provide low-level caching hb_font_t* HarfBuzzFTFont = hb_ft_font_create(FreeTypeFace, nullptr); HarfBuzzFont = hb_font_create_sub_font(HarfBuzzFTFont); hb_font_destroy(HarfBuzzFTFont); } hb_ft_font_set_load_flags(...); hb_font_set_funcs(...); hb_font_set_user_data(...); hb_font_set_scale(...); On 8 October 2015 at 16:41, Werner LEMBERG <w...@gnu.org> wrote: > > > Ok, so I've patched hb-ft to allow setting load_flags. Here's a > > branch: > > > > > https://github.com/behdad/harfbuzz/commit/ce981bdc6f58f390af4bee575500ffc45a877ab6 > > Thanks! Do you already have a patch for hb-view? > > > However, now I see that you are mostly asking about rendering > > options... > > Right now, I want to be able to make hb-view use the TrueType bytecode > engine. But I agree that controlling the rendering process itself > would be very helpful, too. > > > That needs some more work. > > I presume that you are talking about the FreeType backend, right? > Most interesting would be to have a possibility to select the > rendering options on MS Windows, e.g., selecting ClearType... > > > Werner > _______________________________________________ > HarfBuzz mailing list > HarfBuzz@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/harfbuzz >
_______________________________________________ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz