freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] Load font with incorrect header


From: Chenchen Zhou
Subject: [ft-devel] Load font with incorrect header
Date: Mon, 5 Oct 2015 14:26:58 +0800

Hi All,

Recently I have come across some fonts which cannot be loaded by FreeType v2.6.

The issue happens on line 1038 of sfobjs.c. The header.Units_Per_EM is 0 and the program raises an exception. This issue existed on a home-made font "HwzSong.ttf" and open-source font “DejaVuSans.ttf”. Please let me know if I missed anything.
 
if ( face->header.Units_Per_EM == 0 )
    {
      error = FT_THROW( Invalid_Table );

      goto Exit;
    }

My dev environment is Windows 7 (64-bit) and VS 2013 (64-bit). 

I am still trying to debug the problem, but my knowledge of FreeType and font format internals is being stretched. Any insight would be appreciated.

Best Regards,

Chenchen

Attachment: DejaVuSans.ttf
Description: Binary data

Description: DejaVuSans.ttf - Open Source TrueType font


Attachment: HwzSong.ttf
Description: Binary data

Description: HwzSong.ttf - Customized STSong TrueType font



reply via email to

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