<div dir="ltr"><div>Yeah, we actually use a slightly older version of the Roboto font.</div><div><br></div>Here's what I get using the non-GPOS version:<div><br></div><div><img src="cid:ii_15039f844a64e656" alt="Inline images 1" width="120" height="20"><br></div><div><br></div><div>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).</div><div><br></div><div>-Jamie.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 5 October 2015 at 22:27, Behdad Esfahbod <span dir="ltr"><<a href="mailto:behdad.esfahbod@gmail.com" target="_blank">behdad.esfahbod@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The version of the font from Jamie *does* have a kern table.<br>
<br>
HB is kerning just fine:<br>
<br>
behdad:~ 0$ hb-shape Roboto-Regular.ttf Test<br>
[T=0+1126|e=1+1072|s=2+1071|t=3+690]<br>
behdad:~ 0$ hb-shape Roboto-Regular.ttf Test --features=-kern<br>
[T=0+1225|e=1+1072|s=2+1071|t=3+690]<br>
<br>
If I drop the GPOS table from font, HB will use the kern table, which produces<br>
slightly different kerning:<br>
<br>
$ hb-shape Roboto-Regular#1.ttf Test<br>
[T=0+1175|e=1@-49,0+1023|s=2+1071|t=3+690]<br>
<br>
but this one is kerned *less*.<br>
<br>
I have no idea why you get such different results.<br>
<br>
Attaching the font without GPOS table for you to test.<br>
<br>
b<br>
<div><div class="h5"><br>
On 15-10-05 04:54 PM, Nikolay Sivov wrote:<br>
> On 05.10.2015 23:17, Jamie Dale wrote:<br>
>> I don't know what font data our "kerning only" implementation is using<br>
>> under the hood, but the kerning used when calculating the advance is<br>
>> from a call to FT_Get_Kerning with the FT_KERNING_DEFAULT flag. We only<br>
>> do this when FT_HAS_KERNING reports that the font has kerning data, and<br>
>> the remainder of the advance comes from the advance.x value on the<br>
>> FT_GlyphSlot for the glyph, such that:<br>
>><br>
>> TotalAdvance = Kerning + GlyphSlotAdvanceX;<br>
><br>
> If that's the case it sounds like HB variant actually the one that gives you<br>
> kerned advances, and not FT_Get_Kerning one, because freetype kerning is based<br>
> on glyph pairs data from 'kern' table, and like I said this font doesn't have it.<br>
><br>
> I think you could try ftstring demo program from freetype-demos, to see if<br>
> switching kerning on and off makes any difference. You can also visually<br>
> compare output.<br>
><br>
>><br>
>> -Jamie.<br>
>><br>
>> On 5 October 2015 at 20:49, Nikolay Sivov <<a href="mailto:bunglehead@gmail.com">bunglehead@gmail.com</a><br>
>> <mailto:<a href="mailto:bunglehead@gmail.com">bunglehead@gmail.com</a>>> wrote:<br>
>><br>
>>     On 05.10.2015 22:32, Jamie Dale wrote:<br>
>><br>
>><br>
>>         The images below are using the Roboto font, and show the output from<br>
>>         each implementation.<br>
>>         The top image is using our "kerning only" implementation, and<br>
>>         the bottom<br>
>>         image is using HarfBuzz. Note that the "T" and "e" characters are<br>
>>         further apart in the bottom image.<br>
>><br>
>><br>
>>     Roboto-Regular.ttf from <a href="https://github.com/google/roboto" rel="noreferrer" target="_blank">https://github.com/google/roboto</a> doesn't<br>
>>     have 'kern' table, so the only way to enable kerning for it is to<br>
>>     use GPOS kern feature.<br>
>><br>
>>     What does your "kerning only" implementation do? It only applies<br>
>>     this GPOS feature skipping the rest of shaping/positioning stuff?<br>
>><br>
>>     _______________________________________________<br>
>>     HarfBuzz mailing list<br>
>>     <a href="mailto:HarfBuzz@lists.freedesktop.org">HarfBuzz@lists.freedesktop.org</a> <mailto:<a href="mailto:HarfBuzz@lists.freedesktop.org">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>
>><br>
>><br>
><br>
> _______________________________________________<br>
> HarfBuzz mailing list<br>
> <a href="mailto:HarfBuzz@lists.freedesktop.org">HarfBuzz@lists.freedesktop.org</a><br>
</div></div>> <a href="http://lists.freedesktop.org/mailman/listinfo/harfbuzz" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/harfbuzz</a><br>
</blockquote></div><br></div>