[Libreoffice-commits] core.git: canvas/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 1 13:28:32 UTC 2018


 canvas/source/opengl/ogl_canvasfont.cxx   |    6 ++++--
 canvas/source/opengl/ogl_canvasfont.hxx   |    3 +++
 canvas/source/opengl/ogl_canvashelper.cxx |    3 +++
 3 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit beaba5f1abbb9a1461286fc831ea6a30131bb3b5
Author:     Mark Hung <marklh9 at gmail.com>
AuthorDate: Tue Oct 30 23:43:10 2018 +0800
Commit:     Mark Hung <marklh9 at gmail.com>
CommitDate: Thu Nov 1 14:28:00 2018 +0100

    tdf#43671 set emphasis mark of vcl::Font (opengl).
    
    Change-Id: Ib61765b495c867bcb461ee7324eb7b92ed4da864
    Reviewed-on: https://gerrit.libreoffice.org/62631
    Tested-by: Jenkins
    Reviewed-by: Mark Hung <marklh9 at gmail.com>

diff --git a/canvas/source/opengl/ogl_canvasfont.cxx b/canvas/source/opengl/ogl_canvasfont.cxx
index 0434bb0856cb..18621b544930 100644
--- a/canvas/source/opengl/ogl_canvasfont.cxx
+++ b/canvas/source/opengl/ogl_canvasfont.cxx
@@ -11,22 +11,24 @@
 
 #include <com/sun/star/rendering/PanoseWeight.hpp>
 #include <com/sun/star/rendering/XSpriteCanvas.hpp>
+#include <canvas/canvastools.hxx>
 
 #include "ogl_canvasfont.hxx"
 #include "ogl_textlayout.hxx"
 
-
 using namespace ::com::sun::star;
 
 namespace oglcanvas
 {
     CanvasFont::CanvasFont( const rendering::FontRequest&                   rFontRequest,
-                            const uno::Sequence< beans::PropertyValue >&    /*extraFontProperties*/,
+                            const uno::Sequence< beans::PropertyValue >&    extraFontProperties,
                             const geometry::Matrix2D&                       fontMatrix ) :
         CanvasFontBaseT( m_aMutex ),
         maFontRequest( rFontRequest ),
+        mnEmphasisMark(0),
         maFontMatrix( fontMatrix )
     {
+        ::canvas::tools::extractExtraFontProperties(extraFontProperties, mnEmphasisMark);
     }
 
     uno::Reference< rendering::XTextLayout > SAL_CALL CanvasFont::createTextLayout( const rendering::StringContext& aText,
diff --git a/canvas/source/opengl/ogl_canvasfont.hxx b/canvas/source/opengl/ogl_canvasfont.hxx
index 1743bc3c985e..eb2307a7720e 100644
--- a/canvas/source/opengl/ogl_canvasfont.hxx
+++ b/canvas/source/opengl/ogl_canvasfont.hxx
@@ -50,8 +50,11 @@ namespace oglcanvas
 
         const css::geometry::Matrix2D& getFontMatrix() const { return maFontMatrix; }
 
+        sal_uInt32 getEmphasisMark() const { return mnEmphasisMark; }
+
     private:
         css::rendering::FontRequest    maFontRequest;
+        sal_uInt32                     mnEmphasisMark;
         css::geometry::Matrix2D        maFontMatrix;
     };
 }
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index c4bfde0bed8e..2902c2e9b8db 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -701,6 +701,9 @@ namespace oglcanvas
                 aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
                 aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
 
+                if (pFont->getEmphasisMark())
+                    aFont.SetEmphasisMark(FontEmphasisMark(pFont->getEmphasisMark()));
+
                 // adjust to stretched font
                 if(!::rtl::math::approxEqual(rFontMatrix.m00, rFontMatrix.m11))
                 {


More information about the Libreoffice-commits mailing list