googlefonts / googlefonts/fontations

Various recompilation errors

Open
#865 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
827
Forks
76
Avg merge
22h 33m
Merged PRs (30d)
75

Description

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:

```fish
$ 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

) }
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked test program and reproduce the failures using the fish loop over the installed TTF files. Inspect the panic at src/main.rs:162 and compare the GPOS packing failures with the name-table validation error. Done means the reported recompilation errors are understood and the affected tables can be recompiled successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.