<div dir="ltr"><div>Helps to get users of your library if you don’t act like everyone trying to learn it is already an expert on all the hidden intricacies of it.<br><br><br></div>P.S. <span style="font-family:monospace,monospace">font_get_ppem()</span> returns zero for every font. Maybe I am using it wrong but I wouldn’t know, I didn’t write the thing.<br><br><span style="font-family:monospace,monospace">hb_font = hb.font_create(hb_face)<br>hb.font_set_scale(hb_font, projection['fontsize'], projection['fontsize'])<br>hb.ot_font_set_funcs(hb_font)<br>print(hb.font_get_ppem(hb_font))<br><br>>>> (x_ppem=0, y_ppem=0)</span><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 28, 2016 at 7:01 PM, Behdad Esfahbod <span dir="ltr"><<a href="mailto:behdad@behdad.org" target="_blank">behdad@behdad.org</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"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Jun 28, 2016 at 6:56 PM, Kelvin Ma <span dir="ltr"><<a href="mailto:kelvinsthirteen@gmail.com" target="_blank">kelvinsthirteen@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 class="gmail_extra">No, i’m asking why harfbuzz has the concept of multiple fonts per face, if that concept is useless in practice.<br></div></blockquote><div><br></div></span><div>Helps if you ask without baking your own presumptions into the question.  hb_font_t exists to hold all "configuration" needed.  Adding that to hb_face_t would have made the face unusable from multiple threads.<br><br>Such configuration is mainly the scale, and indeed, many clients shape with one font all the time.  But there are other stuff.  ppem is the other one.  When "OpenType GX" variation fonts become a thing, the variation parameters will also be set on hb_font_t.<br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 28, 2016 at 6:54 PM, Behdad Esfahbod <span dir="ltr"><<a href="mailto:behdad@behdad.org" target="_blank">behdad@behdad.org</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">You can't have both.  Pick which you like.<br></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Tue, Jun 28, 2016 at 6:43 PM, Kelvin Ma <span dir="ltr"><<a href="mailto:kelvinsthirteen@gmail.com" target="_blank">kelvinsthirteen@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"><div>so that’s the only way huh…<br></div>doesn’t that kind of defeat the purpose of <span style="font-family:monospace,monospace">hb.font_create()</span> and having many scaled versions of the same font? You would only ever need one font of each face, scaled to the UPEM, if the fontsize was to be applied externally after shaping already occurred.<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 28, 2016 at 5:51 PM, Behdad Esfahbod <span dir="ltr"><<a href="mailto:behdad@behdad.org" target="_blank">behdad@behdad.org</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">HarfBuzz coordinates work in a int32 space.  You are free to set whatever scales you want on the font.  For example, use 6 or 8 or 10 or 16 bits of sub-pixel precision by multiplying your scale by a number.<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Jun 28, 2016 at 4:57 PM, Kelvin Ma <span dir="ltr"><<a href="mailto:kelvinsthirteen@gmail.com" target="_blank">kelvinsthirteen@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>It appears that harfbuzz rounds all decimals to integers when giving glyph advances and offsets. This is causing some ugly misalignment problems in arabic shaping, as well as latin cursive fonts. (see pictures)<br><br><img style="margin-right:25px" alt="Inline image 1" src="cid:ii_15598cb601163f5b"><br><br><img style="margin-right:25px" alt="Inline image 2" src="cid:ii_15598cb803731b37"><br><br><img style="margin-right:25px" alt="Inline image 3" src="cid:ii_15598cba08b0ea2b"><br></div>How do I get harfbuzz to preserve the floats?<br></div>
<br></div></div>_______________________________________________<br>
HarfBuzz mailing list<br>
<a href="mailto:HarfBuzz@lists.freedesktop.org" target="_blank">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></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br><div data-smartmail="gmail_signature">behdad<br><a href="http://behdad.org/" target="_blank">http://behdad.org/</a></div>
</font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br></div></div><span><font color="#888888">-- <br><div data-smartmail="gmail_signature">behdad<br><a href="http://behdad.org/" target="_blank">http://behdad.org/</a></div>
</font></span></div>
</blockquote></div><br></div><div><div>
</div></div></blockquote></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div data-smartmail="gmail_signature">behdad<br><a href="http://behdad.org/" target="_blank">http://behdad.org/</a></div>
</font></span></div></div>
</blockquote></div><br></div>