diff options
author | Tor Lillqvist <tml@collabora.com> | 2016-05-13 11:14:18 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-05-17 07:17:18 +0000 |
commit | 3d0e80229ba99d3ad2b57a9c213bda8b0d861524 (patch) | |
tree | 9a01b30fdab4e8f14488bc235ee794e1076cc4fc | |
parent | ea2c3f47682b79319d5ccaade4226f45aeec7369 (diff) |
tdf#98983: Use 'Microsoft Sans Serif' instead of 'MS Sans Serif'
For some reason, in this branch, when OpenGL is used, the fixes by
Michael Stahl to make the code avoid non-scalable fonts don't work,
and text that uses the old 'MS Sans Serif' raster font just doesn't
show up at all. Fix this by bluntly using the metric equivalent
'Microsoft Sans Serif' instead.
Change-Id: I218328b0515ee0eb1b5a4a12ace7036322efbbaa
Reviewed-on: https://gerrit.libreoffice.org/24951
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | vcl/win/source/gdi/salgdi3.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index f755f73946b3..a802158f14aa 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -1468,6 +1468,10 @@ HFONT WinSalGraphics::ImplDoSetFont( FontSelectPattern* i_pFont, float& o_rFontS && (ImplSalWICompareAscii( aLogFont.lfFaceName, "Courier" ) == 0) ) lstrcpynW( aLogFont.lfFaceName, L"Courier New", 12 ); + // Prefer the scalable 'Microsoft Sans Serif' to the old raster 'MS Sans Serif' + if( ImplSalWICompareAscii( aLogFont.lfFaceName, "MS Sans Serif" ) == 0 ) + wcscpy( aLogFont.lfFaceName, L"Microsoft Sans Serif" ); + // #i47675# limit font requests to MAXFONTHEIGHT // TODO: share MAXFONTHEIGHT font instance if( (-aLogFont.lfHeight <= MAXFONTHEIGHT) |