Bugzilla – Attachment 64205 Details for
Bug 31821
Writer ignores OpenType ligatures.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
replacement patch without the initial ugliness
better.experimental.patch (text/plain), 4.15 KB, created by
Caolán McNamara
on 2012-07-14 13:43:13 UTC
(
hide
)
Description:
replacement patch without the initial ugliness
Filename:
MIME Type:
Creator:
Caolán McNamara
Created:
2012-07-14 13:43:13 UTC
Size:
4.15 KB
patch
obsolete
>diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx >index fa51e62..8ae6771 100644 >--- a/vcl/generic/glyphs/gcach_layout.cxx >+++ b/vcl/generic/glyphs/gcach_layout.cxx >@@ -203,6 +211,7 @@ public: > > using LEFontInstance::mapCharToGlyph; > virtual LEGlyphID mapCharToGlyph( LEUnicode32 ch ) const; >+ virtual LEGlyphID mapCharToGlyph( LEUnicode32 ch, const LECharMapper *mapper, le_bool filterZeroWidth ) const; > > virtual le_int32 getAscent() const; > virtual le_int32 getDescent() const; >@@ -279,6 +288,16 @@ LEGlyphID IcuFontFromServerFont::mapCharToGlyph( LEUnicode32 ch ) const > return nGlyphIndex; > } > >+LEGlyphID IcuFontFromServerFont::mapCharToGlyph( LEUnicode32 ch, const LECharMapper *mapper, le_bool /*filterZeroWidth*/ ) const >+{ >+/* icu has..., so only the Indic layouts allow the joiners to get mapped to glyphs >+ >â93 if (filterZeroWidth && (mappedChar == 0x200C || mappedChar == 0x200D)) { â >+ â94 return canDisplay(mappedChar)? 0x0001 : 0xFFFF; â >+ â95 } >+*/ >+ return LEFontInstance::mapCharToGlyph( ch, mapper, false ); >+} >+ > // ----------------------------------------------------------------------- > > le_int32 IcuFontFromServerFont::getAscent() const >@@ -422,13 +441,19 @@ 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; > >+ fprintf(stderr, "scriptcode is %d\n", eScriptCode); >+ > // get layout engine matching to this script > // no engine change necessary if script is latin > if( !mpIcuLE || ((eScriptCode != meScriptCode) && (eScriptCode > USCRIPT_INHERITED)) ) >@@ -449,6 +474,9 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr > if( !mpIcuLE ) > break; > >+ if( pIcuChars[0] == 'A') >+ fprintf(stderr, "debug here\n"); // OpenTypeLayoutEngine.cpp:314 >+ > // run ICU layout engine > // TODO: get enough context, remove extra glyps below > int nRawRunGlyphCount = mpIcuLE->layoutChars( pIcuChars, >diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx >index 226ec08..2c3dc0a 100644 >--- a/vcl/source/gdi/outdev3.cxx >+++ b/vcl/source/gdi/outdev3.cxx >@@ -6001,22 +6001,6 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( String& rStr, > nLayoutFlags |= SAL_LAYOUT_ENABLE_LIGATURES; > else if( mnTextLayoutMode & TEXT_LAYOUT_COMPLEX_DISABLED ) > nLayoutFlags |= SAL_LAYOUT_COMPLEX_DISABLED; >- else >- { >- // disable CTL for non-CTL text >- const sal_Unicode* pStr = rStr.GetBuffer() + nMinIndex; >- const sal_Unicode* pEnd = rStr.GetBuffer() + nEndIndex; >- for( ; pStr < pEnd; ++pStr ) >- if( ((*pStr >= 0x0300) && (*pStr < 0x0370)) // diacritical marks >- || ((*pStr >= 0x0590) && (*pStr < 0x10A0)) // many CTL scripts >- || ((*pStr >= 0x1100) && (*pStr < 0x1200)) // hangul jamo >- || ((*pStr >= 0x1700) && (*pStr < 0x1900)) // many CTL scripts >- || ((*pStr >= 0xFB1D) && (*pStr < 0xFE00)) // middle east presentation >- || ((*pStr >= 0xFE70) && (*pStr < 0xFEFF)) ) // arabic presentation B >- break; >- if( pStr >= pEnd ) >- nLayoutFlags |= SAL_LAYOUT_COMPLEX_DISABLED; >- } > > if( meTextLanguage ) //TODO: (mnTextLayoutMode & TEXT_LAYOUT_SUBSTITUTE_DIGITS) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 31821
:
40458
|
40459
|
40460
|
57819
|
59228
|
59229
| 64205