googlefonts/fontations

Various recompilation errors

Opened this issue · 1 comments

I wrote this test program to recompile all tables of a font: https://gist.github.com/madig/221321d2343bfc3f4531511067d6be04.

It does not try all the tables because they don't seem to have to_owned_table() and I haven't yet figured out what to do about it.

Run like:

$ for f in /usr/share/fonts/**/*.ttf
       target/release/mess-with-ot $f
   end

It finds various errors like:

Reading font from: "/usr/share/fonts/google-noto-vf/NotoSans-Italic[wght].ttf"
thread 'main' panicked at src/main.rs:162:14:
Cannot compile table: BuilderError { tag: Tag(GPOS), inner: PackingFailed(Table packing failed with 21 overflows) }

Reading font from: "/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf"
thread 'main' panicked at src/main.rs:162:14:
Cannot compile table: BuilderError { tag: Tag(GPOS), inner: PackingFailed(Table packing failed with 54 overflows) }

Reading font from: "/usr/share/fonts/google-noto-vf/NotoSansEthiopic[wght].ttf"
thread 'main' panicked at src/main.rs:162:14:
Cannot compile table: BuilderError { tag: Tag(GPOS), inner: PackingFailed(Table packing failed with 16592 overflows) }

Reading font from: "/usr/share/fonts/google-noto-vf/NotoSerif-Italic[wght].ttf"
thread 'main' panicked at src/main.rs:162:14:
Cannot compile table: BuilderError { tag: Tag(GPOS), inner: PackingFailed(Table packing failed with 61 overflows) }

Reading font from: "/usr/share/fonts/google-noto-vf/NotoSerif[wght].ttf"
thread 'main' panicked at src/main.rs:162:14:
Cannot compile table: BuilderError { tag: Tag(GPOS), inner: PackingFailed(Table packing failed with 68 overflows) }

Reading font from: "/usr/share/fonts/khmer-os-system-fonts/KhmerOS_sys.ttf"
thread 'main' panicked at src/main.rs:42:14:
Cannot compile table: BuilderError { tag: Tag(name), inner: ValidationFailed(Validation error:
"Unhandled platform/encoding id pair: (1, 20)"
in: Name.name_record[16]
  NameRecord.string

) }
cmyr commented

The last one is a good reminder, there are a number of encodings we do not yet support for name records. That should have an issue.

The others are mildly surprising, and I'll investigate when I have a bit of time. :)