MFEK / glifparser.rlib

A parser and writer for UFO `.glif` files.
Other
8 stars 6 forks source link

Truncate floating point <advance width=…> values #55

Closed ctrlcctrlv closed 2 years ago

ctrlcctrlv commented 2 years ago

Closes #54 (GitHub). Works around rsms/inter#508 (GitHub).

Test added for №54:

[2022-10-08T11:27:29Z TRACE r#mod::bugfixes::issue54] test_data/bugfixes/issue54.glif
[2022-10-08T11:27:29Z WARN  glifparser::glif::read] Floating point value given as <advance> width — OpenType `hmtx` / `vmtx` will truncate it, so we do too!
[2022-10-08T11:27:29Z DEBUG glifparser::outline] Outline only has corners; Outline<PD> type will treat it as a cubic. 
[2022-10-08T11:27:29Z TRACE r#mod::bugfixes::issue54] test_data/bugfixes/Q_.glif
[2022-10-08T11:27:29Z TRACE glifparser::glif::read] <advance> parsing as int rose ParseIntError { kind: InvalidDigit }
test bugfixes::issue54::test_bug_fixed ... ok