diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-18 16:08:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-18 16:43:26 +0000 |
commit | c0936309a628ee35baf3cb57f8e3b7420c4d9e70 (patch) | |
tree | 2d386af9dccce3b24da7af10de1aa37ee175837c /vcl/headless | |
parent | 41c227e05f5ad1a72485af352fb245536b088b9e (diff) |
headless text rendering backs onto freetype as well
so we can query that info in GetSysFontData
which will enable the gtk3-cairo-canvas to use the font and render text with
cairo in presentation mode ever with virtual devices whose vcl font rendering
path is still non-cairo
Change-Id: I3d885d8f6a7c3776200ac31f4c9123d4b063d417
Diffstat (limited to 'vcl/headless')
-rw-r--r-- | vcl/headless/svptextrender.cxx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/vcl/headless/svptextrender.cxx b/vcl/headless/svptextrender.cxx index 14ee7a4c0053..f25e534fc50f 100644 --- a/vcl/headless/svptextrender.cxx +++ b/vcl/headless/svptextrender.cxx @@ -448,12 +448,23 @@ void SvpTextRender::SetTextColor( SalColor nSalColor ) m_aTextColor = basebmp::Color( nSalColor ); } -SystemFontData SvpTextRender::GetSysFontData( int nFallbacklevel ) const +SystemFontData SvpTextRender::GetSysFontData( int nFallbackLevel ) const { SystemFontData aSysFontData; - if (nFallbacklevel >= MAX_FALLBACK) nFallbacklevel = MAX_FALLBACK - 1; - if (nFallbacklevel < 0 ) nFallbacklevel = 0; + if (nFallbackLevel >= MAX_FALLBACK) nFallbackLevel = MAX_FALLBACK - 1; + if (nFallbackLevel < 0 ) nFallbackLevel = 0; + + if (m_pServerFont[nFallbackLevel] != NULL) + { + ServerFont* rFont = m_pServerFont[nFallbackLevel]; + aSysFontData.nFontId = rFont->GetFtFace(); + aSysFontData.nFontFlags = rFont->GetLoadFlags(); + aSysFontData.bFakeBold = rFont->NeedsArtificialBold(); + aSysFontData.bFakeItalic = rFont->NeedsArtificialItalic(); + aSysFontData.bAntialias = rFont->GetAntialiasAdvice(); + aSysFontData.bVerticalCharacterType = rFont->GetFontSelData().mbVertical; + } return aSysFontData; } |