Mon 27 Jan 2014 11:50:02 AM UTC, original submission:
I'm getting an FT_ASSERT failure in cf2_getPpemY, exclusively when running debug mode and loading a specific OpenType font which I created using FontForge. A release-mode build encounters no error.
Specifically, this ASSERT line (cf2ft.c:392) is tripped:
FT_ASSERT( decoder->builder.face->root.size->metrics.y_ppem );
Investigating the data, it looks like the entire "metrics" structure is zeroes.
The crash occurs upon loading the first character of the font: a space, at glyph index 1. This character has no contours.
For simplicity (and because I'm terribly bashful about my typographical experiments!) I deleted all glyphs save for the space from the font and produced a variant called "FreeType-ErrorCase.otf"; testing this yielded precisely the same behavior.
I'm using FreeType 2.5.2, with Visual Studio 2010 Express, under Windows 7 x64, with the 32-bit static multithreaded runtime.
Below is the relevant part of the backtrace:
#0 0042E028 Plaid_dbg!cf2_getPpemY+0x39 (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\cff\cf2ft.c:392)
#1 0042E060 Plaid_dbg!cf2_font_setup+0x62 (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\cff\cf2font.c:256)
#2 0042E094 Plaid_dbg!cf2_getGlyphOutline+0x53 (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\cff\cf2font.c:440)
#3 0042E130 Plaid_dbg!cf2_decoder_parse_charstrings+0x2b2 (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\cff\cf2ft.c:364)
#4 0042E618 Plaid_dbg!cff_slot_load+0x6cd (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\cff\cffgload.c:2842)
#5 0042E63C Plaid_dbg!cff_glyph_load+0xc6 (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\cff\cffdrivr.c:185)
#6 0042E698 Plaid_dbg!FT_Load_Glyph+0x2ca (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\base\ftobjs.c:729)
#7 0042E7E4 Plaid_dbg!plaid::FontCodec_FreeType::decode+0x366 (c:\creations\plaidgadget\dev\src\codec-freetype\fontcodec_freetype.cpp:191)
|