diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-01-18 23:37:04 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Cenoz <jtx@jtx.marker.es> | 2013-01-18 23:37:04 +0000 |
| commit | 686ddfefd34634a2d3ccacee4c5d243bbe47629f (patch) | |
| tree | ec9fd88a0acc73cfadb5668becdc2dba7b98e50d /src/libnrtype | |
| parent | Delete bspline node whith node tool and fix 1 segment continue shift error (diff) | |
| parent | Some Corrections (diff) | |
| download | inkscape-686ddfefd34634a2d3ccacee4c5d243bbe47629f.tar.gz inkscape-686ddfefd34634a2d3ccacee4c5d243bbe47629f.zip | |
Merge from branch
(bzr r11950.1.18)
Diffstat (limited to 'src/libnrtype')
| -rw-r--r-- | src/libnrtype/FontFactory.cpp | 12 | ||||
| -rw-r--r-- | src/libnrtype/FontInstance.cpp | 7 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp index ed1e1dc5c..98904a47a 100644 --- a/src/libnrtype/FontFactory.cpp +++ b/src/libnrtype/FontFactory.cpp @@ -315,9 +315,15 @@ font_factory::font_factory(void) : { #ifdef USE_PANGO_WIN32 #else - pango_ft2_font_map_set_resolution((PangoFT2FontMap*)fontServer, 72, 72); - fontContext = pango_ft2_font_map_create_context((PangoFT2FontMap*)fontServer); - pango_ft2_font_map_set_default_substitute((PangoFT2FontMap*)fontServer,FactorySubstituteFunc,this,NULL); + pango_ft2_font_map_set_resolution(PANGO_FT2_FONT_MAP(fontServer), + 72, 72); + + fontContext = pango_font_map_create_context(fontServer); + + pango_ft2_font_map_set_default_substitute(PANGO_FT2_FONT_MAP(fontServer), + FactorySubstituteFunc, + this, + NULL); #endif } diff --git a/src/libnrtype/FontInstance.cpp b/src/libnrtype/FontInstance.cpp index 4ca8bf2a0..f26b157da 100644 --- a/src/libnrtype/FontInstance.cpp +++ b/src/libnrtype/FontInstance.cpp @@ -399,7 +399,7 @@ void font_instance::InitTheFace() SetGraphicsMode(daddy->hScreenDC, GM_COMPATIBLE); SelectObject(daddy->hScreenDC,theFace); #else - theFace=pango_ft2_font_get_face(pFont); // Deprecated, use pango_fc_font_lock_face() instead + theFace=pango_fc_font_lock_face(PANGO_FC_FONT(pFont)); if ( theFace ) { FT_Select_Charmap(theFace,ft_encoding_unicode) && FT_Select_Charmap(theFace,ft_encoding_symbol); } @@ -411,6 +411,8 @@ void font_instance::FreeTheFace() #ifdef USE_PANGO_WIN32 SelectObject(daddy->hScreenDC,GetStockObject(SYSTEM_FONT)); pango_win32_font_cache_unload(daddy->pangoFontCache,theFace); +#else + pango_fc_font_unlock_face(PANGO_FC_FONT(pFont)); #endif theFace=NULL; } @@ -454,12 +456,13 @@ int font_instance::MapUnicodeChar(gunichar c) #ifdef USE_PANGO_WIN32 res = pango_win32_font_get_glyph_index(pFont, c); #else - theFace = pango_ft2_font_get_face(pFont); + theFace = pango_fc_font_lock_face(PANGO_FC_FONT(pFont)); if ( c > 0xf0000 ) { res = CLAMP(c, 0xf0000, 0x1fffff) - 0xf0000; } else { res = FT_Get_Char_Index(theFace, c); } + pango_fc_font_unlock_face(PANGO_FC_FONT(pFont)); #endif } return res; |
