Re: [HarfBuzz] [Feature Request] Custom allocator support

2015-10-05 Thread Jamie Dale
Just tested this and it worked fine. Thanks :) On 3 October 2015 at 13:20, Behdad Esfahbod wrote: > On 15-10-02 10:00 PM, Jamie Dale wrote: > > That's similar to what I originally had, so I'm fine with something like > that. > > My only question is, what would

Re: [HarfBuzz] No kerning?

2015-10-05 Thread Konstantin Ritt
Did you enable 'kern' feature? Something like that: const hb_feature_t features[1] = { { HB_TAG('k','e','r','n'), !!kerningEnabled, 0, uint(-1) } }; const int num_features = 1; bool shapedOk = hb_shape_full(hb_font, buffer,

Re: [HarfBuzz] No kerning?

2015-10-05 Thread Nikolay Sivov
On 05.10.2015 22:32, Jamie Dale wrote: The images below are using the Roboto font, and show the output from each implementation. The top image is using our "kerning only" implementation, and the bottom image is using HarfBuzz. Note that the "T" and "e" characters are further apart in the bottom

Re: [HarfBuzz] No kerning?

2015-10-05 Thread Jamie Dale
I wasn't aware such a thing existed. I've tried turning it on as per your example, however it doesn't seem to have made any difference. -Jamie. On 5 October 2015 at 20:45, Konstantin Ritt wrote: > Did you enable 'kern' feature? Something like that: > > const

Re: [HarfBuzz] No kerning?

2015-10-05 Thread Jamie Dale
I don't know what font data our "kerning only" implementation is using under the hood, but the kerning used when calculating the advance is from a call to FT_Get_Kerning with the FT_KERNING_DEFAULT flag. We only do this when FT_HAS_KERNING reports that the font has kerning data, and the remainder

Re: [HarfBuzz] No kerning?

2015-10-05 Thread Behdad Esfahbod
I'm not sure what's wrong. Can you send me the font file? Also, I'm interested to hear more about your caching and load-flags stuff. I like to upstream them to the extent that makes sense. behdad On 15-10-05 03:32 PM, Jamie Dale wrote: > Hey all, > > In our application we have two text

Re: [HarfBuzz] No kerning?

2015-10-05 Thread Behdad Esfahbod
The default is on, so that's irrelevant. On 15-10-05 04:07 PM, Jamie Dale wrote: > I wasn't aware such a thing existed. I've tried turning it on as per your > example, however it doesn't seem to have made any difference. > > -Jamie. > > On 5 October 2015 at 20:45, Konstantin Ritt

[HarfBuzz] No kerning?

2015-10-05 Thread Jamie Dale
Hey all, In our application we have two text shaping backends; a simple "kerning only" implementation using our existing font rendering code (fast, but can't handle complex languages), and a HarfBuzz based implementation for when we need to support complex languages (although ideally the HarfBuzz

Re: [HarfBuzz] No kerning?

2015-10-05 Thread Behdad Esfahbod
Thanks Jamie, For loadflags, would it be enough to add hb_ft_font_set_flags() that sets loadflags, and use that in all places? I'll go ahead and do that, since it's been long overdue. Re caching, do you have data you can share on which parts are the slowest, etc? Would you be willing to test a

Re: [HarfBuzz] No kerning?

2015-10-05 Thread Jamie Dale
hb_ft_font_set_flags sounds basically like what I'm already doing using user-data, so yeah, that sounds like it would be fine. I'll see if I can get you some stats (I can't remember off the top of my head), but I'd certainly be willing to help try out caching patches to hb-ft. The main reason we

Re: [HarfBuzz] No kerning?

2015-10-05 Thread Jamie Dale
Yeah, we actually use a slightly older version of the Roboto font. Here's what I get using the non-GPOS version: [image: Inline images 1] Things are a lot more squished than with our old code, but the "T" "e" part might actually be the same (it's kinda hard to tell though). -Jamie. On 5

Re: [HarfBuzz] rendering options for hb-view

2015-10-05 Thread Werner LEMBERG
> how can I locally enforce TrueType bytecode rendering for hb-view? > A command line option? An environment setting? I've looked up the code, and it seems that this is hard-coded in hb-view. Behdad, can you make this configurable? Maybe allowing the user to pass (some) FT_LOAD_XXX flags as a

Re: [HarfBuzz] No kerning?

2015-10-05 Thread Nikolay Sivov
On 05.10.2015 23:17, Jamie Dale wrote: I don't know what font data our "kerning only" implementation is using under the hood, but the kerning used when calculating the advance is from a call to FT_Get_Kerning with the FT_KERNING_DEFAULT flag. We only do this when FT_HAS_KERNING reports that the

Re: [HarfBuzz] rendering options for hb-view

2015-10-05 Thread Behdad Esfahbod
On 15-10-05 06:19 PM, Werner LEMBERG wrote: > >> how can I locally enforce TrueType bytecode rendering for hb-view? >> A command line option? An environment setting? > > I've looked up the code, and it seems that this is hard-coded in > hb-view. Behdad, can you make this configurable? Maybe

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-05 Thread Simon Cozens
On 03/10/2015 01:51, Behdad Esfahbod wrote: > So, how does that sound? I expect that it will only make easier for most > clients. Like to hear what Jonathan has to say. Chrome, Android, Pango, > XeTeX, Sile should all either benefit from this or be unaffected. This all sounds great but if it's