diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-01 22:38:29 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-02 02:04:16 +1100 |
commit | b890a0ed02968589029fedf1854be83f1ffe8600 (patch) | |
tree | 69dc9ff9e3435a9c4b9356b217b977cc59189503 /vcl/source/font/PhysicalFontFamily.cxx | |
parent | 3ac975dded6df870969f68ec00e8f3097c5146bf (diff) |
Revert "vcl: Get rid of FontMatchStatus structure"
This reverts commit 60676b3b376d5f3f6fb29fa68c34117c2149bbec.
The FontMapStatus structure is passed as a reference to save the
search state outside of the search loop in
PhysicalFontFamily::FindBestFontFace.
This *looked* like it would be an easy win, evidently not! Back to
the drawing board.
Change-Id: Icc7078543e50bc34221127d8df055f056e249cdb
Diffstat (limited to 'vcl/source/font/PhysicalFontFamily.cxx')
-rw-r--r-- | vcl/source/font/PhysicalFontFamily.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx index cc014871cf11..8cc691bb9b36 100644 --- a/vcl/source/font/PhysicalFontFamily.cxx +++ b/vcl/source/font/PhysicalFontFamily.cxx @@ -229,10 +229,11 @@ PhysicalFontFace* PhysicalFontFamily::FindBestFontFace( const FontSelectPattern& // TODO: linear search improve! PhysicalFontFace* pBestFontFace = maFontFaces[0]; + FontMatchStatus aFontMatchStatus = {0,0,0, pTargetStyleName}; for( std::vector< PhysicalFontFace* >::const_iterator it=maFontFaces.begin(); it != maFontFaces.end(); ++it ) { PhysicalFontFace* pFoundFontFace = *it; - if( pFoundFontFace->IsBetterMatch( rFSD, pTargetStyleName ) ) + if( pFoundFontFace->IsBetterMatch( rFSD, aFontMatchStatus ) ) pBestFontFace = pFoundFontFace; } |