vcl/source/gdi/pdfwriter_impl.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d93f3243d51438e2492ca6f450ae3f1f63b617b1
Author:     Khaled Hosny <kha...@libreoffice.org>
AuthorDate: Thu Sep 7 07:59:49 2023 +0300
Commit:     خالد حسني <kha...@libreoffice.org>
CommitDate: Thu Sep 7 09:01:43 2023 +0200

    tdf#157112: fix off-by-one error in /LastChar of PDF Type 3 fonts
    
    It should be the index of the last glyph in the subset, so nGlyphs - 1.
    
    Change-Id: I62853a27b602d7b3e6b6265555542dd417438fcc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156630
    Tested-by: Jenkins
    Reviewed-by: خالد حسني <kha...@libreoffice.org>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index ff2de852f4a8..64dfc809fccc 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2627,7 +2627,7 @@ bool PDFWriterImpl::emitType3Font(const 
vcl::font::PhysicalFontFace* pFace,
 
             "/FirstChar 0\n"
             "/LastChar "
-            + OString::number(nGlyphs)
+            + OString::number(nGlyphs - 1)
             + "\n"
 
             "/Widths[");

Reply via email to