webfont-generator icon indicating copy to clipboard operation
webfont-generator copied to clipboard

sfntly conversion failed for font that converts properly with other services

Open onassar opened this issue 6 years ago • 13 comments

Receiving the following when trying to convert the linked-to font, whereas using other online services for font conversion works fine:

java.lang.IndexOutOfBoundsException: Index attempted to be read from is out of bounds: 4e
        at com.google.typography.font.sfntly.data.ReadableFontData.readUByte(Unknown Source)
        at com.google.typography.font.sfntly.data.ReadableFontData.readULong(Unknown Source)
        at com.google.typography.font.sfntly.table.core.OS2Table.ulCodePageRange1(Unknown Source)
        at com.google.typography.font.tools.conversion.eot.EOTWriter.writeCodePages(Unknown Source)
        at com.google.typography.font.tools.conversion.eot.EOTWriter.convert(Unknown Source)
        at ConvertFont$EOTConverter.convert(ConvertFont.java:48)
        at ConvertFont.main(ConvertFont.java:165)
sfntly conversion failed

The font is here: https://expirebox.com/files/3e5d0251583dbef1ab869ae703fc1c36.ttf

onassar avatar Aug 06 '17 14:08 onassar

Reproduced. I've seen this before with one other font too. It looks like it only happens when using sfntly to generate eot, whereas converting to woff works fine.

There must be something about the file that the eot converter doesn't like. I noticed that there's a glyph called glyph135 that doesn't have a Unicode codepoint associated with it.

bdusell avatar Aug 06 '17 18:08 bdusell

I've run into this with a few fonts. Is there any chance you can look into this?

On Sun, Aug 6, 2017 at 2:54 PM Brian DuSell [email protected] wrote:

Reproduced. I've seen this before with one other font too. It looks like it only happens when using sfntly to generate eot, whereas converting to woff works fine.

There must be something about the file that the eot converter doesn't like. I noticed that there's a glyph called glyph135 that doesn't have a Unicode codepoint associated with it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bdusell/webfont-generator/issues/6#issuecomment-320525153, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlaSmvSe6a2t7CkDhpEZHrEDUiLd1BKks5sVgvugaJpZM4OuvcN .

--

— Oliver Nassar

onassar avatar Aug 06 '17 19:08 onassar

Here's another one: https://expirebox.com/download/f4c6df1c1c9c990fc3aa10c8f4b35fe9.html

onassar avatar Aug 07 '17 00:08 onassar

I can take a look at the sfntly code and see if I can't figure out the problem.

bdusell avatar Aug 07 '17 00:08 bdusell

Okay should I keep providing more examples?

onassar avatar Aug 07 '17 00:08 onassar

Actually both positive and negative examples would be helpful.

bdusell avatar Aug 07 '17 00:08 bdusell

Here's a zip of 7 fonts that work without an issue: https://expirebox.com/download/b69233ab7af57c8adde9466f341a6509.html

onassar avatar Aug 07 '17 00:08 onassar

Any progress by chance?

onassar avatar Aug 07 '17 19:08 onassar

Hi -- sorry, I've been busy with other projects and haven't gotten a chance to dig into this yet. TBH I can't make any promises about fixing this in the short term, but any fixes you find would be most appreciated!

bdusell avatar Aug 07 '17 20:08 bdusell

Looks like woff2_compress also fails on this font.

$ ./vendor/woff2/woff2_compress test-out/upld9c1efb9d.ttf 
Processing test-out/upld9c1efb9d.ttf => test-out/upld9c1efb9d.woff2
Parsing of the input font failed.
Compression failed.

Would it be possible to upload that font again? I'm sure the woff2 maintainers would like to know.

bdusell avatar Oct 17 '17 05:10 bdusell

Were you not able to download it? I don't have the original anymore

onassar avatar Oct 17 '17 12:10 onassar

I have the font. May I provide it to them for debugging?

bdusell avatar Oct 17 '17 20:10 bdusell

Could you post it here again? I’d like to see which it is first

On Tue, Oct 17, 2017 at 4:16 PM Brian DuSell [email protected] wrote:

I have the font. May I provide it to them for debugging?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bdusell/webfont-generator/issues/6#issuecomment-337356890, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlaSttyc6eOVNdziKsycMT6HwUa3zKxks5stQsRgaJpZM4OuvcN .

--

— Oliver Nassar

onassar avatar Oct 17 '17 21:10 onassar