Kaydet (Commit) 5b5ab82d authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Add ImplFontMetricData::mbTrueTypeFont

Indicates that the font truly is a TrueType one (FT_IS_SFNT in
FreeType, TMPF_TRUETYPE in Win32).

Change-Id: Ic9dbf5e5239ae2ca597c454091fc36073a3b19cc
üst 0e6e0cea
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -1746,6 +1746,7 @@ ImplFontMetricData::ImplFontMetricData( const FontSelectPattern& rFontSelData )
, mnMinKashida( 0 )
, meFamilyType(FAMILY_DONTKNOW)
, mbScalableFont(false)
, mbTrueTypeFont(false)
, mbFullstopCentered(false)
, mnUnderlineSize( 0 )
, mnUnderlineOffset( 0 )
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment