You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Jan Tosovsky <j....@email.cz> on 2014/02/10 19:54:55 UTC

Invalid Characters codes when reading a specific font

Dear All,

when opening DroidSansFallback TTF font [1] via the following code using
just FontBox dependency, the Invalid Characters codes error appears:

TrueTypeFont font = new TTFParser().parseTTF(new
File("DroidSansFallback.ttf"));

java.io.IOException: Invalid Characters codes
	at
org.apache.fontbox.ttf.CMAPEncodingEntry.processSubtype12(CMAPEncodingEntry.
java:221)
	at
org.apache.fontbox.ttf.CMAPEncodingEntry.initSubtable(CMAPEncodingEntry.java
:100)
...

FontBox 1.8.2/Win7/JDK 7

I plan to perform some character subsetting...

Is there any workaround for this issue?

Thanks, Jan

______________
[1]
https://github.com/android/platform_frameworks_base/blob/master/data/fonts/D
roidSansFallback.ttf


Re: Invalid Characters codes when reading a specific font

Posted by Andreas Lehmkühler <an...@lehmi.de>.
Hi,

> Jan Tosovsky <j....@email.cz> hat am 10. Februar 2014 um 19:54
> geschrieben:
>
>
> Dear All,
>
> when opening DroidSansFallback TTF font [1] via the following code using
> just FontBox dependency, the Invalid Characters codes error appears:
>
> TrueTypeFont font = new TTFParser().parseTTF(new
> File("DroidSansFallback.ttf"));
>
> java.io.IOException: Invalid Characters codes
>       at
> org.apache.fontbox.ttf.CMAPEncodingEntry.processSubtype12(CMAPEncodingEntry.
> java:221)
>       at
> org.apache.fontbox.ttf.CMAPEncodingEntry.initSubtable(CMAPEncodingEntry.java
> :100)
> ...
>
> FontBox 1.8.2/Win7/JDK 7
>
> I plan to perform some character subsetting...
>
> Is there any workaround for this issue?
You should update to 1.8.4, maybe the issue is already fixed.

> Thanks, Jan
>
> ______________
> [1]
> https://github.com/android/platform_frameworks_base/blob/master/data/fonts/D
> roidSansFallback.ttf
>


BR
Andreas Lehmkühler

RE: Invalid Characters codes when reading a specific font

Posted by Jan Tosovsky <j....@email.cz>.
On 2014-02-10 Jan Tosovsky wrote:
> 
> when opening DroidSansFallback TTF font [1] via the following code
> using just FontBox dependency, the Invalid Characters codes error 
> appears:
> 
> TrueTypeFont font = new TTFParser().parseTTF(new
> File("DroidSansFallback.ttf"));
> 
> java.io.IOException: Invalid Characters codes
> 	at
> org.apache.fontbox.ttf.CMAPEncodingEntry.processSubtype12(CMAPEncodingE
> ntry.
> java:221)
> 	at
> org.apache.fontbox.ttf.CMAPEncodingEntry.initSubtable(CMAPEncodingEntry
> .java
> :100)
> ...
> 

Any idea how to work around this issue?

Thanks, Jan