[HarfBuzz] Questions about interacting with HarfBuzz

Lóránt Pintér lorant.pinter at prezi.com
Wed Oct 10 08:48:15 PDT 2012


Hi Behdad and Grigori, 

Thanks for all the answers.

> > I finally managed to get OT layouting with HarfBuzz to work in JavaScript via
> > Emscripten. It's awesome! :) There are still some open questions though. Can
> 
> 
> Fantastic! Got any demos?
I've attached a small sample of what my thing produces (it's called from Flash here---I know, I know, it's a bit overcomplicated. :). Sources I can't show for now, but will try to do so ASAP.

> > * *How should I find out if a glyph returned by hb_shape() is a ligature?*
> Now, having the cluster, and the number of cursor positions in the cluster,
> you can go ahead and decide where to draw the cursor. If the ligature-carets
> are available, you can try using them. Otherwise, just divide the width of
> the cluster evenly by the number of the cursor positions.

For some reason I didn't find hb_ot_layout_get_ligature_carets() previously. That will solve all my problems, thanks. Thanks for the hint, Grigori.

> > * *Can HarfBuzz handle the Apple "kern," "morx" etc. tables?* If not, is
> > it safe to use FontForge to convert these fonts to use OpenType's
> > GPOS/GSUB etc.? This is not very
> > encouraging: http://fontforge.org/gposgsub.html
> 
> 
> No 'morx'. And as you noted, the conversion is not straightforward.
I see. So, no Zapfino then?

On a more serious note, is support for "morx" planned? Is the lack of support due to some fundamental incompatibility with HarfBuzz architecture, or is it because nobody did the work yet? In case of the latter, would you accept contributions if my company made this? (Not sure if we really would, but I'm interested in the possibilities.)
 
> > * *Which features are turned on by default?* I can see that ligatures and
> > kerning are turned on for my simple Latin text, and I can successfully
> > turn them off by supplying features "-kern" and "-liga," but I'm still
> > curious what the defaults are.
> > 
> 
> See hb-ot-shape.cc (http://hb-ot-shape.cc).

Got it, thanks. 

> > * *When kerning is applied, I get funny x_advances.* This might be an
> > error on my side, but currently when a pair of glyphs is kerned, the
> > first character get's an x_advance that seems to have something like
> > "42949017" subtracted from it. Because ligature substitution works
> > perfectly, I assume GSUB table parsing works fine, so I don't see why
> > GPOS would fail. Any pointers here?
> > 
> 
> 
> Can't help without seeing the code / font. Did you try the code in C first BTW?
> 

Not yet, but I will, and report back with my findings.


Thanks again,
Lorant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20121010/475ff169/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2012-10-10 at 5.36.47 PM.png
Type: image/png
Size: 94510 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20121010/475ff169/attachment.png>


More information about the HarfBuzz mailing list