summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/gdi/cairotextrender.cxx
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/unx/generic/gdi/cairotextrender.cxx
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/unx/generic/gdi/cairotextrender.cxx')
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx4
1 files changed, 0 insertions, 4 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 10edfd0e5001..bde9ff6827ac 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -99,10 +99,6 @@ void CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev
if( !pEntry )
return;
- // return early if this is not a valid font for this graphics
- if( !pEntry->mpFontData )
- return;
-
// handle the request for a non-native X11-font => use the GlyphCache
FreetypeFont* pFreetypeFont = GlyphCache::GetInstance().CacheFont( *pEntry );
if( pFreetypeFont != nullptr )