freetype-devel
[Top][All Lists]
Advanced

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

Re: permissiveness in FreeType for CFF fonts


From: Claudiu Milea
Subject: Re: permissiveness in FreeType for CFF fonts
Date: Thu, 23 Mar 2023 23:32:04 +0000

Hi Alexei and Werner,

 

In this case the unitsPerEm member is set to 1000 later in the cff_face_init function :

 

if ( !dict->has_font_matrix )

        dict->units_per_em = pure_cff ? 1000 : face->root.units_per_EM;

 

Then the bbox values are extracted from cff->top_font.font_dict , and I don’t see anything being used from the head table.

 

I will try to get approval for sharing the font(s).

Regarding the access to the repo, the fork button doesn’t seem to be enabled here https://gitlab.freedesktop.org/freetype/freetype , I did click on the request access button.

 

Thanks

 

 

 

 

From: Alexei Podtelezhnikov <apodtele@gmail.com>
Date: Thursday, March 23, 2023 at 7:41 AM
To: Werner LEMBERG <wl@gnu.org>
Cc: Claudiu Milea <cmilea@adobe.com>, freetype-devel@nongnu.org <freetype-devel@nongnu.org>
Subject: Re: permissiveness in FreeType for CFF fonts

EXTERNAL: Use caution when clicking on links or opening attachments.


>> We encountered a few (potentially not fully compliant with the
>> specification) CFF fonts (i.e. CIDFontType0) that have enough
>> information to be rendered, but FreeType throws an exception due to
>> not having both the `head` and the `cmap` tables.
>
> Could you provide such a font for testing purposes?
>
>> I was wondering if the second `goto Exit;` in the following code
>> could be changed to just logging a warning?
>
> Probably yes.  I guess we didn't have a font that needs it otherwise.

I just wonder about scaling in this scenario. Do we ever rely on unitsPerEm from head for CFF? Do we need anything else there?

Alexei


reply via email to

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