vcl/inc/PhysicalFontFamily.hxx | 20 ++++++++++++-------- vcl/source/font/PhysicalFontFamily.cxx | 10 +++++----- 2 files changed, 17 insertions(+), 13 deletions(-)
New commits: commit e7d052bd576ac7f0e905c716ab437b1ff976f30c Author: Chris Sherlock <chris.sherloc...@gmail.com> Date: Wed Dec 30 20:15:51 2015 +1100 vcl: update comment in AddFontFace() to match reality Change-Id: Ia9fb7818b500b126e08e2586781b15477d9fd6db diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx index 01ca378..50ab10e 100644 --- a/vcl/source/font/PhysicalFontFamily.cxx +++ b/vcl/source/font/PhysicalFontFamily.cxx @@ -160,7 +160,7 @@ bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* pNewFontFace ) if( pNewFontFace->GetFamilyName() == GetFamilyName() ) pNewFontFace->SetFamilyName( GetFamilyName() ); - // insert new physical font face into linked list + // add the new physical font face, replacing existing font face if necessary // TODO: get rid of linear search? for(std::vector< PhysicalFontFace* >::iterator it=maFontFaces.begin(); it != maFontFaces.end(); ++it ) { commit d23e6f2e9261d97e8544591abe83a2c78d8eb70d Author: Chris Sherlock <chris.sherloc...@gmail.com> Date: Wed Dec 30 20:11:08 2015 +1100 vcl: group functions and variables in PhysicalFontFamily Change-Id: I9069ba0c48cdbb7ee08e70c8f3eb2d911e9ab442 diff --git a/vcl/inc/PhysicalFontFamily.hxx b/vcl/inc/PhysicalFontFamily.hxx index e945406..a80ffb9 100644 --- a/vcl/inc/PhysicalFontFamily.hxx +++ b/vcl/inc/PhysicalFontFamily.hxx @@ -48,19 +48,22 @@ public: const OUString& GetFamilyName() const { return maFamilyName; } const OUString& GetSearchName() const { return maSearchName; } const OUString& GetAliasNames() const { return maMapNames; } + bool IsScalable() const { return maFontFaces[0]->IsScalable(); } + int GetMinQuality() const { return mnMinQuality; } + int GetTypeFaces() const { return mnTypeFaces; } + void GetFontHeights( std::set<int>& rHeights ) const; + const OUString& GetMatchFamilyName() const { return maMatchFamilyName; } ImplFontAttrs GetMatchType() const { return mnMatchType ; } FontWeight GetMatchWeight() const { return meMatchWeight ; } FontWidth GetMatchWidth() const { return meMatchWidth ; } - bool IsScalable() const { return maFontFaces[0]->IsScalable(); } - int GetMinQuality() const { return mnMinQuality; } - int GetTypeFaces() const { return mnTypeFaces; } - bool AddFontFace( PhysicalFontFace* ); void InitMatchData( const utl::FontSubstConfiguration&, const OUString& rSearchName ); + + bool AddFontFace( PhysicalFontFace* ); + PhysicalFontFace* FindBestFontFace( const FontSelectPattern& rFSD ) const; - void GetFontHeights( std::set<int>& rHeights ) const; void UpdateDevFontList( ImplDeviceFontList& ) const; void UpdateCloneFontList( PhysicalFontCollection&, bool bScalable, bool bEmbeddable ) const; @@ -75,13 +78,14 @@ private: OUString maSearchName; // normalized font family name OUString maMapNames; // fontname aliases int mnTypeFaces; // Typeface Flags + FontFamily meFamily; + FontPitch mePitch; + int mnMinQuality; // quality of the worst font face + ImplFontAttrs mnMatchType; // MATCH - Type OUString maMatchFamilyName; // MATCH - FamilyName FontWeight meMatchWeight; // MATCH - Weight FontWidth meMatchWidth; // MATCH - Width - FontFamily meFamily; - FontPitch mePitch; - int mnMinQuality; // quality of the worst font face }; #endif // INCLUDED_VCL_INC_PHYSICALFONTFAMILY_HXX diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx index 9ee2def..01ca378 100644 --- a/vcl/source/font/PhysicalFontFamily.cxx +++ b/vcl/source/font/PhysicalFontFamily.cxx @@ -92,12 +92,12 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName ) PhysicalFontFamily::PhysicalFontFamily( const OUString& rSearchName ) : maSearchName( rSearchName ), mnTypeFaces( 0 ), - mnMatchType( ImplFontAttrs::None ), - meMatchWeight( WEIGHT_DONTKNOW ), - meMatchWidth( WIDTH_DONTKNOW ), meFamily( FAMILY_DONTKNOW ), mePitch( PITCH_DONTKNOW ), - mnMinQuality( -1 ) + mnMinQuality( -1 ), + mnMatchType( ImplFontAttrs::None ), + meMatchWeight( WEIGHT_DONTKNOW ), + meMatchWidth( WIDTH_DONTKNOW ) {} PhysicalFontFamily::~PhysicalFontFamily() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits