diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-12-26 15:58:21 +0100 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2018-05-07 23:03:37 +0200 |
commit | 083b7ca26bbf4b9bad2922520caaf5c0227dac5e (patch) | |
tree | b33576cd90c64cb2ede5ab1a930b11828f110105 /vcl/win/window | |
parent | 1ca1886d46f38a0759ab466e6a4a8c3c0866c523 (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/win/window')
-rw-r--r-- | vcl/win/window/salframe.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 864c0dd45f03..ed65a8698d70 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2184,8 +2184,8 @@ static void ImplSalFrameSetInputContext( HWND hWnd, const SalInputContext* pCont // specified by this font name; but it seems to decide whether // to use that font's horizontal or vertical variant based on a // '@' in front of this font name. - ImplGetLogFontFromFontSelect( hDC, pContext->mpFont, aLogFont, - false ); + ImplGetLogFontFromFontSelect(hDC, pContext->mpFont, + nullptr, aLogFont); ReleaseDC( pFrame->mhWnd, hDC ); ImmSetCompositionFontW( hIMC, &aLogFont ); ImmReleaseContext( pFrame->mhWnd, hIMC ); |