From: Robert E. <r.e...@te...> - 2011-08-16 00:12:00
|
Hello, The following code will cause FTGL to crash: FTGLPolygonFont font("C:\\Windows\\Fonts\\Calibri.ttf"); font.FaceSize(12); if (font.Error() == 0) { font.Render("A"); } The issue is in FTPolygonGlyphImpl's constructor, specifically this code: if(ft_glyph_format_outline != glyph->format) { err = 0x14; // Invalid_Outline return; } For some TrueType fonts (such as Calibri) this check will succeed for certain sizes and fail for others. There are two problems here. The first is that the "vectoriser" member is not initialized to zero before this code runs, which is what causes the crash when it is dereferenced later on in the Render call. The second is that the error is not propagated up to the font object, so there is no way of checking for it from client code. It's easy enough to fix the first problem by initializing the vectoriser pointer in the constructor's initializer list. I am not sure of the best way to deal with the second issue, though. I'm also not sure what the current development status for FTGL is or the process for submitting a patch. Any help would be greatly appreciated. Thank you, Robert Engeln r.e...@te... This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you are NOT the intended recipient or the person responsible for delivering the e-mail to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying this e-mail is strictly prohibited. |