vcl/generic/glyphs/gcach_layout.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit ff592b85f02a1e16aa1668c874e733331e4e242b
Author: Mark Hung <mark...@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 <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@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();
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to