From ce320a0ab1b2167e93a204b7f6a7a508098d48b7 Mon Sep 17 00:00:00 2001 From: Akash Jain Date: Sat, 23 Jul 2016 21:41:40 +0530 Subject: GSoC: Add Graphite support for CommonSalLayout Enable Graphite font rendering in CommonSalLayout through Harfbuzz Change-Id: Ia6a00a1bb6ea1a7bd705ed91d4f4f6cb9803e062 --- vcl/unx/generic/gdi/cairotextrender.cxx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 01f82db0019d..46b9326df858 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -532,19 +532,23 @@ SalLayout* CairoTextRender::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackL if( mpServerFont[ nFallbackLevel ] && !(rArgs.mnFlags & SalLayoutFlags::DisableGlyphProcessing) ) { -#if ENABLE_GRAPHITE - // Is this a Graphite font? - if (!bDisableGraphite_ && - GraphiteServerFontLayout::IsGraphiteEnabledFont(*mpServerFont[nFallbackLevel])) + if (getenv("SAL_USE_COMMON_LAYOUT")) { - pLayout = new GraphiteServerFontLayout(*mpServerFont[nFallbackLevel]); + pLayout = new CommonSalLayout(*mpServerFont[nFallbackLevel]); } else -#endif - if (getenv("SAL_USE_COMMON_LAYOUT")) - pLayout = new CommonSalLayout(*mpServerFont[nFallbackLevel]); + { +#if ENABLE_GRAPHITE + // Is this a Graphite font? + if (!bDisableGraphite_ && + GraphiteServerFontLayout::IsGraphiteEnabledFont(*mpServerFont[nFallbackLevel])) + { + pLayout = new GraphiteServerFontLayout(*mpServerFont[nFallbackLevel]); + } else - pLayout = new ServerFontLayout(*mpServerFont[nFallbackLevel]); +#endif + pLayout = new ServerFontLayout( *mpServerFont[ nFallbackLevel ] ); + } } return pLayout; -- cgit v1.2.3