[HarfBuzz] HarfBuzz 1.0 API; the message you were hoping would never come
Jonathan Kew
jfkthame at googlemail.com
Fri Jan 3 04:20:48 PST 2014
On 3/1/14 11:28, James Clark wrote:
> On Fri, Jan 3, 2014 at 5:07 PM, Jonathan Kew <jfkthame at googlemail.com
> <mailto:jfkthame at googlemail.com>> wrote:
>
>
> In order to do fallback,
> you need to do character to glyph mapping.
>
>
> Not necessarily. You need to know the character repertoire supported
> by the font, but you may not need to actually map to glyphs. In
> Firefox, for instance, font fallback is done based on a per-font
> *bit* map of supported Unicode codepoints. So at the font fallback
> stage, we know whether the character is present, but do not map it
> to a glyph.
>
>
> Isn't this introducing an additional step that's not strictly necessary?
> Presumably the bitmap is constructed from the font's cmap (unless you
> use the OS/2 ulUnicodeCodeRange*, which wouldn't be 100% accurate).
Yes, it's constructed from the cmap; but it allows us to maintain
internally-cached character coverage data for all the available fonts
(often hundreds or even thousands of them) in a -much- more compact form
than keeping whole cmap tables around.
(Somewhat OT: In the context of a web browser, there's also the CSS
@font-face unicode-range descriptor to consider [though it's not yet
supported in FF]: we may not actually want to use a given font resource
for all the characters that its cmap covers. Treating character coverage
for font-matching purposes as something distinct from actual cmap tables
may be helpful here.)
But obviously, this isn't the only possible approach.
JK
More information about the HarfBuzz
mailing list