[Libreoffice-commits] .: 2 commits - vcl/generic

Caolán McNamara caolan at kemper.freedesktop.org
Sun Jul 15 00:29:54 PDT 2012


 vcl/generic/glyphs/gcach_layout.cxx |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit d7e5f9b315b5cbe6195504a4bb94b99e6f1b7d99
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jul 14 21:41:11 2012 +0100

    Resolves: fdo#31821 always process ZW[N]J in the font regardless of script
    
    Change-Id: Icd309199b393d89e202fa9d1aba1a1ace51c6c6e

diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index d04cebe..cd6b96c 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -187,6 +187,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;
@@ -263,6 +264,18 @@ LEGlyphID IcuFontFromServerFont::mapCharToGlyph( LEUnicode32 ch ) const
     return nGlyphIndex;
 }
 
+LEGlyphID IcuFontFromServerFont::mapCharToGlyph( LEUnicode32 ch, const LECharMapper *mapper, le_bool /*filterZeroWidth*/ ) const
+{
+    /*
+     fdo#31821, icu has...
+      >│93          if (filterZeroWidth && (mappedChar == 0x200C || mappedChar == 0x200D)) {                                            │
+       │94              return canDisplay(mappedChar) ? 0x0001 : 0xFFFF;                                                                 │
+       │95          }
+     so only the Indic layouts allow the joiners to get mapped to glyphs
+    */
+    return LEFontInstance::mapCharToGlyph( ch, mapper, false );
+}
+
 // -----------------------------------------------------------------------
 
 le_int32 IcuFontFromServerFont::getAscent() const
commit f4d20a400b5c06959fd5a362a350bb4d9a6e4bd1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jul 14 21:21:15 2012 +0100

    Resolves: fdo#31821 use icu layout whenever possible
    
    because icu knows all about otf so we don't have to, which makes
    things its problem and not ours.
    
    This is the default route for all "ctl" languages already so if
    we suffer performance issues here we should try and fix that before
    just reverting
    
    Change-Id: I68c8d9929ca48388f61951344f2cfc195045166f

diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index 0e8cd64..d04cebe 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -61,9 +61,7 @@ void ServerFontLayout::DrawText( SalGraphics& rSalGraphics ) const
 
 bool ServerFontLayout::LayoutText( ImplLayoutArgs& rArgs )
 {
-    ServerFontLayoutEngine* pLE = NULL;
-    if( !(rArgs.mnFlags & SAL_LAYOUT_COMPLEX_DISABLED) )
-        pLE = mrServerFont.GetLayoutEngine();
+    ServerFontLayoutEngine* pLE = mrServerFont.GetLayoutEngine();
     if( !pLE )
         pLE = &SimpleLayoutEngine::get();
 


More information about the Libreoffice-commits mailing list