diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-07-14 18:33:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-07-14 18:36:37 +0100 |
commit | 938824ca84c46ca1a1b627a94d95ba8b24f26b65 (patch) | |
tree | 9416c7692a9237d79144a334a95b06a0b477ce25 /vcl | |
parent | f88ed64c2437ad7db8323f43796fd4c6af4ee2b6 (diff) |
Related: fdo#31821 prefer non-latn over latn, but latn over nothing
Change-Id: I00d4b7bdd6c35ab72ef57c3889fa4c5a7a464e05
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/glyphs/gcach_layout.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx index fa51e620ec22..db04bdb000da 100644 --- a/vcl/generic/glyphs/gcach_layout.cxx +++ b/vcl/generic/glyphs/gcach_layout.cxx @@ -422,9 +422,13 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr le_int32 eScriptCode = -1; for( int i = nMinRunPos; i < nEndRunPos; ++i ) { - eScriptCode = uscript_getScript( pIcuChars[i], &rcI18n ); - if( (eScriptCode > 0) && (eScriptCode != latnScriptCode) ) - break; + le_int32 eNextScriptCode = uscript_getScript( pIcuChars[i], &rcI18n ); + if( (eNextScriptCode > USCRIPT_INHERITED) ) + { + eScriptCode = eNextScriptCode; + if (eNextScriptCode != latnScriptCode) + break; + } } if( eScriptCode < 0 ) // TODO: handle errors better eScriptCode = latnScriptCode; |