While working on other bugs, we found this bug in
vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx . When
there is only one character at the end of the string that require
glyph-fallback, the bug prevent glyph-fallbacking. Because the code will
not detect that the last character need glyph-fallback. It is an obvious
bug because of wrong loop's terminating condition checking.
Please take a look.
Samphan.
--
_/|\_ /Samphan Raruenrom./ Osdev - Open Source Development Co., Ltd.
/???????? ??????????./ ????????? - ?????? ?????????????????????? ?????
tel: +66 2 269 9889 web: osdev.co.th <http://www.osdev.co.th/>
twitter: @osdev <http://twitter.com/osdev> facebook: facebook.com/osdev
<http://www.facebook.com/osdev>
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index ae62c6e..343f39f 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -555,13 +555,14 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFo
{
// guess a locale matching to the missing chars
com::sun::star::lang::Locale aLocale;
+ LanguageType eLang = LANGUAGE_DONTKNOW;
sal_Int32 nStrIdx = 0;
const sal_Int32 nStrLen = rMissingChars.getLength();
while( nStrIdx < nStrLen )
{
const sal_UCS4 uChar = rMissingChars.iterateCodePoints( &nStrIdx );
- const LanguageType eLang = MapCharToLanguage( uChar );
+ eLang = MapCharToLanguage( uChar );
if( eLang == LANGUAGE_DONTKNOW )
continue;
MsLangId::convertLanguageToLocale( eLang, aLocale );
@@ -569,7 +570,7 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFo
}
// fall back to default UI locale if the missing characters are inconclusive
- if( nStrIdx >= nStrLen )
+ if( eLang == LANGUAGE_DONTKNOW )
aLocale = Application::GetSettings().GetUILocale();
// first level fallback:
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice