[HarfBuzz] hb-view

Behdad Esfahbod behdad at behdad.org
Tue Mar 1 20:24:43 PST 2011


On 02/27/11 10:18, Khaled Hosny wrote:
> It is not usable for RTL currently (at least the ability to force
> direction even in absence of fribidi would to the job).

Forcing direction is the easy part.  We also need forcing script or
autodetecting it before Arabic would work.

Currently we don't have a way to parse a string into a hb_script_t.  I still
have an open design question re whether we should get away from a enum-based
hb_script_t and move to a ISO 15924 tag-based hb_script_t.  If we do that,
parsing from strings would be trivial.

A compromise would be a parsing string that handles the defined enum values,
and uses a tag for unknown values.  Something like:

hb_script_t
hb_script_from_string (const char *s)
{
  if (strcmp (s, "Arab"))
    return HB_SCRIPT_ARABIC;
  if (strcmp (s, "Latn"))
    return HB_SCRIPT_LATIN;
  ...

  return hb_tag_from_string (s);
}


> The ability to
> select font features (including switching off default ones) would be
> very handy for font testing and debugging.

Indeed.  I'll add that as we go forward.

Thanks,
behdad



More information about the HarfBuzz mailing list