[Libreoffice-commits] core.git: vcl/generic vcl/inc vcl/quartz vcl/source vcl/unx vcl/win

Chris Sherlock chris.sherlock79 at gmail.com
Thu Dec 31 03:12:31 PST 2015


 vcl/generic/glyphs/gcach_ftyp.cxx       |    8 ++--
 vcl/generic/print/genpspgraphics.cxx    |   34 ++++++++------------
 vcl/inc/outfont.hxx                     |   48 ++++++++++++++++++++++++-----
 vcl/quartz/ctfonts.cxx                  |   10 +++---
 vcl/quartz/salgdi.cxx                   |    4 +-
 vcl/source/font/PhysicalFontFace.cxx    |    2 -
 vcl/source/font/PhysicalFontFamily.cxx  |   14 ++++----
 vcl/source/gdi/pdfwriter_impl.cxx       |   18 +++++------
 vcl/source/outdev/font.cxx              |    4 +-
 vcl/unx/generic/gdi/cairotextrender.cxx |    2 -
 vcl/win/gdi/salgdi3.cxx                 |   52 ++++++++++++++++----------------
 11 files changed, 110 insertions(+), 86 deletions(-)

New commits:
commit a74a04f98180edc577d31598bc88990d41ef02c7
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Thu Dec 31 14:30:49 2015 +1100

    vcl: create accessor functions for ImplDevFontAttributes
    
    Change-Id: I0494a1db1a1e5c164bd5da2d0a221a8db6c494d6
    Reviewed-on: https://gerrit.libreoffice.org/21016
    Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
    Tested-by: Chris Sherlock <chris.sherlock79 at gmail.com>

diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index 36b967f..e9a0c9e 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -209,9 +209,9 @@ FtFontInfo::FtFontInfo( const ImplDevFontAttributes& rDevFontAttributes,
     mpGlyph2Char( nullptr )
 {
     // prefer font with low ID
-    maDevFontAttributes.mnQuality += 10000 - nFontId;
+    maDevFontAttributes.IncreaseQualityBy( 10000 - nFontId );
     // prefer font with matching file names
-    maDevFontAttributes.mnQuality += mpFontFile->GetLangBoost();
+    maDevFontAttributes.IncreaseQualityBy( mpFontFile->GetLangBoost() );
 }
 
 FtFontInfo::~FtFontInfo()
@@ -423,8 +423,8 @@ ImplFTSFontData::ImplFTSFontData( FtFontInfo* pFI, const ImplDevFontAttributes&
 :   PhysicalFontFace( rDFA, IFTSFONT_MAGIC ),
     mpFtFontInfo( pFI )
 {
-    mbDevice        = false;
-    mbOrientation   = true;
+    SetBuiltInFontFlag( false );
+    SetOrientationFlag( true );
 }
 
 ImplFontEntry* ImplFTSFontData::CreateFontInstance( FontSelectPattern& rFSD ) const
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index 149f687..ea55bf9 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -878,7 +878,7 @@ bool GenPspGraphics::AddTempDevFontHelper( PhysicalFontCollection* pFontCollecti
 
         // inform glyph cache of new font
         ImplDevFontAttributes aDFA = GenPspGraphics::Info2DevFontAttributes( aInfo );
-        aDFA.mnQuality += 5800;
+        aDFA.IncreaseQualityBy( 5800 );
 
         int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID );
 
@@ -921,7 +921,7 @@ void GenPspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int )
     {
         ImplDevFontAttributes aDFA = Info2DevFontAttributes( aInfo );
         static_cast<ImplFontAttributes&>(*pMetric) = aDFA;
-        pMetric->mbDevice       = aDFA.mbDevice;
+        pMetric->mbDevice       = aDFA.IsBuiltInFont();
         pMetric->mbScalableFont = true;
         pMetric->mbTrueTypeFont = false; // FIXME, needed?
 
@@ -1093,40 +1093,34 @@ ImplDevFontAttributes GenPspGraphics::Info2DevFontAttributes( const psp::FastPri
     aDFA.SetWidthType( rInfo.m_eWidth );
     aDFA.SetPitch( rInfo.m_ePitch );
     aDFA.SetSymbolFlag( (rInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL) );
-    aDFA.mbSubsettable  = rInfo.m_bSubsettable;
-    aDFA.mbEmbeddable   = rInfo.m_bEmbeddable;
+    aDFA.SetSubsettableFlag( rInfo.m_bSubsettable );
+    aDFA.SetEmbeddableFlag( rInfo.m_bEmbeddable );
 
     switch( rInfo.m_eType )
     {
         case psp::fonttype::TrueType:
-            aDFA.mnQuality       = 512;
-            aDFA.mbDevice        = false;
+            aDFA.SetQuality( 512 );
+            aDFA.SetBuiltInFontFlag( false );
             break;
         case psp::fonttype::Type1:
-            aDFA.mnQuality       = 0;
-            aDFA.mbDevice        = false;
+            aDFA.SetQuality( 0 );
+            aDFA.SetBuiltInFontFlag( false );
             break;
         default:
-            aDFA.mnQuality       = 0;
-            aDFA.mbDevice        = false;
+            aDFA.SetQuality( 0 );
+            aDFA.SetBuiltInFontFlag( false );
             break;
     }
 
-    aDFA.mbOrientation   = true;
+    aDFA.SetOrientationFlag( true );
 
     // add font family name aliases
     ::std::list< OUString >::const_iterator it = rInfo.m_aAliases.begin();
-    bool bHasMapNames = false;
     for(; it != rInfo.m_aAliases.end(); ++it )
-    {
-        if( bHasMapNames )
-            aDFA.maMapNames += ";";
-        aDFA.maMapNames += *it;
-        bHasMapNames = true;
-    }
+        aDFA.AddMapName( *it );
 
 #if OSL_DEBUG_LEVEL > 2
-    if( bHasMapNames )
+    if( aDFA.HasMapNames() )
     {
         OString aOrigName(OUStringToOString(aDFA.GetFamilyName(), osl_getThreadTextEncoding()));
         OString aAliasNames(OUStringToOString(aDFA.GetAliasNames(), osl_getThreadTextEncoding()));
@@ -1186,7 +1180,7 @@ void GenPspGraphics::AnnounceFonts( PhysicalFontCollection* pFontCollection, con
     }
 
     ImplPspFontData* pFD = new ImplPspFontData( aInfo );
-    pFD->mnQuality += nQuality;
+    pFD->IncreaseQualityBy( nQuality );
     pFontCollection->Add( pFD );
 }
 
diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx
index 00245ff..88d5d94 100644
--- a/vcl/inc/outfont.hxx
+++ b/vcl/inc/outfont.hxx
@@ -82,16 +82,46 @@ private:
 class ImplDevFontAttributes : public ImplFontAttributes
 {
 public:
-    bool               IsEmbeddable() const      { return mbEmbeddable; }
-    bool               IsSubsettable() const     { return mbSubsettable; }
+    int                 GetQuality() const      { return mnQuality; }
+    OUString            GetMapNames() const     { return maMapNames; }
+
+    bool                IsBuiltInFont() const   { return mbDevice; }
+    bool                CanEmbed() const        { return mbEmbeddable; }
+    bool                CanSubset() const       { return mbSubsettable; }
+    bool                CanRotate() const       { return mbOrientation; }
+    bool                HasMapNames() const     { return (maMapNames.getLength() > 0); }
+
+    void                SetQuality( int nQuality )                  { mnQuality = nQuality; }
+    void                IncreaseQualityBy( int nQualityAmount )     { mnQuality += nQualityAmount; }
+    void                DecreaseQualityBy( int nQualityAmount )     { mnQuality -= nQualityAmount; }
+    void                SetMapNames( OUString aMapNames )           { maMapNames = aMapNames; }
+    void                AddMapName( OUString aMapName )
+                            {
+                                if( maMapNames.getLength() > 0 )
+                                {
+                                    maMapNames += ";";
+                                }
+                                else
+                                {
+                                    SAL_WARN("vcl.fonts", "New map name is empty");
+                                    return;
+                                }
+
+                                maMapNames += aMapName;
+                            }
+
+    void                SetBuiltInFontFlag( bool bIsBuiltInFont )   { mbDevice = bIsBuiltInFont; }
+    void                SetEmbeddableFlag ( bool bEmbeddable )      { mbEmbeddable = bEmbeddable; }
+    void                SetSubsettableFlag( bool bSubsettable )     { mbSubsettable = bSubsettable; }
+    void                SetOrientationFlag( bool bCanRotate )       { mbOrientation = bCanRotate; }
 
-public: // TODO: hide members behind accessor methods
-    OUString           maMapNames;       // List of family name aliases separated with ';'
-    int                mnQuality;        // Quality (used when similar fonts compete)
-    bool               mbOrientation;    // true: physical font can be rotated
-    bool               mbDevice;         // true: built in font
-    bool               mbSubsettable;    // true: a subset of the font can be created
-    bool               mbEmbeddable;     // true: the font can be embedded
+private:
+    OUString            maMapNames;       // List of family name aliases separated with ';'
+    int                 mnQuality;        // Quality (used when similar fonts compete)
+    bool                mbOrientation;    // true: physical font can be rotated
+    bool                mbDevice;         // true: built in font
+    bool                mbSubsettable;    // true: a subset of the font can be created
+    bool                mbEmbeddable;     // true: the font can be embedded
 };
 
 class FontSelectPatternAttributes : public ImplFontAttributes
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index a5882ca..1b7fe09 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -277,9 +277,9 @@ ImplDevFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool
 {
     // all CoreText fonts are device fonts that can rotate just fine
     ImplDevFontAttributes rDFA;
-    rDFA.mbOrientation = true;
-    rDFA.mbDevice = true;
-    rDFA.mnQuality = 0;
+    rDFA.SetOrientationFlag( true );
+    rDFA.SetBuiltInFontFlag( true );
+    rDFA.SetQuality( 0 );
 
     // reset the font attributes
     rDFA.SetFamilyType( FAMILY_DONTKNOW );
@@ -290,8 +290,8 @@ ImplDevFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool
     rDFA.SetSymbolFlag( false );
 
     // all scalable fonts on this platform are subsettable
-    rDFA.mbEmbeddable = false;
-    rDFA.mbSubsettable = true;
+    rDFA.SetEmbeddableFlag( false );
+    rDFA.SetSubsettableFlag( true );
 
     // get font name
 #ifdef MACOSX
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index 32bbb4f..f8b9fbf 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -694,9 +694,9 @@ void AquaSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFontData, bool bV
     rGlyphWidths.clear();
     rUnicodeEnc.clear();
 
-    if( !pFontData->IsSubsettable() )
+    if( !pFontData->CanSubset() )
     {
-        if( pFontData->IsEmbeddable() )
+        if( pFontData->CanEmbed() )
         {
             // get individual character widths
             OSL_FAIL("not implemented for non-subsettable fonts!\n");
diff --git a/vcl/source/font/PhysicalFontFace.cxx b/vcl/source/font/PhysicalFontFace.cxx
index d263cf8..f306e4b 100644
--- a/vcl/source/font/PhysicalFontFace.cxx
+++ b/vcl/source/font/PhysicalFontFace.cxx
@@ -158,7 +158,7 @@ bool PhysicalFontFace::IsBetterMatch( const FontSelectPattern& rFSD, FontMatchSt
             nMatch += 600;
     }
 
-    if( mbDevice )
+    if( IsBuiltInFont() )
         nMatch += 1;
 
     int nHeightMatch = 0;
diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx
index 50ab10e..8cc691b 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -116,10 +116,10 @@ bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* pNewFontFace )
     if( maFontFaces.empty() )
     {
         maFamilyName   = pNewFontFace->GetFamilyName();
-        maMapNames     = pNewFontFace->maMapNames;
+        maMapNames     = pNewFontFace->GetMapNames();
         meFamily       = pNewFontFace->GetFamilyType();
         mePitch        = pNewFontFace->GetPitch();
-        mnMinQuality   = pNewFontFace->mnQuality;
+        mnMinQuality   = pNewFontFace->GetQuality();
     }
     else
     {
@@ -127,8 +127,8 @@ bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* pNewFontFace )
             meFamily = pNewFontFace->GetFamilyType();
         if( mePitch == PITCH_DONTKNOW )
             mePitch = pNewFontFace->GetPitch();
-        if( mnMinQuality > pNewFontFace->mnQuality )
-            mnMinQuality = pNewFontFace->mnQuality;
+        if( mnMinQuality > pNewFontFace->GetQuality() )
+            mnMinQuality = pNewFontFace->GetQuality();
     }
 
     // set attributes for attribute based font matching
@@ -172,11 +172,11 @@ bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* pNewFontFace )
             break;
 
         // ignore duplicate if its quality is worse
-        if( pNewFontFace->mnQuality < pFoundFontFace->mnQuality )
+        if( pNewFontFace->GetQuality() < pFoundFontFace->GetQuality() )
             return false;
 
         // keep the device font if its quality is good enough
-        if( (pNewFontFace->mnQuality == pFoundFontFace->mnQuality) && (pFoundFontFace->mbDevice || !pNewFontFace->mbDevice) )
+        if( (pNewFontFace->GetQuality() == pFoundFontFace->GetQuality()) && (pFoundFontFace->IsBuiltInFont() || !pNewFontFace->IsBuiltInFont()) )
             return false;
 
         // replace existing font face with a better one
@@ -277,7 +277,7 @@ void PhysicalFontFamily::UpdateCloneFontList( PhysicalFontCollection& rFontColle
 
         if( bScalable && !pFoundFontFace->IsScalable() )
             continue;
-        if( bEmbeddable && !pFoundFontFace->IsEmbeddable() && !pFoundFontFace->IsSubsettable() )
+        if( bEmbeddable && !pFoundFontFace->CanEmbed() && !pFoundFontFace->CanSubset() )
             continue;
 
         PhysicalFontFace* pClonedFace = pFoundFontFace->Clone();
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 2d92b59..34298db 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2274,11 +2274,11 @@ static ImplDevFontAttributes GetDevFontAttributes( const PDFWriterImpl::BuiltinF
     aDFA.SetItalic( rBuiltin.m_eItalic );
     aDFA.SetWidthType( rBuiltin.m_eWidthType );
 
-    aDFA.mbOrientation  = true;
-    aDFA.mbDevice       = true;
-    aDFA.mnQuality      = 50000;
-    aDFA.mbSubsettable  = false;
-    aDFA.mbEmbeddable   = false;
+    aDFA.SetOrientationFlag( true );
+    aDFA.SetBuiltInFontFlag( true );
+    aDFA.SetQuality( 50000 );
+    aDFA.SetSubsettableFlag( false );
+    aDFA.SetEmbeddableFlag( false );
     return aDFA;
 }
 
@@ -2982,7 +2982,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const PhysicalFo
 
     assert(pGraphics);
 
-    if( pFont->IsEmbeddable() )
+    if( pFont->CanEmbed() )
     {
         const unsigned char* pFontData = nullptr;
         long nFontLen = 0;
@@ -3004,7 +3004,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const PhysicalFo
             }
         }
     }
-    else if( pFont->mbSubsettable )
+    else if( pFont->CanSubset() )
     {
         aSubType = OString( "/TrueType" );
         Int32Vector aGlyphWidths;
@@ -8441,7 +8441,7 @@ bool PDFWriterImpl::registerGlyphs( int nGlyphs,
         const int nFontGlyphId = pGlyphs[i] & (GF_IDXMASK | GF_ISCHAR | GF_GSUB);
         const PhysicalFontFace* pCurrentFont = pFallbackFonts[i] ? pFallbackFonts[i] : pDevFont;
 
-        if( pCurrentFont->mbSubsettable )
+        if( pCurrentFont->CanSubset() )
         {
             FontSubset& rSubset = m_aSubsets[ pCurrentFont ];
             // search for font specific glyphID
@@ -8485,7 +8485,7 @@ bool PDFWriterImpl::registerGlyphs( int nGlyphs,
                                                           bVertical,
                                                           pGraphics );
         }
-        else if( pCurrentFont->IsEmbeddable() )
+        else if( pCurrentFont->CanEmbed() )
         {
             sal_Int32 nFontID = 0;
             FontEmbedData::iterator it = m_aEmbeddedFonts.find( pCurrentFont );
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index da787d1..4a3bffe 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -81,7 +81,7 @@ vcl::FontInfo OutputDevice::GetDevFont( int nDevFontIndex ) const
         aFontInfo.SetWidthType( rData.GetWidthType() );
         if( rData.IsScalable() )
             aFontInfo.mpImplMetric->mnMiscFlags |= ImplFontMetric::SCALABLE_FLAG;
-        if( rData.mbDevice )
+        if( rData.IsBuiltInFont() )
             aFontInfo.mpImplMetric->mnMiscFlags |= ImplFontMetric::DEVICE_FLAG;
     }
 
@@ -1782,7 +1782,7 @@ ImplFontMetricData::ImplFontMetricData( const FontSelectPattern& rFontSelData )
     {
         SetFamilyName( rFontSelData.mpFontData->GetFamilyName() );
         SetStyleName( rFontSelData.mpFontData->GetStyleName() );
-        mbDevice   = rFontSelData.mpFontData->mbDevice;
+        mbDevice   = rFontSelData.mpFontData->IsBuiltInFont();
         mbKernableFont = true;
     }
     else
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index bf1297e..a99b9ee 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -416,7 +416,7 @@ void CairoTextRender::GetDevFontList( PhysicalFontCollection* pFontCollection )
 
         // inform GlyphCache about this font provided by the PsPrint subsystem
         ImplDevFontAttributes aDFA = GenPspGraphics::Info2DevFontAttributes( aInfo );
-        aDFA.mnQuality += 4096;
+        aDFA.IncreaseQualityBy( 4096 );
         const OString& rFileName = rMgr.getFontFileSysPath( aInfo.m_nID );
         rGC.AddFontFile( rFileName, nFaceNum, aInfo.m_nID, aDFA );
    }
diff --git a/vcl/win/gdi/salgdi3.cxx b/vcl/win/gdi/salgdi3.cxx
index 86689d0..c26d795 100644
--- a/vcl/win/gdi/salgdi3.cxx
+++ b/vcl/win/gdi/salgdi3.cxx
@@ -798,32 +798,32 @@ static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rE
         aDFA.SetStyleName(OUString(reinterpret_cast<const sal_Unicode*>(pStyleName)));
 
     // get device specific font attributes
-    aDFA.mbOrientation  = (nFontType & RASTER_FONTTYPE) == 0;
-    aDFA.mbDevice       = (rMetric.tmPitchAndFamily & TMPF_DEVICE) != 0;
+    aDFA.SetOrientationFlag( ((nFontType & RASTER_FONTTYPE) == 0) );
+    aDFA.SetBuiltInFontFlag( ((rMetric.tmPitchAndFamily & TMPF_DEVICE) != 0) );
 
-    aDFA.mbEmbeddable   = false;
-    aDFA.mbSubsettable  = false;
+    aDFA.SetEmbeddableFlag( false );
+    aDFA.SetSubsettableFlag( false );
     if( 0 != (rMetric.ntmFlags & (NTM_TT_OPENTYPE | NTM_PS_OPENTYPE))
      || 0 != (rMetric.tmPitchAndFamily & TMPF_TRUETYPE))
-        aDFA.mbSubsettable = true;
+        aDFA.SetSubsettableFlag( true );
     else if( 0 != (rMetric.ntmFlags & NTM_TYPE1) ) // TODO: implement subsetting for type1 too
-        aDFA.mbEmbeddable = true;
+        aDFA.SetEmbeddableFlag( true );
 
     // heuristics for font quality
     // -   standard-type1 > opentypeTT > truetype > non-standard-type1 > raster
     // -   subsetting > embedding > none
-    aDFA.mnQuality = 0;
+    aDFA.SetQuality( 0 );
     if( rMetric.tmPitchAndFamily & TMPF_TRUETYPE )
-        aDFA.mnQuality += 50;
+        aDFA.IncreaseQualityBy( 50 );
     if( 0 != (rMetric.ntmFlags & (NTM_TT_OPENTYPE | NTM_PS_OPENTYPE)) )
-        aDFA.mnQuality += 10;
-    if( aDFA.mbSubsettable )
-        aDFA.mnQuality += 200;
-    else if( aDFA.mbEmbeddable )
-        aDFA.mnQuality += 100;
+        aDFA.IncreaseQualityBy( 10 );
+    if( aDFA.CanSubset() )
+        aDFA.IncreaseQualityBy( 200 );
+    else if( aDFA.CanEmbed() )
+        aDFA.IncreaseQualityBy( 100 );
 
     // #i38665# prefer Type1 versions of the standard postscript fonts
-    if( aDFA.mbEmbeddable )
+    if( aDFA.CanEmbed() )
     {
         if( aDFA.GetFamilyName() == "AvantGarde"
         ||  aDFA.GetFamilyName() == "Bookman"
@@ -835,7 +835,7 @@ static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rE
         ||  aDFA.GetFamilyName() == "Times"
         ||  aDFA.GetFamilyName() == "ZapfChancery"
         ||  aDFA.GetFamilyName() == "ZapfDingbats" )
-            aDFA.mnQuality += 500;
+            aDFA.IncreaseQualityBy( 500 );
     }
 
     // TODO: add alias names
@@ -1701,15 +1701,15 @@ static bool ImplGetFontAttrFromFile( const OUString& rFontFileURL,
 
     // get FontAttributes from a *fot file
     // TODO: use GetTTGlobalFontInfo() to access the font directly
-    rDFA.mnQuality    = 1000;
-    rDFA.mbDevice     = true;
+    rDFA.SetQuality( 1000 );
+    rDFA.SetBuiltInFontFlag( true );
     rDFA.SetFamilyType(FAMILY_DONTKNOW);
     rDFA.SetWidthType(WIDTH_DONTKNOW);
     rDFA.SetWeight(WEIGHT_DONTKNOW);
     rDFA.SetItalic(ITALIC_DONTKNOW);
     rDFA.SetPitch(PITCH_DONTKNOW);
-    rDFA.mbSubsettable= true;
-    rDFA.mbEmbeddable = false;
+    rDFA.SetSubsettableFlag( true );
+    rDFA.SetEmbeddableFlag( false );
 
     // Create temporary file name
     char aFileName[] = "soAAT.fot";
@@ -1794,8 +1794,8 @@ bool WinSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection,
 
     ImplDevFontAttributes aDFA;
     aDFA.SetFamilyName(rFontName);
-    aDFA.mnQuality    = 1000;
-    aDFA.mbDevice     = true;
+    aDFA.SetQuality( 1000 );
+    aDFA.SetBuiltInFontFlag( true );
 
     // Search Font Name in Cache
     if( rFontName.isEmpty() && mpFontAttrCache )
@@ -1825,8 +1825,8 @@ bool WinSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection,
     aDFA.SetWeight(WEIGHT_DONTKNOW);
     aDFA.SetItalic(ITALIC_DONTKNOW);
     aDFA.SetPitch(PITCH_DONTKNOW);
-    aDFA.mbSubsettable= true;
-    aDFA.mbEmbeddable = false;
+    aDFA.SetSubsettableFlag( true );
+    aDFA.SetEmbeddableFlag( false );
 
     /*
     // TODO: improve ImplDevFontAttributes using the "font resource file"
@@ -2430,7 +2430,7 @@ void WinSalGraphics::FreeEmbedFontData( const void* pData, long /*nLen*/ )
 const Ucs2SIntMap* WinSalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const**)
 {
     // TODO: even for builtin fonts we get here... why?
-    if( !pFont->IsEmbeddable() )
+    if( !pFont->CanEmbed() )
         return NULL;
 
     // fill the encoding vector
@@ -2468,7 +2468,7 @@ void WinSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
     HFONT hOldFont = 0;
     ImplDoSetFont( &aIFSD, fScale, hOldFont );
 
-    if( pFont->IsSubsettable() )
+    if( pFont->CanSubset() )
     {
         // get raw font file data
         const RawFontData xRawFontData( getHDC() );
@@ -2525,7 +2525,7 @@ void WinSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
             pMap = 0;
         }
     }
-    else if( pFont->IsEmbeddable() )
+    else if( pFont->CanEmbed() )
     {
         // get individual character widths
         rWidths.clear();


More information about the Libreoffice-commits mailing list