2025-08-27 14:38 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000623Spring engineGeneralpublic2007-09-03 21:02
Reporterpbrook 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000623: [patch] FIx error message for missing font
DescriptionThe FreeType init code doesn't use the correct return value when reporting errors. It always uses the result of the first call when printing the error.

If spring can't find its font file, it dies with:
  fonts/Luxi.ttf: FT_New_Face failed: no error
With the attached patch we get something more reasonable:
  fonts/Luxi.ttf: FT_New_Face failed: cannot open resource
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • ? file icon patch (586 bytes) 2007-09-03 03:33 -
    Index: rts/Rendering/glFont.cpp
    ===================================================================
    --- rts/Rendering/glFont.cpp	(revision 4296)
    +++ rts/Rendering/glFont.cpp	(working copy)
    @@ -49,7 +49,8 @@ CglFont::CglFont(int start, int end, con
     		throw std::runtime_error(msg);
     	}
     
    -	if (FT_New_Face(library, filesystem.LocateFile(fontfile).c_str(), 0, &face)) {
    +	error = FT_New_Face(library, filesystem.LocateFile(fontfile).c_str(), 0, &face);
    +	if (error) {
     		string msg = string(fontfile) + ": FT_New_Face failed: ";
     		msg += GetFTError(error);
     		throw content_error(msg);
    
    ? file icon patch (586 bytes) 2007-09-03 03:33 +

-Relationships
+Relationships

-Notes

~0001213

imbaczek (reporter)

committed in r4303, thanks.
+Notes

-Issue History
Date Modified Username Field Change
2007-09-03 02:40 pbrook New Issue
2007-09-03 03:33 pbrook File Added: patch
2007-09-03 21:02 imbaczek Status new => closed
2007-09-03 21:02 imbaczek Note Added: 0001213
2007-09-03 21:02 imbaczek Resolution open => fixed
+Issue History