<div dir="ltr">The rendering is separate from harfbuzz i thought, the glyphs get passed to cairo’s cr.show_glyphs() and it uses its own font structure that has to be loaded separately from harfbuzz’s fonts. So any value set on the harfbuzz font is not known by the renderer<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 28, 2016 at 7:48 PM, Khaled Hosny <span dir="ltr"><<a href="mailto:khaledhosny@eglug.org" target="_blank">khaledhosny@eglug.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For device tables (as I said in my first reply) and I think hinting<br>
(though I don’t think hinting stuff affects HarfBuzz right now).<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Jun 28, 2016 at 07:25:27PM -0400, Kelvin Ma wrote:<br>
> ok this might be a dumb question but what is ppem used for anyway? I<br>
> thought it was a font value that harfbuzz just lets you read off of the<br>
> font (like upem, advance width, or glyph index) so you can do your own math<br>
> on the font outside of harfbuzz.<br>
><br>
> On Tue, Jun 28, 2016 at 7:18 PM, Khaled Hosny <<a href="mailto:khaledhosny@eglug.org">khaledhosny@eglug.org</a>> wrote:<br>
><br>
> > It is, but you have to set it separately, and then you can set the font<br>
> > scale to whatever value you need without both being interdependent.<br>
> ><br>
> > On Tue, Jun 28, 2016 at 07:15:23PM -0400, Kelvin Ma wrote:<br>
> > > I thought ppem was dependent on UPEM and font scale, is it not?<br>
> > ><br>
> > > On Tue, Jun 28, 2016 at 7:12 PM, Khaled Hosny <<a href="mailto:khaledhosny@eglug.org">khaledhosny@eglug.org</a>><br>
> > wrote:<br>
> > ><br>
> > > > Device tables depend on ppem, so despite the scale being set<br>
> > > > on the font, you should still set the exact ppem.<br>
> > > ><br>
> > > > On Tue, Jun 28, 2016 at 06:43:58PM -0400, Kelvin Ma wrote:<br>
> > > > > so that’s the only way huh…<br>
> > > > > doesn’t that kind of defeat the purpose of hb.font_create() and<br>
> > having<br>
> > > > many<br>
> > > > > scaled versions of the same font? You would only ever need one font<br>
> > of<br>
> > > > each<br>
> > > > > face, scaled to the UPEM, if the fontsize was to be applied<br>
> > externally<br>
> > > > > after shaping already occurred.<br>
> > > > ><br>
> > > > > On Tue, Jun 28, 2016 at 5:51 PM, Behdad Esfahbod <<a href="mailto:behdad@behdad.org">behdad@behdad.org</a>><br>
> > > > wrote:<br>
> > > > ><br>
> > > > > > HarfBuzz coordinates work in a int32 space.  You are free to set<br>
> > > > whatever<br>
> > > > > > scales you want on the font.  For example, use 6 or 8 or 10 or 16<br>
> > bits<br>
> > > > of<br>
> > > > > > sub-pixel precision by multiplying your scale by a number.<br>
> > > > > ><br>
> > > > > > On Tue, Jun 28, 2016 at 4:57 PM, Kelvin Ma <<br>
> > <a href="mailto:kelvinsthirteen@gmail.com">kelvinsthirteen@gmail.com</a>><br>
> > > > > > wrote:<br>
> > > > > ><br>
> > > > > >> It appears that harfbuzz rounds all decimals to integers when<br>
> > giving<br>
> > > > > >> glyph advances and offsets. This is causing some ugly misalignment<br>
> > > > problems<br>
> > > > > >> in arabic shaping, as well as latin cursive fonts. (see pictures)<br>
> > > > > >><br>
> > > > > >> [image: Inline image 1]<br>
> > > > > >><br>
> > > > > >> [image: Inline image 2]<br>
> > > > > >><br>
> > > > > >> [image: Inline image 3]<br>
> > > > > >> How do I get harfbuzz to preserve the floats?<br>
> > > > > >><br>
> > > > > >> _______________________________________________<br>
> > > > > >> HarfBuzz mailing list<br>
> > > > > >> <a href="mailto:HarfBuzz@lists.freedesktop.org">HarfBuzz@lists.freedesktop.org</a><br>
> > > > > >> <a href="https://lists.freedesktop.org/mailman/listinfo/harfbuzz" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/harfbuzz</a><br>
> > > > > >><br>
> > > > > >><br>
> > > > > ><br>
> > > > > ><br>
> > > > > > --<br>
> > > > > > behdad<br>
> > > > > > <a href="http://behdad.org/" rel="noreferrer" target="_blank">http://behdad.org/</a><br>
> > > > > ><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > > _______________________________________________<br>
> > > > > HarfBuzz mailing list<br>
> > > > > <a href="mailto:HarfBuzz@lists.freedesktop.org">HarfBuzz@lists.freedesktop.org</a><br>
> > > > > <a href="https://lists.freedesktop.org/mailman/listinfo/harfbuzz" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/harfbuzz</a><br>
> > > ><br>
> > > ><br>
> ><br>
</div></div></blockquote></div><br></div>