diff options
author | Khaled Hosny <khaled@aliftype.com> | 2022-09-04 20:39:22 +0200 |
---|---|---|
committer | خالد حسني <khaled@aliftype.com> | 2022-09-05 06:09:11 +0200 |
commit | ca7d6be2d64a48e61db7a1c614d6325151817f59 (patch) | |
tree | 437d23cc5944a8814a0c4bb739c8af420867f662 /vcl/inc/win | |
parent | 8f9638424f7f88c99ff16a8015ca343f3042b26d (diff) |
vcl: Consolidate PhysicalFontFace::GetFontCharMap()
All subclasses are doing the same thing in slightly different ways, so
move it to the base class that we can now access font tables there.
Also drop unused PhysicalFontFace::HasChar().
Change-Id: I77022b4dc3688de2788c18966f39f407a6abb730
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139340
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
Diffstat (limited to 'vcl/inc/win')
-rw-r--r-- | vcl/inc/win/salgdi.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 3f442614c3d3..0faedda67585 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -68,12 +68,9 @@ public: virtual sal_IntPtr GetFontId() const override; void SetFontId( sal_IntPtr nId ) { mnId = nId; } - bool HasChar( sal_uInt32 cChar ) const; - BYTE GetCharSet() const { return meWinCharSet; } BYTE GetPitchAndFamily() const { return mnPitchAndFamily; } - FontCharMapRef GetFontCharMap() const override; bool GetFontCapabilities(vcl::FontCapabilities&) const override; virtual hb_blob_t* GetHbTable(hb_tag_t nTag) const override; @@ -83,7 +80,6 @@ private: // some members that are initialized lazily when the font gets selected into a HDC mutable bool mbFontCapabilitiesRead; - mutable FontCharMapRef mxUnicodeMap; mutable vcl::FontCapabilities maFontCapabilities; BYTE meWinCharSet; @@ -92,7 +88,6 @@ private: bool mbAliasSymbolsLow; HFONT mhFont; - void ReadCmapTable() const; void GetFontCapabilities() const; }; @@ -414,19 +409,4 @@ void ImplGetLogFontFromFontSelect( const vcl::font::FontSelectPattern&, #define MAX_64KSALPOINTS ((((sal_uInt16)0xFFFF)-8)/sizeof(POINTS)) -// called extremely often from just one spot => inline -inline bool WinFontFace::HasChar( sal_uInt32 cChar ) const -{ - if( mxUnicodeMap->HasChar( cChar ) ) - return true; - // second chance to allow symbol aliasing - if( mbAliasSymbolsLow && ((cChar-0xF000) <= 0xFF) ) - cChar -= 0xF000; - else if( mbAliasSymbolsHigh && (cChar <= 0xFF) ) - cChar += 0xF000; - else - return false; - return mxUnicodeMap->HasChar( cChar ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |