diff options
author | Khaled Hosny <khaled@aliftype.com> | 2023-02-08 21:57:07 +0200 |
---|---|---|
committer | خالد حسني <khaled@aliftype.com> | 2023-02-09 18:22:41 +0000 |
commit | 182e85aef036f30e8c6f32de5516a0286aaf0320 (patch) | |
tree | b36f888fc19b984ec7dfba23097e6fcd6e4f8e39 | |
parent | cbdcc18778f9736ca6f186e2bbb9f0db456b1cee (diff) |
vcl: GetGlyphOutlineUntransformed() always returns true now
Change-Id: I98eff6f138b57e249d8ce951c1b3747c773330ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146718
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
-rw-r--r-- | vcl/inc/font/LogicalFontInstance.hxx | 2 | ||||
-rw-r--r-- | vcl/source/font/LogicalFontInstance.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 6 |
3 files changed, 6 insertions, 10 deletions
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]; |