freetype-devel
[Top][All Lists]
Advanced

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

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


From: Werner LEMBERG
Subject: Re: [ft-devel] Loading empty bitmap fails?
Date: Mon, 07 Aug 2017 07:44:43 +0200 (CEST)

>> 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.

OK.

> 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.

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

OK.

> 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...


    Werner

reply via email to

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