freetype-devel
[Top][All Lists]
Advanced

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

Re: Bug: tt_check_single_notdef function skip spaces


From: Werner LEMBERG
Subject: Re: Bug: tt_check_single_notdef function skip spaces
Date: Tue, 15 Mar 2022 17:23:37 +0000 (UTC)

> I am attaching PDF with TrueType font, this font only has a space.
> The tt_check_single_notdef function ignores spaces, which removes
> the FT_FACE_FLAG_SCALABLE flag.  In the next steps we want to scale
> this font/empty glyph, but unfortunately we get the error that the
> font cannot be scaled (that's not true).  The tt_check_single_notdef
> function should be corrected so that it does not ignore spaces (a
> blank glyph is also a glyph).

This is tricky.  The font in the PDF is not a font that 'only has a
space'.  Quite on the contrary, it contains *a lot* of non-empty
glyphs, but not in the 'glyf' table but as embedded bitmap strikes
(via the 'EBDT' and 'EBLC' tables).

Having empty glyphs in the 'glyf' table and bitmap strikes are the
only way to create bitmap-only fonts that can be displayed on
Windows.[*] In other words, the font embedded in this PDF is *exactly*
how a bitmap-only font looks like.  FreeType must be able to handle
them.

What PDF output engine has created this font?  If it should contain
only spaces, why aren't the 'EBDT' and 'EBLC' tables stripped off?
Removing these two tables makes FreeType recognize the font as
scalable.

My gut feeling says that I'm not going to change FreeType for this.


    Werner



[*] There are some additional conditions to make embedded bitmaps
    display on recent Windows versions that use 'DirectWrite' as the
    rendering engine, but this is off-topic.



reply via email to

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