diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-08-25 15:15:19 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-08-25 15:15:19 +0000 |
commit | 455c8cae250361bf41e6b6cea3516338793399ca (patch) | |
tree | de9ee1e4a122a98f1056cd5350394364f796af55 /vcl | |
parent | c8e7bbdbbc60bf00883e6bec2b6e2eaa41ff79a4 (diff) |
INTEGRATION: CWS gslpatches4 (1.34.196); FILE MERGED
2005/07/18 11:54:03 hdu 1.34.196.2: #i14069# better script detection
2005/07/15 10:47:21 hdu 1.34.196.1: #i14069# merge scale factor fix from CWS gslpatches2
Diffstat (limited to 'vcl')
-rwxr-xr-x | vcl/source/glyphs/gcach_layout.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/vcl/source/glyphs/gcach_layout.cxx b/vcl/source/glyphs/gcach_layout.cxx index 5436e82db92c..0e066a187cfe 100755 --- a/vcl/source/glyphs/gcach_layout.cxx +++ b/vcl/source/glyphs/gcach_layout.cxx @@ -2,9 +2,9 @@ * * $RCSfile: gcach_layout.cxx,v $ * - * $Revision: 1.35 $ + * $Revision: 1.36 $ * - * last change: $Author: hr $ $Date: 2005-08-05 12:54:45 $ + * last change: $Author: kz $ $Date: 2005-08-25 16:15:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -439,7 +439,14 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr break; // find matching script - le_int32 eScriptCode = uscript_getScript( pIcuChars[nMinRunPos], &rcI18n ); + // TODO: split up bidi run into script runs + le_int32 eScriptCode = -1; + for( int i = nMinRunPos; i < nEndRunPos; ++i ) + { + eScriptCode = uscript_getScript( pIcuChars[i], &rcI18n ); + if( (eScriptCode > 0) && (eScriptCode != latnScriptCode) ) + break; + } if( eScriptCode < 0 ) // TODO: handle errors better eScriptCode = latnScriptCode; @@ -519,7 +526,7 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr // heuristic to detect group clusters using the "smoothed" char positions long nGlyphFlags = 0; if( nLastCharPos != -1 ) - if( (nCharPos == nLastCharPos) || (nGlyphWidth == 0) ) + if( (nCharPos == nLastCharPos) || (nGlyphWidth <= 0) ) nGlyphFlags = GlyphItem::IS_IN_CLUSTER; if( bRightToLeft ) nGlyphFlags |= GlyphItem::IS_RTL_GLYPH; |