From b16044bbd1125607534c5f99d9c22f79ee6cd76b Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 24 Jan 2007 01:56:14 +0000 Subject: [PATCH] build on windows, older version of freetype --- panda/src/text/dynamicTextFont.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/panda/src/text/dynamicTextFont.cxx b/panda/src/text/dynamicTextFont.cxx index 05d61a006e..e531334310 100644 --- a/panda/src/text/dynamicTextFont.cxx +++ b/panda/src/text/dynamicTextFont.cxx @@ -22,11 +22,13 @@ #undef interface // I don't know where this symbol is defined, but it interferes with FreeType. #include FT_OUTLINE_H -#include FT_STROKER_H #include FT_BBOX_H #ifdef FT_BITMAP_H #include FT_BITMAP_H #endif +#ifdef FT_STROKER_H +#include FT_STROKER_H +#endif #include "config_text.h" #include "config_util.h" @@ -398,11 +400,17 @@ make_glyph(int character, int glyph_index) { if (wo == WO_default) { // If we weren't told an explicit winding order, ask FreeType to // figure it out. Sometimes it appears to guess wrong. +#ifdef FT_ORIENTATION_FILL_RIGHT if (FT_Outline_Get_Orientation(&slot->outline) == FT_ORIENTATION_FILL_RIGHT) { wo = WO_right; } else { wo = WO_left; } +#else + // Hmm. Assign a right-winding (TTF) orientation if FreeType + // can't tell us. + wo = WO_right; +#endif // FT_ORIENTATION_FILL_RIGHT } if (wo != WO_left) { @@ -430,7 +438,7 @@ make_glyph(int character, int glyph_index) { // Render the glyph if necessary. if (slot->format != ft_glyph_format_bitmap) { - FT_Render_Glyph(slot, FT_RENDER_MODE_NORMAL); + FT_Render_Glyph(slot, ft_render_mode_normal); } if (bitmap.width == 0 || bitmap.rows == 0) {