[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/win
Tor Lillqvist
tml at collabora.com
Tue May 17 07:17:40 UTC 2016
vcl/win/source/gdi/salgdi3.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 3d0e80229ba99d3ad2b57a9c213bda8b0d861524
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri May 13 11:14:18 2016 +0300
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 at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index f755f73..a802158 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)
More information about the Libreoffice-commits
mailing list