[
https://issues.apache.org/jira/browse/PDFBOX-3379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15325912#comment-15325912
]
Tilman Hausherr edited comment on PDFBOX-3379 at 6/11/16 3:38 PM:
------------------------------------------------------------------
glyphIds in the set: \[0, 3, 36, 37]
number of metrics: 4
the current code increments {{hmetrics}} and adds {{3}} (number of metrics - 1)
to the set. The mistake is that 3 was already part of the set, so there was no
need to change anything. (3 is the last GID and its metrics are used for itself
and all bigger GIDs.
was (Author: tilman):
glyphIds in the set: \[0, 3, 36, 37]
number of metrics: 3
the current code increments {{hmetrics}} and adds {{3}} to the set. The mistake
is that 3 was already part of the set, so there was no need to change anything.
(3 is the last GID and its metrics are used for itself and all bigger GIDs.
> PDType0Font Subsetting Monospace DejaVuSansMono
> -----------------------------------------------
>
> Key: PDFBOX-3379
> URL: https://issues.apache.org/jira/browse/PDFBOX-3379
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Christian Maierhofer
> Attachments: DejaVuSansMono.ttf, TTFFontTestPDFBox2.java,
> VeraMono.ttf, doTest.pdf
>
>
> Hi,
> we came across the problem that the monospace font dejaVuSansMono has
> problems with spaces in strings if they are rendered in a pdf and a
> PDFType0Font is used for subsetting. If a space is placed within the strings
> the letters from every word are placed overlapping each other, see attached
> files. Seems that the advancedWidth array int the HorizontalMetricsTable
> contains a wrong, very low value as 3rd entry after subsetting the font. We
> compared it with a second monospace font, and it worked there. The difference
> between the two fonts is that the dejaVu Mono only contains 4 advanceWidth
> entries and the second one contains an entry for every glyph. This second
> font was VeraMono.ttf . The fonts are loaded via PDType0Font.load(doc,
> fontfile).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]