From: Braden M. <br...@us...> - 2006-09-22 01:06:09
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15587/src/libopenvrml/openvrml Modified Files: vrml97node.cpp Log Message: Clean up of breakage from Windows font support check-in. Index: vrml97node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/vrml97node.cpp,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** vrml97node.cpp 19 Sep 2006 20:18:31 -0000 1.113 --- vrml97node.cpp 22 Sep 2006 01:06:07 -0000 1.114 *************** *** 5,9 **** // Copyright 1998 Chris Morley // Copyright 1999 Kumaran Santhanam ! // Copyright 2001, 2002, 2003, 2004, 2005 Braden McDaniel // Copyright 2002 S. K. Bose // --- 5,9 ---- // Copyright 1998 Chris Morley // Copyright 1999 Kumaran Santhanam ! // Copyright 2001, 2002, 2003, 2004, 2005, 2006 Braden McDaniel // Copyright 2002 S. K. Bose // *************** *** 23035,23041 **** const FT_Long face_index = 0; # else // Everybody else use fontconfig. - FcPattern * initialPattern = 0; - FcPattern * matchedPattern = 0; - using std::vector; --- 23035,23038 ---- *************** *** 23077,23086 **** fontName += ":outline=True"; ! initialPattern = ! FcNameParse(FcChar8_string(fontName.begin(), ! fontName.end()).c_str()); if (!initialPattern) { throw std::bad_alloc(); } scope_guard initialPattern_guard = make_guard(&FcPatternDestroy, initialPattern); // --- 23074,23084 ---- fontName += ":outline=True"; ! FcPattern * const initialPattern = ! FcNameParse(unsigned_char_string(fontName.begin(), ! fontName.end()).c_str()); if (!initialPattern) { throw std::bad_alloc(); } scope_guard initialPattern_guard = make_guard(&FcPatternDestroy, initialPattern); + boost::ignore_unused_variable_warning(initialPattern_guard); // *************** *** 23097,23105 **** FcResult result = FcResultMatch; ! matchedPattern = FcFontMatch(0, initialPattern, &result); if (result != FcResultMatch) { throw FontconfigError(result); } scope_guard matchedPattern_guard = make_guard(&FcPatternDestroy, matchedPattern); ! assert(matchedPattern); FcChar8 * filename = 0; --- 23095,23105 ---- FcResult result = FcResultMatch; ! FcPattern * const matchedPattern = ! FcFontMatch(0, initialPattern, &result); if (result != FcResultMatch) { throw FontconfigError(result); } + assert(matchedPattern); scope_guard matchedPattern_guard = make_guard(&FcPatternDestroy, matchedPattern); ! boost::ignore_unused_variable_warning(matchedPattern_guard); FcChar8 * filename = 0; *************** *** 23110,23114 **** if (result != FcResultMatch) { throw FontconfigError(result); } ! FT_Long face_index = 0; result = FcPatternGetInteger(matchedPattern, FC_INDEX, 0, &face_index); --- 23110,23114 ---- if (result != FcResultMatch) { throw FontconfigError(result); } ! int face_index = 0; result = FcPatternGetInteger(matchedPattern, FC_INDEX, 0, &face_index); *************** *** 23129,23133 **** FT_Error ftError = FT_Err_Ok; ftError = FT_New_Face(nodeClass.freeTypeLibrary, ! &ftFilename[0], face_index, &newFace); if (ftError) { throw FreeTypeError(ftError); } --- 23129,23134 ---- FT_Error ftError = FT_Err_Ok; ftError = FT_New_Face(nodeClass.freeTypeLibrary, ! &ftFilename[0], FT_Long(face_index), ! &newFace); if (ftError) { throw FreeTypeError(ftError); } *************** *** 23159,23163 **** const float stepSize_ = 0.2f; ! extern "C" int moveTo_(const FT_Vector * const to, void * const user) { using std::vector; --- 23160,23165 ---- const float stepSize_ = 0.2f; ! extern "C" int moveTo_(OPENVRML_FT_CONST FT_Vector * const to, ! void * const user) { using std::vector; *************** *** 23176,23180 **** } ! extern "C" int lineTo_(const FT_Vector * const to, void * const user) { assert(user); --- 23178,23183 ---- } ! extern "C" int lineTo_(OPENVRML_FT_CONST FT_Vector * const to, ! void * const user) { assert(user); *************** *** 23239,23244 **** } ! extern "C" int conicTo_(const FT_Vector * const control, ! const FT_Vector * const to, void * const user) { --- 23242,23247 ---- } ! extern "C" int conicTo_(OPENVRML_FT_CONST FT_Vector * const control, ! OPENVRML_FT_CONST FT_Vector * const to, void * const user) { *************** *** 23273,23279 **** } ! extern "C" int cubicTo_(const FT_Vector * const control1, ! const FT_Vector * const control2, ! const FT_Vector * const to, void * const user) { --- 23276,23282 ---- } ! extern "C" int cubicTo_(OPENVRML_FT_CONST FT_Vector * const control1, ! OPENVRML_FT_CONST FT_Vector * const control2, ! OPENVRML_FT_CONST FT_Vector * const to, void * const user) { |