summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/outdev3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/outdev3.cxx')
-rw-r--r--vcl/source/gdi/outdev3.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 949d3df5275f..bf1cc2728bf1 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -1889,10 +1889,11 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( ULONG nSearchType,
nTestMatch -= 1000000;
// test font name substrings
- if( (rSearchFamilyName.Len() && pData->maMatchFamilyName.Len())
+ // TODO: calculate name matching score using e.g. Levenstein distance
+ if( (rSearchFamilyName.Len() >= 4) && (pData->maMatchFamilyName.Len() >= 4)
&& ((rSearchFamilyName.Search( pData->maMatchFamilyName ) != STRING_NOTFOUND)
|| (pData->maMatchFamilyName.Search( rSearchFamilyName ) != STRING_NOTFOUND)) )
- nTestMatch += 100000*2;
+ nTestMatch += 5000;
// test SERIF attribute
if( nSearchType & IMPL_FONT_ATTR_SERIF )