[
https://issues.apache.org/jira/browse/PDFBOX-3250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vladimir Dubrov updated PDFBOX-3250:
------------------------------------
Description:
Accidentally noticed a possible bug in parsing name records:
1) Class NamingTable.java, line 165:
for (int i = 4; i <= 0; i--)
this loop is never entered, thus, Unicode strings are not considered.
2) Class NamingTable.java, line 106:
String string = data.readString(nr.getStringLength(), charset);
for platform == 0 (Unicode), strings are read in ISO-8859-1 charset, but most
likely it should be UTF16 charset.
This may affect values of the FontFamily and FontSubFamily fields.
was:
Accidentally noticed a possible bug in parsing name records:
Class NamingTable.java, line 165:
for (int i = 4; i <= 0; i--)
this loop is never entered, thus, Unicode strings are not considered.
Class NamingTable.java, line 106:
String string = data.readString(nr.getStringLength(), charset);
for platform == 0 (Unicode), strings are read in ISO-8859-1 charset, but most
likely it should be UTF16 charset.
> Possible errors in TrueType table 'name' parsing.
> -------------------------------------------------
>
> Key: PDFBOX-3250
> URL: https://issues.apache.org/jira/browse/PDFBOX-3250
> Project: PDFBox
> Issue Type: Bug
> Components: FontBox
> Environment: Unicode strings
> Reporter: Vladimir Dubrov
> Priority: Minor
>
> Accidentally noticed a possible bug in parsing name records:
> 1) Class NamingTable.java, line 165:
> for (int i = 4; i <= 0; i--)
> this loop is never entered, thus, Unicode strings are not considered.
> 2) Class NamingTable.java, line 106:
> String string = data.readString(nr.getStringLength(), charset);
> for platform == 0 (Unicode), strings are read in ISO-8859-1 charset, but most
> likely it should be UTF16 charset.
> This may affect values of the FontFamily and FontSubFamily fields.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]