vcl/inc/font/LogicalFontInstance.hxx    |    2 +-
 vcl/source/font/LogicalFontInstance.cxx |    8 ++++----
 vcl/source/gdi/pdfwriter_impl.cxx       |    6 +-----
 3 files changed, 6 insertions(+), 10 deletions(-)

New commits:
commit 182e85aef036f30e8c6f32de5516a0286aaf0320
Author:     Khaled Hosny <kha...@aliftype.com>
AuthorDate: Wed Feb 8 21:57:07 2023 +0200
Commit:     خالد حسني <kha...@aliftype.com>
CommitDate: Thu Feb 9 18:22:41 2023 +0000

    vcl: GetGlyphOutlineUntransformed() always returns true now
    
    Change-Id: I98eff6f138b57e249d8ce951c1b3747c773330ab
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146718
    Tested-by: Jenkins
    Reviewed-by: خالد حسني <kha...@aliftype.com>

diff --git a/vcl/inc/font/LogicalFontInstance.hxx 
b/vcl/inc/font/LogicalFontInstance.hxx
index c9e837d540f1..a5e8a6d3249e 100644
--- a/vcl/inc/font/LogicalFontInstance.hxx
+++ b/vcl/inc/font/LogicalFontInstance.hxx
@@ -103,7 +103,7 @@ public: // TODO: make data members private
 
     bool GetGlyphBoundRect(sal_GlyphId, tools::Rectangle&, bool) const;
     virtual bool GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon&, bool) 
const = 0;
-    bool GetGlyphOutlineUntransformed(sal_GlyphId, basegfx::B2DPolyPolygon&) 
const;
+    basegfx::B2DPolyPolygon GetGlyphOutlineUntransformed(sal_GlyphId) const;
 
     sal_GlyphId GetGlyphIndex(uint32_t, uint32_t = 0) const;
 
diff --git a/vcl/source/font/LogicalFontInstance.cxx 
b/vcl/source/font/LogicalFontInstance.cxx
index 58b291d04bdf..385fe5ccd624 100644
--- a/vcl/source/font/LogicalFontInstance.cxx
+++ b/vcl/source/font/LogicalFontInstance.cxx
@@ -289,8 +289,7 @@ void close_path_func(hb_draw_funcs_t*, void* pDrawData, 
hb_draw_state_t*, void*
 }
 }
 
-bool LogicalFontInstance::GetGlyphOutlineUntransformed(sal_GlyphId nGlyph,
-                                                       
basegfx::B2DPolyPolygon& rPolyPoly) const
+basegfx::B2DPolyPolygon 
LogicalFontInstance::GetGlyphOutlineUntransformed(sal_GlyphId nGlyph) const
 {
     if (!m_pHbDrawFuncs)
     {
@@ -306,8 +305,9 @@ bool 
LogicalFontInstance::GetGlyphOutlineUntransformed(sal_GlyphId nGlyph,
         hb_draw_funcs_set_close_path_func(m_pHbDrawFuncs, close_path_func, 
pUserData, nullptr);
     }
 
-    hb_font_get_glyph_shape(GetHbFontUntransformed(), nGlyph, m_pHbDrawFuncs, 
&rPolyPoly);
-    return true;
+    basegfx::B2DPolyPolygon aPolyPoly;
+    hb_font_get_glyph_shape(GetHbFontUntransformed(), nGlyph, m_pHbDrawFuncs, 
&aPolyPoly);
+    return aPolyPoly;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index e4807abfaae8..8b1a8b6287da 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6257,11 +6257,7 @@ void PDFWriterImpl::registerGlyph(const sal_GlyphId 
nFontGlyphId,
                 else if (!aBitmap.empty())
                     rNewGlyphEmit.setColorBitmap(aBitmap, aRect);
                 else if (bVariations)
-                {
-                    basegfx::B2DPolyPolygon aOutline;
-                    if (pFont->GetGlyphOutlineUntransformed(nFontGlyphId, 
aOutline))
-                        rNewGlyphEmit.setOutline(aOutline);
-                }
+                    
rNewGlyphEmit.setOutline(pFont->GetGlyphOutlineUntransformed(nFontGlyphId));
 
                 // add new glyph to font mapping
                 Glyph& rNewGlyph = rSubset.m_aMapping[nFontGlyphId];

Reply via email to