From: Braden M. <br...@us...> - 2006-09-22 01:04:51
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14883/src/libopenvrml/openvrml Modified Files: Tag: OpenVRML-0_16-BRANCH 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.108.2.4 retrieving revision 1.108.2.5 diff -C2 -d -r1.108.2.4 -r1.108.2.5 *** vrml97node.cpp 19 Sep 2006 20:18:13 -0000 1.108.2.4 --- vrml97node.cpp 22 Sep 2006 01:04:45 -0000 1.108.2.5 *************** *** 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 // *************** *** 23034,23040 **** const FT_Long face_index = 0; # else // Everybody else use fontconfig. - FcPattern * initialPattern = 0; - FcPattern * matchedPattern = 0; - using std::vector; --- 23034,23037 ---- *************** *** 23076,23085 **** 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); // --- 23073,23083 ---- 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); // *************** *** 23096,23104 **** 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; --- 23094,23104 ---- 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; *************** *** 23109,23113 **** if (result != FcResultMatch) { throw FontconfigError(result); } ! FT_Long face_index = 0; result = FcPatternGetInteger(matchedPattern, FC_INDEX, 0, &face_index); --- 23109,23113 ---- if (result != FcResultMatch) { throw FontconfigError(result); } ! int face_index = 0; result = FcPatternGetInteger(matchedPattern, FC_INDEX, 0, &face_index); *************** *** 23128,23132 **** FT_Error ftError = FT_Err_Ok; ftError = FT_New_Face(nodeClass.freeTypeLibrary, ! &ftFilename[0], face_index, &newFace); if (ftError) { throw FreeTypeError(ftError); } --- 23128,23133 ---- FT_Error ftError = FT_Err_Ok; ftError = FT_New_Face(nodeClass.freeTypeLibrary, ! &ftFilename[0], FT_Long(face_index), ! &newFace); if (ftError) { throw FreeTypeError(ftError); } *************** *** 23158,23162 **** const float stepSize_ = 0.2f; ! extern "C" int moveTo_(const FT_Vector * const to, void * const user) { using std::vector; --- 23159,23164 ---- const float stepSize_ = 0.2f; ! extern "C" int moveTo_(OPENVRML_FT_CONST FT_Vector * const to, ! void * const user) { using std::vector; *************** *** 23175,23179 **** } ! extern "C" int lineTo_(const FT_Vector * const to, void * const user) { assert(user); --- 23177,23182 ---- } ! extern "C" int lineTo_(OPENVRML_FT_CONST FT_Vector * const to, ! void * const user) { assert(user); *************** *** 23237,23242 **** } ! extern "C" int conicTo_(const FT_Vector * const control, ! const FT_Vector * const to, void * const user) { --- 23240,23245 ---- } ! extern "C" int conicTo_(OPENVRML_FT_CONST FT_Vector * const control, ! OPENVRML_FT_CONST FT_Vector * const to, void * const user) { *************** *** 23271,23277 **** } ! extern "C" int cubicTo_(const FT_Vector * const control1, ! const FT_Vector * const control2, ! const FT_Vector * const to, void * const user) { --- 23274,23280 ---- } ! 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) { |