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