Skip to content

Commit

Permalink
avar2 support (#1120)
Browse files Browse the repository at this point in the history
* Add avar2 fields

* Regenerate for avar2

* Add avar2checker (Laurence Penney)

* Test case

* Support avar2 in user_to_normalized

* avar2 support requires alloc

See #1074 (comment)

* Add provenance details for avar2checker

* Unneeded

* Tidy up is_some && unwrap

* Use stack allocation

* Unneeded
  • Loading branch information
simoncozens authored Sep 10, 2024
1 parent 3aa22e6 commit 5780ca0
Show file tree
Hide file tree
Showing 10 changed files with 904 additions and 10 deletions.
2 changes: 2 additions & 0 deletions font-test-data/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ pub static VORG: &[u8] = include_bytes!("../test_data/ttf/vorg.ttf");

pub static AHEM: &[u8] = include_bytes!("../test_data/ttf/ahem.ttf");

pub static AVAR2_CHECKER: &[u8] = include_bytes!("../test_data/ttf/avar2checker.ttf");

pub mod varc {
pub static CJK_6868: &[u8] = include_bytes!("../test_data/ttf/varc-6868.ttf");
pub static CONDITIONALS: &[u8] = include_bytes!("../test_data/ttf/varc-ac01-conditional.ttf");
Expand Down
7 changes: 7 additions & 0 deletions font-test-data/test_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ Describes the provenance, usage and generation procedures for font data used for
pyftsubset NotoSerifTC-Regular.ttf --text=他你們和对就我時来能說这齊军已既是民现理置軍配開露顾个人以你個到大對我時来要说主因想理當着者著过进過還面些你們和她將年情样理說这通即吧呢响师收斷眼间陈除随隨事學將想政新樣沒然现球經起例别动吗增明期物种调费都间田囗
```

* _avar2checker_
* font: avar2 checker
* source: https://github.com/Lorp/fencer/tree/main/src/fonts
* license: [Apache 2][Apache2]
* usage: testing avar2 userspace to normalized coordinate mapping

## rebuilding
To update the binaries and extracted data, run script located at `resources/test_fonts/rebuild.sh`
This script will install the correct version of fonttools and FreeType, and then regenerate
Expand All @@ -74,3 +80,4 @@ somewhere/fontations $ ./resources/test_fonts/rebuild.sh
```

[OFL]: https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
[Apache2]: https://www.apache.org/licenses/LICENSE-2.0
Binary file added font-test-data/test_data/ttf/avar2checker.ttf
Binary file not shown.
Loading

0 comments on commit 5780ca0

Please sign in to comment.