[mapserver-commits] r9020 - in trunk/mapserver: . renderers/agg/src
svn at osgeo.org
svn at osgeo.org
Fri May 15 13:39:49 EDT 2009
Author: tbonfort
Date: 2009-05-15 13:39:48 -0400 (Fri, 15 May 2009)
New Revision: 9020
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/renderers/agg/src/agg_font_freetype.cpp
Log:
Fix agg freetype character lookup when no unicode charmap is present (#3018)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2009-05-15 12:07:47 UTC (rev 9019)
+++ trunk/mapserver/HISTORY.TXT 2009-05-15 17:39:48 UTC (rev 9020)
@@ -13,6 +13,7 @@
Current Version (SVN trunk):
----------------------------
+- Fix agg freetype character lookup when no unicode charmap is present (#3018)
- Fork AGG rendering library in our trunk
Modified: trunk/mapserver/renderers/agg/src/agg_font_freetype.cpp
===================================================================
--- trunk/mapserver/renderers/agg/src/agg_font_freetype.cpp 2009-05-15 12:07:47 UTC (rev 9019)
+++ trunk/mapserver/renderers/agg/src/agg_font_freetype.cpp 2009-05-15 17:39:48 UTC (rev 9020)
@@ -663,6 +663,15 @@
m_cur_face = 0;
m_name = 0;
}
+ if( FT_Select_Charmap(m_cur_face, FT_ENCODING_UNICODE) ) {
+ if( FT_Select_Charmap(m_cur_face, FT_ENCODING_APPLE_ROMAN) ) {
+ m_char_map = FT_ENCODING_NONE;
+ } else {
+ m_char_map = FT_ENCODING_APPLE_ROMAN;
+ }
+ } else {
+ m_char_map = FT_ENCODING_UNICODE;
+ }
}
@@ -903,7 +912,7 @@
m_glyph_index = FT_Get_Char_Index(m_cur_face, glyph_code);
m_last_error = FT_Load_Glyph(m_cur_face,
m_glyph_index,
- m_hinting ? FT_LOAD_DEFAULT : FT_LOAD_NO_HINTING);
+ m_hinting ? FT_LOAD_DEFAULT|FT_LOAD_NO_BITMAP : FT_LOAD_NO_HINTING|FT_LOAD_NO_BITMAP);
// m_hinting ? FT_LOAD_FORCE_AUTOHINT : FT_LOAD_NO_HINTING);
if(m_last_error == 0)
{
More information about the mapserver-commits
mailing list