diff options
author | Akash Jain <akash96j@gmail.com> | 2016-07-23 21:41:40 +0530 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2016-10-18 20:41:30 +0200 |
commit | ce320a0ab1b2167e93a204b7f6a7a508098d48b7 (patch) | |
tree | 639e4def59b924bc5ffc12b95df243844061b617 | |
parent | 69c40bbebd063c04affa21d3112e7ccf2943cc69 (diff) |
GSoC: Add Graphite support for CommonSalLayout
Enable Graphite font rendering in CommonSalLayout through Harfbuzz
Change-Id: Ia6a00a1bb6ea1a7bd705ed91d4f4f6cb9803e062
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 22 |
1 files 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; |