diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-09-12 13:00:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-12 14:44:07 +0100 |
commit | e0be487afd8c375455e8bbd0306bff73ddb1b51c (patch) | |
tree | b94fec0cdd3ed874b704c0827266dd49ca21e7e7 /svtools | |
parent | 3202c44532ac59b7bd9fedae74201e4ba8c92013 (diff) |
Related: fdo#82259 various "* MN" fonts incorrectly claim to support TAMIL
Change-Id: Ie1f21052ff09fcf243a3cc0839cf7118efa09c68
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/misc/sampletext.cxx | 55 |
1 files changed, 52 insertions, 3 deletions
diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index 2800cc220e5e..4eaa38af9bc9 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -18,11 +18,60 @@ // that caused it to be added static UScriptCode lcl_getHardCodedScriptNameForFont (const OutputDevice &rDevice) { - // As of OSX 10.9, the system font "GB18030 Bitmap" incorrectly declares - // that it only covers "Phoenician" when in fact it's a Chinese font. - if (rDevice.GetFont().GetName().equalsIgnoreAsciiCase("GB18030 Bitmap")) { + const OUString &rName = rDevice.GetFont().GetName(); + + if (rName == "GB18030 Bitmap") + { + // As of OSX 10.9, the system font "GB18030 Bitmap" incorrectly declares + // that it only covers "Phoenician" when in fact it's a Chinese font. return USCRIPT_HAN; } + else if (rName.startsWith("Bangla ")) + { + // "Bangla Sangam MN" claims it supports MALAYALAM, but it doesn't + // "Bangla MN" claims just DEVANAGARI and not an additional BENGALI + return USCRIPT_BENGALI; + } + else if (rName.startsWith("Gurmukhi ")) + { + // "Gurmukhi MN" claims it supports TAMIL, but it doesn't + return USCRIPT_GURMUKHI; + } + else if (rName.startsWith("Kannada ")) + { + // "Kannada MN" claims it supports TAMIL, but it doesn't + return USCRIPT_KANNADA; + } + else if (rName.startsWith("Lao ")) + { + // "Lao Sangam MN" claims it supports TAMIL, but it doesn't + return USCRIPT_LAO; + } + else if (rName.startsWith("Malayalam ")) + { + // "Malayalam MN" claims it supports TAMIL, but it doesn't + return USCRIPT_LAO; + } + else if (rName.startsWith("Sinhala ")) + { + // "Sinhala MN" claims it supports CYRILLIC + return USCRIPT_SINHALA; + } + else if (rName.startsWith("Telugu ")) + { + // "Telugu MN" claims it supports TAMIL, but it doesn't + return USCRIPT_TELUGU; + } + else if (rName.startsWith("Myanmar ")) + { + return USCRIPT_MYANMAR; + } + else if (rName == "InaiMathi") + { + // "InaiMathi" claims it supports GOTHIC and CJK_UNIFIED_IDEOGRAPHS as well as + // TAMIL, but it doesn't + return USCRIPT_TAMIL; + } return USCRIPT_INVALID_CODE; } |