summaryrefslogtreecommitdiff
path: root/vcl/inc/win/salgdi.h
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-12-26 15:58:21 +0100
committerKhaled Hosny <khaledhosny@eglug.org>2018-05-07 23:03:37 +0200
commit083b7ca26bbf4b9bad2922520caaf5c0227dac5e (patch)
treeb33576cd90c64cb2ede5ab1a930b11828f110105 /vcl/inc/win/salgdi.h
parent1ca1886d46f38a0759ab466e6a4a8c3c0866c523 (diff)
Move PhysicalFontFace member of FontSelectPattern
A FontSelectPattern describes a general font request. It can be used to find the best matching LogicalFontInstance. The instance will be created based on a PhysicalFontFace, which is really a factory since commit 8b700794b2746070814e9ff416ecd7bbb1c902e7. Following this workflow, this moves the PhysicalFontFace pointer to the instance and makes it constant. Which leaves some special symbol font handling code in the hash and instance lookup code path. It used to query the font face directly from the instance. I'm not sure of the correct handling. The related commits where made to fix #i89002#, which has an attached test document. 1. commit 849f618270da313f9339dda29a9f35938434c91d 2. commit 8c9823d311fdf8092cc75873e4565325d204a658 The document is as broken as it was before the patch. The symbol substitution still works, but the 'Q's are missing when displaying a symbol font. I also don't understand all the reinterpret_casts for fake font ids. I guess this was used to prevent the crashes I see, where a PhysicalFontFace referenced in a valid LogicalFontInstance is freed and a later FontId check in the GlyphCache crashes. So this now checks for a valid cache instead. Change-Id: If8ee5a6288e66cfa4c419289fbdd5b5da128c6ea Reviewed-on: https://gerrit.libreoffice.org/47279 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/inc/win/salgdi.h')
-rw-r--r--vcl/inc/win/salgdi.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 23531842dde3..cc30963d21c2 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -164,7 +164,6 @@ private:
HWND mhWnd; // Window-Handle, when Window-Graphics
HFONT mhFonts[ MAX_FALLBACK ]; // Font + Fallbacks
- const WinFontFace* mpWinFontData[ MAX_FALLBACK ]; // pointer to the most recent font face
WinFontInstance* mpWinFontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance
float mfFontScale[ MAX_FALLBACK ]; // allows metrics emulation of huge font sizes
float mfCurrentFontScale;
@@ -207,7 +206,7 @@ public:
HWND gethWnd();
- HFONT ImplDoSetFont( FontSelectPattern const * i_pFont, float& o_rFontScale, HFONT& o_rOldFont );
+ HFONT ImplDoSetFont( FontSelectPattern const * i_pFont, const PhysicalFontFace * i_pFontFace, float& o_rFontScale, HFONT& o_rOldFont );
public:
explicit WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hWnd,
@@ -400,7 +399,7 @@ public:
void ImplUpdateSysColorEntries();
int ImplIsSysColorEntry( Color nColor );
void ImplGetLogFontFromFontSelect( HDC, const FontSelectPattern*,
- LOGFONTW&, bool bTestVerticalAvail );
+ const PhysicalFontFace*, LOGFONTW& );
#define MAX_64KSALPOINTS ((((sal_uInt16)0xFFFF)-8)/sizeof(POINTS))