diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-11-16 20:48:50 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-11-19 14:05:29 +0200 |
commit | 5b5ab82dc881d3063f791bcb6192672f737f24c3 (patch) | |
tree | 45459807df1af1e22f531ccc51c82e9bef17f39f /vcl | |
parent | 0e6e0cea8fd5c02191f529b946c4df294072477f (diff) |
Add ImplFontMetricData::mbTrueTypeFont
Indicates that the font truly is a TrueType one (FT_IS_SFNT in
FreeType, TMPF_TRUETYPE in Win32).
Change-Id: Ic9dbf5e5239ae2ca597c454091fc36073a3b19cc
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/glyphs/gcach_ftyp.cxx | 3 | ||||
-rw-r--r-- | vcl/generic/print/genpspgraphics.cxx | 1 | ||||
-rw-r--r-- | vcl/inc/outfont.hxx | 1 | ||||
-rw-r--r-- | vcl/quartz/ctfonts.cxx | 1 | ||||
-rw-r--r-- | vcl/source/outdev/font.cxx | 1 | ||||
-rw-r--r-- | vcl/win/source/gdi/salgdi3.cxx | 1 |
6 files changed, 7 insertions, 1 deletions
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx index bef54776e6b8..2e874e51eccc 100644 --- a/vcl/generic/glyphs/gcach_ftyp.cxx +++ b/vcl/generic/glyphs/gcach_ftyp.cxx @@ -636,7 +636,8 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const { static_cast<ImplFontAttributes&>(rTo) = mpFontInfo->GetFontAttributes(); - rTo.mbScalableFont = true; + rTo.mbScalableFont = true; // FIXME: Shouldn't this check FT_IS_SCALABLE( maFaceFT )? + rTo.mbTrueTypeFont = FT_IS_SFNT( maFaceFT ) != 0; rTo.mbDevice = true; rTo.mbKernableFont = FT_HAS_KERNING( maFaceFT ) != 0; rTo.mnOrientation = GetFontSelData().mnOrientation; diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx index c0e214d51e51..f1f92020e7d0 100644 --- a/vcl/generic/print/genpspgraphics.cxx +++ b/vcl/generic/print/genpspgraphics.cxx @@ -923,6 +923,7 @@ void GenPspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int ) static_cast<ImplFontAttributes&>(*pMetric) = aDFA; pMetric->mbDevice = aDFA.mbDevice; pMetric->mbScalableFont = true; + pMetric->mbTrueTypeFont = false; // FIXME, needed? pMetric->mnOrientation = m_pPrinterGfx->GetFontAngle(); pMetric->mnSlant = 0; diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx index 9511f230c31e..8eef436fa757 100644 --- a/vcl/inc/outfont.hxx +++ b/vcl/inc/outfont.hxx @@ -173,6 +173,7 @@ public: // TODO: hide members behind accessor methods int meFamilyType; // Font Family Type bool mbDevice; // Flag for Device Fonts bool mbScalableFont; + bool mbTrueTypeFont; bool mbKernableFont; bool mbFullstopCentered; diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index 204261833989..a5882ca717d8 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -136,6 +136,7 @@ void CoreTextStyle::GetFontMetric( ImplFontMetricData& rMetric ) const // all CoreText fonts are scalable rMetric.mbScalableFont = true; + rMetric.mbTrueTypeFont = true; // Not sure, but this field is used only for Windows so far rMetric.mbKernableFont = true; } diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 3686d71ed76c..8f443ce5a252 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -1746,6 +1746,7 @@ ImplFontMetricData::ImplFontMetricData( const FontSelectPattern& rFontSelData ) , mnMinKashida( 0 ) , meFamilyType(FAMILY_DONTKNOW) , mbScalableFont(false) + , mbTrueTypeFont(false) , mbFullstopCentered(false) , mnUnderlineSize( 0 ) , mnUnderlineOffset( 0 ) diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index fbb3b872e6d8..94127996dba5 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -1596,6 +1596,7 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLe // device dependent font attributes pMetric->mbDevice = (aWinMetric.tmPitchAndFamily & TMPF_DEVICE) != 0; pMetric->mbScalableFont = (aWinMetric.tmPitchAndFamily & (TMPF_VECTOR|TMPF_TRUETYPE)) != 0; + pMetric->mbTrueTypeFont = (aWinMetric.tmPitchAndFamily & TMPF_TRUETYPE) != 0; if( pMetric->mbScalableFont ) { // check if there are kern pairs |