diff options
author | Herbert Duerr <hdu@openoffice.org> | 2002-10-29 12:13:28 +0000 |
---|---|---|
committer | Herbert Duerr <hdu@openoffice.org> | 2002-10-29 12:13:28 +0000 |
commit | 4e7e4e2f1c7aad41f951a606353aa45745601631 (patch) | |
tree | 6e90942ccc9dc090094f83aa277dc632014c4449 /vcl/source/glyphs | |
parent | 9295737074d43177681c866d4002a8e6d9f06eec (diff) |
#102193# allow non-unicode apple-roman fonts
Diffstat (limited to 'vcl/source/glyphs')
-rw-r--r-- | vcl/source/glyphs/gcach_ftyp.cxx | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx index 43dadaf04476..3e2bb05a24fd 100644 --- a/vcl/source/glyphs/gcach_ftyp.cxx +++ b/vcl/source/glyphs/gcach_ftyp.cxx @@ -2,8 +2,8 @@ * * $RCSfile: gcach_ftyp.cxx,v $ * - * $Revision: 1.79 $ - * last change: $Author: hdu $ $Date: 2002-10-17 07:02:10 $ + * $Revision: 1.80 $ + * last change: $Author: hdu $ $Date: 2002-10-29 13:13:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -508,7 +508,7 @@ FreetypeServerFont::FreetypeServerFont( const ImplFontSelectData& rFSD, FtFontIn for( int i = maFaceFT->num_charmaps; --i >= 0; ) { const FT_CharMap aCM = maFaceFT->charmaps[i]; - if( aCM->platform_id == TT_PLATFORM_MICROSOFT) + if( aCM->platform_id == TT_PLATFORM_MICROSOFT ) { switch( aCM->encoding_id ) { @@ -534,6 +534,17 @@ FreetypeServerFont::FreetypeServerFont( const ImplFontSelectData& rFSD, FtFontIn break; } } + else if( aCM->platform_id == TT_PLATFORM_MACINTOSH ) + { + switch( aCM->encoding_id ) + { + case TT_MAC_ID_ROMAN: // better unicode than nothing + eEncoding = ft_encoding_apple_roman; + break; + // TODO: add other encodings when Mac-only non-unicode + // fonts show up + } + } } if( FT_Err_Ok != FT_Select_Charmap( maFaceFT, eEncoding ) ) @@ -542,7 +553,8 @@ FreetypeServerFont::FreetypeServerFont( const ImplFontSelectData& rFSD, FtFontIn return; } - maRecodeConverter = rtl_createUnicodeToTextConverter( eRecodeFrom ); + if( eRecodeFrom != RTL_TEXTENCODING_UNICODE ) + maRecodeConverter = rtl_createUnicodeToTextConverter( eRecodeFrom ); } mnWidth = rFSD.mnWidth; |