[
https://issues.apache.org/jira/browse/PDFBOX-3884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16106124#comment-16106124
]
Matías Giovannini edited comment on PDFBOX-3884 at 7/29/17 1:33 PM:
--------------------------------------------------------------------
For the record, and in case you're interested in pursuing this further, I take
as "base truth" the various {{Encoding}} s, assuming that the names they
register are canonical. In that case I force an overwrite of the reverse
mapping in {{GlyphList.loadList(InputStream input)}}:
{code:java}
+ final boolean forceOverride =
+ WinAnsiEncoding.INSTANCE.contains(name)
+ || MacRomanEncoding.INSTANCE.contains(name)
+ || MacExpertEncoding.INSTANCE.contains(name)
+ || SymbolEncoding.INSTANCE.contains(name)
+ || ZapfDingbatsEncoding.INSTANCE.contains(name);
- if (!unicodeToName.containsKey(string))
+ if (!unicodeToName.containsKey(string) || forceOverride)
{
unicodeToName.put(string, name);
}
{code}
was (Author: mgiovann):
For the record, and in case you're interested in pursuing this further, I take
as "base truth" the various {{Encoding}} s, assuming that the names they
register are canonical. In that case I force an overwrite of the reverse
mapping in {{GlyphList.loadList(InputStream input)}}:
{code:java}
final boolean forceOverride =
WinAnsiEncoding.INSTANCE.contains(name)
|| MacRomanEncoding.INSTANCE.contains(name)
|| MacExpertEncoding.INSTANCE.contains(name)
|| SymbolEncoding.INSTANCE.contains(name)
|| ZapfDingbatsEncoding.INSTANCE.contains(name);
- if (!unicodeToName.containsKey(string))
+ if (!unicodeToName.containsKey(string) || forceOverride)
{
unicodeToName.put(string, name);
}
{code}
> GlyphList registers "wrong" Adobe name for "U+02DC SMALL TILDE"
> ---------------------------------------------------------------
>
> Key: PDFBOX-3884
> URL: https://issues.apache.org/jira/browse/PDFBOX-3884
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 2.0.6
> Reporter: Matías Giovannini
> Priority: Minor
> Attachments: PDFEncodingError.java
>
>
> The Adobe Glyph List contains both "ilde;02DC" (line 2304) and "tilde;02DC"
> (line 3826), so the Unicode conversion of ExtendedRoman 0x98 (152) "small
> tilde" fails:
> java.lang.IllegalArgumentException: U+02DC ('ilde') is not available in this
> font Times-Roman encoding: WinAnsiEncoding
> at
> org.apache.pdfbox.pdmodel.font.PDType1Font.encode(PDType1Font.java:425)
> at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:323)
> at
> org.apache.pdfbox.pdmodel.PDPageContentStream.showText(PDPageContentStream.java:414)
> at pdftest.PDFEncodingError.main(PDFEncodingError.java:18)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]