[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] Loading empty bitmap fails?

From: Behdad Esfahbod
Subject: Re: [ft-devel] Loading empty bitmap fails?
Date: Sun, 6 Aug 2017 23:03:40 -0700

On Sun, Aug 6, 2017 at 10:44 PM, Werner LEMBERG <address@hidden> wrote:

>> Mhmm.  I would like to have this formalized.  Let's have a closer
>> look at NotoColorEmoji.ttf.  The `cmap' table references glyph
>> index 3 for character code 0x20 (ttx calls this glyph `space').
>> GID 3 is also used in the `hmtx' and `vmtx' tables.  However, it is
>> missing in the `CBDT' table, and there is no `loca' table either.
>> So the basic question is `what defines GID 3'?  IMHO it is not
>> sufficient to have a `cmap' entry.  Maybe accept it only if there
>> is no `loca' table but an `hmtx' or `vmtx' entry?
> GID 3 exists because numGlyphs > 3.


> hmtx / vmtx is irrelevant.

???  How shall I map GID 3 to a space glyph if there isn't an advance
width or height?  Not returning an error for a glyph without any
metrics smells very fishy.

As it happens, hmtx / vmtx tables define advances for all glyphs.  There's no way to leave a glyph out.


> GID 3 is addressable because it's referenced by a cmap entry.


> GID 3 has no drawing, because no graphic table (glyf, CFF, CBDT,
> etc) provides any drawing for it.

Yes, of course.  I now see that I formulated my question in a
misleading way.  I should have asked

  What constraints should be there to make FreeType successfully map
  GID 3 to a space glyph (i.e., not returning an error)?

>> How do the Apple and MS rendering engines behave?
> Donno.  MS supports CBDT fonts.  I have not tested.  Don't have a
> Windows machine or access to one these days.

OK.  Since I don't see issue reports on github I assume that the font
works fine...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]