freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] Incremental truetype fonts


From: Jon Anderson
Subject: [ft-devel] Incremental truetype fonts
Date: Thu, 05 Feb 2015 11:10:38 -0700
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi,

My name is Jon Anderson, I work for Websupergoo.  We use your Freetype package to parse and render fonts (thank you it's a wonderful package).

I recently ran into an issue, we use Freetype in our Postscript Interpreter and postscript supports incremental fonts.  There is a line of code that fails for incremental truetype fonts (ttload.c line 1433)

   if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
    {
      error = FT_THROW( Invalid_Glyph_Index );
      goto Exit;
    }

For incremental fonts, the glyph index may be greater than the number of glyphs indicated, so I just surrounded this code block as such:

#ifndef FT_CONFIG_OPTION_INCREMENTAL
    if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
    {
      error = FT_THROW( Invalid_Glyph_Index );
      goto Exit;
    }
#endif

This change seems to have fixed my problem.  I am hoping that you will get this change or something similar into your next build of Freetype so we are not using patched versions.

Thank you again for this wonderful software.

Best Wishes,
Jon

reply via email to

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