[
https://issues.apache.org/jira/browse/PDFBOX-5632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17739707#comment-17739707
]
Andreas Lehmkühler edited comment on PDFBOX-5632 at 7/6/23 6:19 AM:
--------------------------------------------------------------------
[~tilman] thanks for the pointer. My change eliminates an exception which marks
the font as damaged so that the CFF based font is used to render the PDF. But
that doesn't work as it isn't supported. I've restored the old logic so that
the exception is thrown again, the font is replaced with a "real" TTF font
which can be rendered.
I've never thought the change might be related to rendering. However the issue
is based on a misunderstanding. According to the TTF-spec a true type font does
not contain CFF outlines. Within a PDF a true type font may contain a open type
font as well. An OTF is a more modern version of a TTF including the "old" TTF
format. A PDTrueTypeFont is not necessarily limited to a "real" true type font.
Saying that, we have to improve PDFBox to handle such fonts by detecting the
correct format and using the CFF outlines as PDTrueTypeFont. I've already
something on my mind, but I'm going to open a separate ticket for that
was (Author: lehmi):
[~tilman] thanks for the pointer. My change eliminates an exception which marks
the font as damaged so that the CFF based font is used the render the PDF. But
that doesn't work as it isn't supported. I've restored the old logic so that
the the exception is throws again, the font is replaced with a "real" TTF font
which can be rendered.
I've never thought the change might be related to rendering. However the issue
is based on a misunderstanding. According to the TTF-spec a true type font does
not contain CFF outlines. Within a PDF a true type font may contain a open type
font as well. An OTF is a more modern version of a TTF including the "old" TTF
format. A PDTrueTypeFont is not necessarily limited to a "real" true type font.
Saying that, we have to improve PDFBox to handle such fonts by detecting the
correct format and using the CFF outlines as PDTrueTypeFont. I've already
something on my mind, but I'm going to open a separate ticket for that
> loca-table isn't mandatory for TTF/OTF-fonts using CFF outlines
> ---------------------------------------------------------------
>
> Key: PDFBOX-5632
> URL: https://issues.apache.org/jira/browse/PDFBOX-5632
> Project: PDFBox
> Issue Type: Improvement
> Components: FontBox
> Affects Versions: 2.0.29, 3.0.0 PDFBox
> Reporter: Andreas Lehmkühler
> Assignee: Andreas Lehmkühler
> Priority: Major
> Fix For: 2.0.30, 3.0.0 PDFBox
>
> Attachments: PDFJS-215-missing-glyf.pdf
>
>
> The loca-table isn't mandatory for TTF/OTF-fonts using CFF outlines as
> glyphs. There is already some code following that rule but it doesn't work in
> all cases.
> https://learn.microsoft.com/en-us/typography/opentype/spec/otff
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]