From 1189199942f8f836a7d0f1d6c447ae1336712b92 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Wed, 30 Mar 2005 08:10:25 +0000 Subject: INTEGRATION: CWS vcl38 (1.14.104); FILE MERGED 2005/03/16 08:50:06 hdu 1.14.104.1: #i42190# allow symbol aliasing in winfont coverage --- vcl/win/inc/salgdi.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'vcl') diff --git a/vcl/win/inc/salgdi.h b/vcl/win/inc/salgdi.h index 00d8dc080e98..a92ff88acd2d 100644 --- a/vcl/win/inc/salgdi.h +++ b/vcl/win/inc/salgdi.h @@ -2,9 +2,9 @@ * * $RCSfile: salgdi.h,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: hr $ $Date: 2004-11-26 16:15:28 $ + * last change: $Author: rt $ $Date: 2005-03-30 09:10:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -109,7 +109,8 @@ public: virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const; void UpdateFromHDC( HDC ); - bool HasChar( sal_Unicode c ) const { return mpUnicodeMap->HasChar(c); } + bool HasChar( sal_uInt32 cChar ) const; + WIN_BYTE GetCharSet() const { return meWinCharSet; } WIN_BYTE GetPitchAndFamily() const { return mnPitchAndFamily; } bool IsGlyphApiDisabled() const { return mbDisableGlyphApi; } @@ -389,4 +390,17 @@ inline bool ImplCmpKernData( const KERNINGPAIR& a, const KERNINGPAIR& b ) return (a.wSecond < b.wSecond); } +// called extremely often from just one spot => inline +inline bool ImplWinFontData::HasChar( sal_uInt32 cChar ) const +{ + if( mpUnicodeMap->HasChar( cChar ) ) + return true; + // second chance to allow symbol aliasing + if( mbAliasSymbolsLow && ((cChar-0xF000) <= 0xFF) ) + cChar -= 0xF000; + else if( mbAliasSymbolsHigh && (cChar <= 0xFF) ) + cChar += 0xF000; + return mpUnicodeMap->HasChar( cChar ); +} + #endif // _SV_SALGDI_H -- cgit