Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the 'kern' table #1192

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions font-test-data/src/kern.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// from https://github.com/fonttools/fonttools/blob/729b3d2960efd3/Tests/ttLib/tables/_k_e_r_n_test.py#L9
#[rustfmt::skip]
pub static KERN_VER_0_FMT_0_DATA: &[u8] = &[
0x00, 0x00, // "0000 " # 0: version=0
0x00, 0x01, // "0001 " # 2: nTables=1
0x00, 0x00, // "0000 " # 4: version=0 (bogus field, unused)
0x00, 0x20, // "0020 " # 6: length=32
0x00, // "00 " # 8: format=0
0x01, // "01 " # 9: coverage=1
0x00, 0x03, // "0003 " # 10: nPairs=3
0x00, 0x0C, // "000C " # 12: searchRange=12
0x00, 0x01, // "0001 " # 14: entrySelector=1
0x00, 0x06, // "0006 " # 16: rangeShift=6
0x00, 0x04, 0x00, 0x0C, 0xFF, 0xD8, // "0004 000C FFD8 " # 18: l=4, r=12, v=-40
0x00, 0x04, 0x00, 0x1C, 0x00, 0x28, // "0004 001C 0028 " # 24: l=4, r=28, v=40
0x00, 0x05, 0x00, 0x28, 0xFF, 0xCE, // "0005 0028 FFCE " # 30: l=5, r=40, v=-50
];
1 change: 1 addition & 0 deletions font-test-data/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pub mod gdef;
pub mod gpos;
pub mod gsub;
pub mod ift;
pub mod kern;
pub mod layout;

pub static CMAP12_FONT1: &[u8] = include_bytes!("../test_data/ttf/cmap12_font1.ttf");
Expand Down
Loading