[Harfbuzz-indic] Fwd: hb-view and beyond
behdad at behdad.org
Tue Sep 20 11:28:25 PDT 2011
FYI. BTW, is it safe to assume that everyone on harfbuzz-indic is on harfbuzz
-------- Original Message --------
Subject: hb-view and beyond
Date: Tue, 20 Sep 2011 13:36:39 -0400
From: Behdad Esfahbod <behdad at behdad.org>
To: Harfbuzz <harfbuzz at lists.freedesktop.org>
Those paying attention may have noticed that hb-view got quite a lift:
- hb-view now has a full --help output and reworked options (major break was
changing --output to --output-file),
- hb-view can generate PDF, PS, EPS, and SVG now, assuming your cairo
- The --text-file and --font-file (or its implicit substitutes) can be "-"
for stdin. And both stdin and stdout functions work on Windows too (this was
a challenge to make work!)
- Of note, also, is the --shapers option. If you pass only one shaper to
--shapers and that shaper fails, hb-view will fail.
Note: There's still problems reading Unicode text from the command-line
arguments. You can use --text-file to work around that.
Moreover, there is now an hb-shape binary also, which outputs shape results in
a (cryptic) human-readable way. I plan to add more verbose formats as well as
JSON and XML too. But for now, this is how it looks like:
<uni0905=0+1602|uni092C=3+1228|uni0942=3 at 1,-174>
- Glyphs are separated using '|'
- The cluster value comes after '='
- If there's X or Y offset, they come after '@'
- If there is advance, they come after '+'. Maybe I should change this one
to '>' or something.
There are options to disable outputing the cluster value or the positions, or
use glyph indices instead of glyph names.
Finally, there is a Python program called hb-diff, which can compare the
output of hb-shape from two different backends and visualize the differences
colorfully. Give it a try!
So, as you can see, I'm much closer o having a measurable definition of Indic
correctness. Preliminary results look promising.
More information about the HarfBuzz-Indic