diff options
author | navin <patidar@kacst.edu.sa> | 2013-01-06 16:18:00 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-01-07 10:19:47 +0000 |
commit | 1e1ba8611fb134fb693354daae8931e93e46124c (patch) | |
tree | 46b8c0a25110796ae621bb10e37e6b6697e292ac /vcl/generic/glyphs | |
parent | b40d74a4430d7c6e1def1720335b4e87aa07c803 (diff) |
Change public variables of class ImplFontAttributes to private.
Change-Id: I56ff5d7d2420c334c6fc9e4c552f8b5c4715d93f
Reviewed-on: https://gerrit.libreoffice.org/1551
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'vcl/generic/glyphs')
-rw-r--r-- | vcl/generic/glyphs/gcach_ftyp.cxx | 22 | ||||
-rw-r--r-- | vcl/generic/glyphs/glyphcache.cxx | 8 |
2 files changed, 15 insertions, 15 deletions
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx index d7e693bc8e0b..de44e3154abc 100644 --- a/vcl/generic/glyphs/gcach_ftyp.cxx +++ b/vcl/generic/glyphs/gcach_ftyp.cxx @@ -788,8 +788,8 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI ) mnLoadFlags |= FT_LOAD_IGNORE_TRANSFORM; #endif - mbArtItalic = (rFSD.meItalic != ITALIC_NONE && pFI->GetFontAttributes().GetSlant() == ITALIC_NONE); - mbArtBold = (rFSD.meWeight > WEIGHT_MEDIUM && pFI->GetFontAttributes().GetWeight() <= WEIGHT_MEDIUM); + mbArtItalic = (rFSD.GetSlant() != ITALIC_NONE && pFI->GetFontAttributes().GetSlant() == ITALIC_NONE); + mbArtBold = (rFSD.GetWeight() > WEIGHT_MEDIUM && pFI->GetFontAttributes().GetWeight() <= WEIGHT_MEDIUM); mbUseGamma = false; if( mbArtBold ) { @@ -934,7 +934,7 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const (rTo.GetFamilyName().EqualsAscii("StarSymbol")) ) { - rTo.mbSymbolFlag = true; + rTo.SetSymbolFlag( true ); } if( maSizeFT ) @@ -964,11 +964,11 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const // map the panose info from the OS2 table to their VCL counterparts switch( pOS2->panose[0] ) { - case 1: rTo.meFamily = FAMILY_ROMAN; break; - case 2: rTo.meFamily = FAMILY_SWISS; break; - case 3: rTo.meFamily = FAMILY_MODERN; break; - case 4: rTo.meFamily = FAMILY_SCRIPT; break; - case 5: rTo.meFamily = FAMILY_DECORATIVE; break; + case 1: rTo.SetFamilyType( FAMILY_ROMAN ); break; + case 2: rTo.SetFamilyType( FAMILY_SWISS ); break; + case 3: rTo.SetFamilyType( FAMILY_MODERN ); break; + case 4: rTo.SetFamilyType( FAMILY_SCRIPT ); break; + case 5: rTo.SetFamilyType( FAMILY_DECORATIVE ); break; // TODO: is it reasonable to override the attribute with DONTKNOW? case 0: // fall through default: rTo.meFamilyType = FAMILY_DONTKNOW; break; @@ -982,12 +982,12 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const case 5: // fall through case 6: // fall through case 7: // fall through - case 8: rTo.mePitch = PITCH_VARIABLE; break; - case 9: rTo.mePitch = PITCH_FIXED; break; + case 8: rTo.SetPitch( PITCH_VARIABLE ); break; + case 9: rTo.SetPitch( PITCH_FIXED ); break; // TODO: is it reasonable to override the attribute with DONTKNOW? case 0: // fall through case 1: // fall through - default: rTo.mePitch = PITCH_DONTKNOW; break; + default: rTo.SetPitch( PITCH_DONTKNOW ); break; } const double fScale = (double)GetFontSelData().mnHeight / maFaceFT->units_per_EM; diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx index deef6be55659..79a2d7a421fd 100644 --- a/vcl/generic/glyphs/glyphcache.cxx +++ b/vcl/generic/glyphs/glyphcache.cxx @@ -97,8 +97,8 @@ size_t GlyphCache::IFSD_Hash::operator()( const FontSelectPattern& rFontSelData nHash += rFontSelData.mnHeight; nHash += rFontSelData.mnOrientation; nHash += rFontSelData.mbVertical; - nHash += rFontSelData.meItalic; - nHash += rFontSelData.meWeight; + nHash += rFontSelData.GetSlant(); + nHash += rFontSelData.GetWeight(); #ifdef ENABLE_GRAPHITE nHash += rFontSelData.meLanguage; #endif @@ -122,8 +122,8 @@ bool GlyphCache::IFSD_Equal::operator()( const FontSelectPattern& rA, const Font || (rA.mbNonAntialiased != rB.mbNonAntialiased) ) return false; - if( (rA.meItalic != rB.meItalic) - || (rA.meWeight != rB.meWeight) ) + if( (rA.GetSlant() != rB.GetSlant()) + || (rA.GetWeight() != rB.GetWeight()) ) return false; // NOTE: ignoring meFamily deliberately |