[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/generic
Mark Hung
marklh9 at gmail.com
Thu Nov 26 04:11:28 PST 2015
vcl/generic/glyphs/gcach_layout.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit ff592b85f02a1e16aa1668c874e733331e4e242b
Author: Mark Hung <marklh9 at gmail.com>
Date: Wed Nov 18 00:45:13 2015 +0800
tdf#91288 Does not display traditional Chinese variant of
Noto fonts correctly.
LanguageTag()::getLanguage() would always return "zh" despite
traditional Chinese were choose. hb_language_from_string()
requires iso639-3 language tag except for Chinese, so
we use use Bcp47() language tag for Chinese to differ zh-CN and
the others.
Change-Id: I6700a79a9c49a97d840b430def77741912935f72
Reviewed-on: https://gerrit.libreoffice.org/20027
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 4424daa225e73d291a3fd64d369cdda5857f3d51)
Reviewed-on: https://gerrit.libreoffice.org/20203
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index 38ea6ac..127dd06 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -466,8 +466,10 @@ bool HbLayoutEngine::Layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
int nEndRunPos = it->mnEnd;
int nRunLen = nEndRunPos - nMinRunPos;
maHbScript = it->maScript;
+ // hb_language_from_string() accept ISO639-3 language tag except for Chinese.
+ LanguageTag &rTag = rArgs.maLanguageTag;
+ OString sLanguage = OUStringToOString( MsLangId::isChinese(rTag.getLanguageType()) ? rTag.getBcp47():rTag.getLanguage() , RTL_TEXTENCODING_UTF8 );
- OString sLanguage = OUStringToOString(rArgs.maLanguageTag.getLanguage(), RTL_TEXTENCODING_UTF8);
static hb_unicode_funcs_t* pHbUnicodeFuncs = getUnicodeFuncs();
More information about the Libreoffice-commits
mailing list