#[macro_use] mod support; use std::collections::BTreeSet; use std::ops::Deref; use font::features::{Component, Sample}; use font::opentype::truetype::Tag; use font::Font; use crate::support::{setup, Fixture}; #[test] fn crimson_text() { let mut file = setup(Fixture::CrimsonText); let entries = extract(&mut file[0]); let entries = entries .iter() .map(|(feature, script, language, lookups)| { ( &**feature, &**script, &**language, lookups.iter().map(Deref::deref).collect::>(), ) }) .collect::>(); #[rustfmt::skip] assert_eq!( entries, [ ( "case", "DFLT", "DFLT", vec![ "[[?, 300, …, 304, 306, …, 30c, 323, 327]]", ], ), ( "case", "latn", "AZE ", vec![ "[[?, 300, …, 304, 306, …, 30c, 323, 327]]", ], ), ( "case", "latn", "CAT ", vec![ "[[?, 300, …, 304, 306, …, 30c, 323, 327]]", ], ), ( "case", "latn", "CRT ", vec![ "[[?, 300, …, 304, 306, …, 30c, 323, 327]]", ], ), ( "case", "latn", "DFLT", vec![ "[[?, 300, …, 304, 306, …, 30c, 323, 327]]", ], ), ( "case", "latn", "KAZ ", vec![ "[[?, 300, …, 304, 306, …, 30c, 323, 327]]", ], ), ( "case", "latn", "MOL ", vec![ "[[?, 300, …, 304, 306, …, 30c, 323, 327]]", ], ), ( "case", "latn", "ROM ", vec![ "[[?, 300, …, 304, 306, …, 30c, 323, 327]]", ], ), ( "case", "latn", "TAT ", vec![ "[[?, 300, …, 304, 306, …, 30c, 323, 327]]", ], ), ( "case", "latn", "TRK ", vec![ "[[?, 300, …, 304, 306, …, 30c, 323, 327]]", ], ), ( "ccmp", "DFLT", "DFLT", vec![ "[[[[i, j], [300–304, 306–30c, 312]]], [[[i, j], [323, 327, 328], [300–304, 306–30c, 312]]], [[[300–304, 306–30c, 323, 327], [300–304, 306–30c, 323, 327]]], [[[A–Z, À–Ö, Ø–Þ, 100, 102, 104, 106, 108, 10a, 10c, 10e, 110, 112, 114, 116, 118, 11a, 11c, 11e, 120, 122, 124, 126, 128, 12a, 12c, 12e, 130, 132, 134, 136, 139, 13b, 13d, 13f, 141, 143, 145, 147, 14a, 14c, 14e, 150, 152, 154, 156, 158, 15a, 15c, 15e, 160, 162, 164, 166, 168, 16a, 16c, 16e, 170, 172, 174, 176, 178, 179, 17b, 17d, 189, 1a0, 1af, 1cd, 1cf, 1d1, 1d3, 1d7, 1d9, 1db, 1e2, 1fc, 1fe, 218, 21a, 232, 1e00, 1e02, 1e04, 1e06, 1e08, 1e0a, 1e0c, 1e0e, 1e10, 1e12, 1e18, 1e1a, 1e1e, 1e20, 1e22, 1e24, 1e26, 1e28, 1e2a, 1e2e, 1e30, 1e32, 1e34, 1e36, 1e38, 1e3a, 1e3c, 1e3e, 1e40, 1e42, 1e44, 1e46, 1e48, 1e4a, 1e4e, 1e54, 1e56, 1e58, 1e5a, 1e5e, 1e60, 1e62, 1e64, 1e66, 1e68, 1e6a, 1e6c, 1e6e, 1e70, 1e72, 1e74, 1e76, 1e7c, 1e7e, 1e80, 1e82, 1e84, 1e86, 1e88, 1e8a, 1e8c, 1e8e, 1e90, 1e92, 1e94, 1ea0, 1ea2, 1ea4, 1ea6, 1ea8, 1eaa, 1eac, 1eae, 1eb0, 1eb2, 1eb4, 1eb6, 1eb8, 1eba, 1ebc, 1ebe, 1ec0, 1ec2, 1ec4, 1ec6, 1ec8, 1eca, 1ecc, 1ece, 1ed0, 1ed2, 1ed4, 1ed6, 1ed8, 1eda, 1edc, 1ede, 1ee0, 1ee2, 1ee4, 1ee6, 1ee8, 1eea, 1eec, 1eee, 1ef0, 1ef2, 1ef4, 1ef6, 1ef8], [300–304, 306–30c, 323, 327]]]]", "[[[[300–304, 306–30c, 323, 327], [f890–f895, f897, f898, f89b–f89d, f89f]], [[f890–f895, f897, f898, f89b–f89d, f89f], [300–304, 306–30c, 323, 327]]]]", "[[13f, fb01, fb02]]", "[[[[302], [300]], [[302], [301]], [[302], [303]], [[302], [309]], [[306], [300]], [[306], [301]], [[306], [303]], [[306], [309]]]]", ], ), ( "ccmp", "latn", "AZE ", vec![ "[[[[i, j], [300–304, 306–30c, 312]]], [[[i, j], [323, 327, 328], [300–304, 306–30c, 312]]], [[[300–304, 306–30c, 323, 327], [300–304, 306–30c, 323, 327]]], [[[A–Z, À–Ö, Ø–Þ, 100, 102, 104, 106, 108, 10a, 10c, 10e, 110, 112, 114, 116, 118, 11a, 11c, 11e, 120, 122, 124, 126, 128, 12a, 12c, 12e, 130, 132, 134, 136, 139, 13b, 13d, 13f, 141, 143, 145, 147, 14a, 14c, 14e, 150, 152, 154, 156, 158, 15a, 15c, 15e, 160, 162, 164, 166, 168, 16a, 16c, 16e, 170, 172, 174, 176, 178, 179, 17b, 17d, 189, 1a0, 1af, 1cd, 1cf, 1d1, 1d3, 1d7, 1d9, 1db, 1e2, 1fc, 1fe, 218, 21a, 232, 1e00, 1e02, 1e04, 1e06, 1e08, 1e0a, 1e0c, 1e0e, 1e10, 1e12, 1e18, 1e1a, 1e1e, 1e20, 1e22, 1e24, 1e26, 1e28, 1e2a, 1e2e, 1e30, 1e32, 1e34, 1e36, 1e38, 1e3a, 1e3c, 1e3e, 1e40, 1e42, 1e44, 1e46, 1e48, 1e4a, 1e4e, 1e54, 1e56, 1e58, 1e5a, 1e5e, 1e60, 1e62, 1e64, 1e66, 1e68, 1e6a, 1e6c, 1e6e, 1e70, 1e72, 1e74, 1e76, 1e7c, 1e7e, 1e80, 1e82, 1e84, 1e86, 1e88, 1e8a, 1e8c, 1e8e, 1e90, 1e92, 1e94, 1ea0, 1ea2, 1ea4, 1ea6, 1ea8, 1eaa, 1eac, 1eae, 1eb0, 1eb2, 1eb4, 1eb6, 1eb8, 1eba, 1ebc, 1ebe, 1ec0, 1ec2, 1ec4, 1ec6, 1ec8, 1eca, 1ecc, 1ece, 1ed0, 1ed2, 1ed4, 1ed6, 1ed8, 1eda, 1edc, 1ede, 1ee0, 1ee2, 1ee4, 1ee6, 1ee8, 1eea, 1eec, 1eee, 1ef0, 1ef2, 1ef4, 1ef6, 1ef8], [300–304, 306–30c, 323, 327]]]]", "[[[[300–304, 306–30c, 323, 327], [f890–f895, f897, f898, f89b–f89d, f89f]], [[f890–f895, f897, f898, f89b–f89d, f89f], [300–304, 306–30c, 323, 327]]]]", "[[13f, fb01, fb02]]", "[[[[302], [300]], [[302], [301]], [[302], [303]], [[302], [309]], [[306], [300]], [[306], [301]], [[306], [303]], [[306], [309]]]]", ], ), ( "ccmp", "latn", "CAT ", vec![ "[[[[i, j], [300–304, 306–30c, 312]]], [[[i, j], [323, 327, 328], [300–304, 306–30c, 312]]], [[[300–304, 306–30c, 323, 327], [300–304, 306–30c, 323, 327]]], [[[A–Z, À–Ö, Ø–Þ, 100, 102, 104, 106, 108, 10a, 10c, 10e, 110, 112, 114, 116, 118, 11a, 11c, 11e, 120, 122, 124, 126, 128, 12a, 12c, 12e, 130, 132, 134, 136, 139, 13b, 13d, 13f, 141, 143, 145, 147, 14a, 14c, 14e, 150, 152, 154, 156, 158, 15a, 15c, 15e, 160, 162, 164, 166, 168, 16a, 16c, 16e, 170, 172, 174, 176, 178, 179, 17b, 17d, 189, 1a0, 1af, 1cd, 1cf, 1d1, 1d3, 1d7, 1d9, 1db, 1e2, 1fc, 1fe, 218, 21a, 232, 1e00, 1e02, 1e04, 1e06, 1e08, 1e0a, 1e0c, 1e0e, 1e10, 1e12, 1e18, 1e1a, 1e1e, 1e20, 1e22, 1e24, 1e26, 1e28, 1e2a, 1e2e, 1e30, 1e32, 1e34, 1e36, 1e38, 1e3a, 1e3c, 1e3e, 1e40, 1e42, 1e44, 1e46, 1e48, 1e4a, 1e4e, 1e54, 1e56, 1e58, 1e5a, 1e5e, 1e60, 1e62, 1e64, 1e66, 1e68, 1e6a, 1e6c, 1e6e, 1e70, 1e72, 1e74, 1e76, 1e7c, 1e7e, 1e80, 1e82, 1e84, 1e86, 1e88, 1e8a, 1e8c, 1e8e, 1e90, 1e92, 1e94, 1ea0, 1ea2, 1ea4, 1ea6, 1ea8, 1eaa, 1eac, 1eae, 1eb0, 1eb2, 1eb4, 1eb6, 1eb8, 1eba, 1ebc, 1ebe, 1ec0, 1ec2, 1ec4, 1ec6, 1ec8, 1eca, 1ecc, 1ece, 1ed0, 1ed2, 1ed4, 1ed6, 1ed8, 1eda, 1edc, 1ede, 1ee0, 1ee2, 1ee4, 1ee6, 1ee8, 1eea, 1eec, 1eee, 1ef0, 1ef2, 1ef4, 1ef6, 1ef8], [300–304, 306–30c, 323, 327]]]]", "[[[[300–304, 306–30c, 323, 327], [f890–f895, f897, f898, f89b–f89d, f89f]], [[f890–f895, f897, f898, f89b–f89d, f89f], [300–304, 306–30c, 323, 327]]]]", "[[13f, fb01, fb02]]", "[[[[302], [300]], [[302], [301]], [[302], [303]], [[302], [309]], [[306], [300]], [[306], [301]], [[306], [303]], [[306], [309]]]]", ], ), ( "ccmp", "latn", "CRT ", vec![ "[[[[i, j], [300–304, 306–30c, 312]]], [[[i, j], [323, 327, 328], [300–304, 306–30c, 312]]], [[[300–304, 306–30c, 323, 327], [300–304, 306–30c, 323, 327]]], [[[A–Z, À–Ö, Ø–Þ, 100, 102, 104, 106, 108, 10a, 10c, 10e, 110, 112, 114, 116, 118, 11a, 11c, 11e, 120, 122, 124, 126, 128, 12a, 12c, 12e, 130, 132, 134, 136, 139, 13b, 13d, 13f, 141, 143, 145, 147, 14a, 14c, 14e, 150, 152, 154, 156, 158, 15a, 15c, 15e, 160, 162, 164, 166, 168, 16a, 16c, 16e, 170, 172, 174, 176, 178, 179, 17b, 17d, 189, 1a0, 1af, 1cd, 1cf, 1d1, 1d3, 1d7, 1d9, 1db, 1e2, 1fc, 1fe, 218, 21a, 232, 1e00, 1e02, 1e04, 1e06, 1e08, 1e0a, 1e0c, 1e0e, 1e10, 1e12, 1e18, 1e1a, 1e1e, 1e20, 1e22, 1e24, 1e26, 1e28, 1e2a, 1e2e, 1e30, 1e32, 1e34, 1e36, 1e38, 1e3a, 1e3c, 1e3e, 1e40, 1e42, 1e44, 1e46, 1e48, 1e4a, 1e4e, 1e54, 1e56, 1e58, 1e5a, 1e5e, 1e60, 1e62, 1e64, 1e66, 1e68, 1e6a, 1e6c, 1e6e, 1e70, 1e72, 1e74, 1e76, 1e7c, 1e7e, 1e80, 1e82, 1e84, 1e86, 1e88, 1e8a, 1e8c, 1e8e, 1e90, 1e92, 1e94, 1ea0, 1ea2, 1ea4, 1ea6, 1ea8, 1eaa, 1eac, 1eae, 1eb0, 1eb2, 1eb4, 1eb6, 1eb8, 1eba, 1ebc, 1ebe, 1ec0, 1ec2, 1ec4, 1ec6, 1ec8, 1eca, 1ecc, 1ece, 1ed0, 1ed2, 1ed4, 1ed6, 1ed8, 1eda, 1edc, 1ede, 1ee0, 1ee2, 1ee4, 1ee6, 1ee8, 1eea, 1eec, 1eee, 1ef0, 1ef2, 1ef4, 1ef6, 1ef8], [300–304, 306–30c, 323, 327]]]]", "[[[[300–304, 306–30c, 323, 327], [f890–f895, f897, f898, f89b–f89d, f89f]], [[f890–f895, f897, f898, f89b–f89d, f89f], [300–304, 306–30c, 323, 327]]]]", "[[13f, fb01, fb02]]", "[[[[302], [300]], [[302], [301]], [[302], [303]], [[302], [309]], [[306], [300]], [[306], [301]], [[306], [303]], [[306], [309]]]]", ], ), ( "ccmp", "latn", "DFLT", vec![ "[[[[i, j], [300–304, 306–30c, 312]]], [[[i, j], [323, 327, 328], [300–304, 306–30c, 312]]], [[[300–304, 306–30c, 323, 327], [300–304, 306–30c, 323, 327]]], [[[A–Z, À–Ö, Ø–Þ, 100, 102, 104, 106, 108, 10a, 10c, 10e, 110, 112, 114, 116, 118, 11a, 11c, 11e, 120, 122, 124, 126, 128, 12a, 12c, 12e, 130, 132, 134, 136, 139, 13b, 13d, 13f, 141, 143, 145, 147, 14a, 14c, 14e, 150, 152, 154, 156, 158, 15a, 15c, 15e, 160, 162, 164, 166, 168, 16a, 16c, 16e, 170, 172, 174, 176, 178, 179, 17b, 17d, 189, 1a0, 1af, 1cd, 1cf, 1d1, 1d3, 1d7, 1d9, 1db, 1e2, 1fc, 1fe, 218, 21a, 232, 1e00, 1e02, 1e04, 1e06, 1e08, 1e0a, 1e0c, 1e0e, 1e10, 1e12, 1e18, 1e1a, 1e1e, 1e20, 1e22, 1e24, 1e26, 1e28, 1e2a, 1e2e, 1e30, 1e32, 1e34, 1e36, 1e38, 1e3a, 1e3c, 1e3e, 1e40, 1e42, 1e44, 1e46, 1e48, 1e4a, 1e4e, 1e54, 1e56, 1e58, 1e5a, 1e5e, 1e60, 1e62, 1e64, 1e66, 1e68, 1e6a, 1e6c, 1e6e, 1e70, 1e72, 1e74, 1e76, 1e7c, 1e7e, 1e80, 1e82, 1e84, 1e86, 1e88, 1e8a, 1e8c, 1e8e, 1e90, 1e92, 1e94, 1ea0, 1ea2, 1ea4, 1ea6, 1ea8, 1eaa, 1eac, 1eae, 1eb0, 1eb2, 1eb4, 1eb6, 1eb8, 1eba, 1ebc, 1ebe, 1ec0, 1ec2, 1ec4, 1ec6, 1ec8, 1eca, 1ecc, 1ece, 1ed0, 1ed2, 1ed4, 1ed6, 1ed8, 1eda, 1edc, 1ede, 1ee0, 1ee2, 1ee4, 1ee6, 1ee8, 1eea, 1eec, 1eee, 1ef0, 1ef2, 1ef4, 1ef6, 1ef8], [300–304, 306–30c, 323, 327]]]]", "[[[[300–304, 306–30c, 323, 327], [f890–f895, f897, f898, f89b–f89d, f89f]], [[f890–f895, f897, f898, f89b–f89d, f89f], [300–304, 306–30c, 323, 327]]]]", "[[13f, fb01, fb02]]", "[[[[302], [300]], [[302], [301]], [[302], [303]], [[302], [309]], [[306], [300]], [[306], [301]], [[306], [303]], [[306], [309]]]]", "[[13f, fb01, fb02]]", "[[[[302], [300]], [[302], [301]], [[302], [303]], [[302], [309]], [[306], [300]], [[306], [301]], [[306], [303]], [[306], [309]]]]", ], ), ( "ccmp", "latn", "KAZ ", vec![ "[[[[i, j], [300–304, 306–30c, 312]]], [[[i, j], [323, 327, 328], [300–304, 306–30c, 312]]], [[[300–304, 306–30c, 323, 327], [300–304, 306–30c, 323, 327]]], [[[A–Z, À–Ö, Ø–Þ, 100, 102, 104, 106, 108, 10a, 10c, 10e, 110, 112, 114, 116, 118, 11a, 11c, 11e, 120, 122, 124, 126, 128, 12a, 12c, 12e, 130, 132, 134, 136, 139, 13b, 13d, 13f, 141, 143, 145, 147, 14a, 14c, 14e, 150, 152, 154, 156, 158, 15a, 15c, 15e, 160, 162, 164, 166, 168, 16a, 16c, 16e, 170, 172, 174, 176, 178, 179, 17b, 17d, 189, 1a0, 1af, 1cd, 1cf, 1d1, 1d3, 1d7, 1d9, 1db, 1e2, 1fc, 1fe, 218, 21a, 232, 1e00, 1e02, 1e04, 1e06, 1e08, 1e0a, 1e0c, 1e0e, 1e10, 1e12, 1e18, 1e1a, 1e1e, 1e20, 1e22, 1e24, 1e26, 1e28, 1e2a, 1e2e, 1e30, 1e32, 1e34, 1e36, 1e38, 1e3a, 1e3c, 1e3e, 1e40, 1e42, 1e44, 1e46, 1e48, 1e4a, 1e4e, 1e54, 1e56, 1e58, 1e5a, 1e5e, 1e60, 1e62, 1e64, 1e66, 1e68, 1e6a, 1e6c, 1e6e, 1e70, 1e72, 1e74, 1e76, 1e7c, 1e7e, 1e80, 1e82, 1e84, 1e86, 1e88, 1e8a, 1e8c, 1e8e, 1e90, 1e92, 1e94, 1ea0, 1ea2, 1ea4, 1ea6, 1ea8, 1eaa, 1eac, 1eae, 1eb0, 1eb2, 1eb4, 1eb6, 1eb8, 1eba, 1ebc, 1ebe, 1ec0, 1ec2, 1ec4, 1ec6, 1ec8, 1eca, 1ecc, 1ece, 1ed0, 1ed2, 1ed4, 1ed6, 1ed8, 1eda, 1edc, 1ede, 1ee0, 1ee2, 1ee4, 1ee6, 1ee8, 1eea, 1eec, 1eee, 1ef0, 1ef2, 1ef4, 1ef6, 1ef8], [300–304, 306–30c, 323, 327]]]]", "[[[[300–304, 306–30c, 323, 327], [f890–f895, f897, f898, f89b–f89d, f89f]], [[f890–f895, f897, f898, f89b–f89d, f89f], [300–304, 306–30c, 323, 327]]]]", "[[13f, fb01, fb02]]", "[[[[302], [300]], [[302], [301]], [[302], [303]], [[302], [309]], [[306], [300]], [[306], [301]], [[306], [303]], [[306], [309]]]]", ], ), ( "ccmp", "latn", "MOL ", vec![ "[[[[i, j], [300–304, 306–30c, 312]]], [[[i, j], [323, 327, 328], [300–304, 306–30c, 312]]], [[[300–304, 306–30c, 323, 327], [300–304, 306–30c, 323, 327]]], [[[A–Z, À–Ö, Ø–Þ, 100, 102, 104, 106, 108, 10a, 10c, 10e, 110, 112, 114, 116, 118, 11a, 11c, 11e, 120, 122, 124, 126, 128, 12a, 12c, 12e, 130, 132, 134, 136, 139, 13b, 13d, 13f, 141, 143, 145, 147, 14a, 14c, 14e, 150, 152, 154, 156, 158, 15a, 15c, 15e, 160, 162, 164, 166, 168, 16a, 16c, 16e, 170, 172, 174, 176, 178, 179, 17b, 17d, 189, 1a0, 1af, 1cd, 1cf, 1d1, 1d3, 1d7, 1d9, 1db, 1e2, 1fc, 1fe, 218, 21a, 232, 1e00, 1e02, 1e04, 1e06, 1e08, 1e0a, 1e0c, 1e0e, 1e10, 1e12, 1e18, 1e1a, 1e1e, 1e20, 1e22, 1e24, 1e26, 1e28, 1e2a, 1e2e, 1e30, 1e32, 1e34, 1e36, 1e38, 1e3a, 1e3c, 1e3e, 1e40, 1e42, 1e44, 1e46, 1e48, 1e4a, 1e4e, 1e54, 1e56, 1e58, 1e5a, 1e5e, 1e60, 1e62, 1e64, 1e66, 1e68, 1e6a, 1e6c, 1e6e, 1e70, 1e72, 1e74, 1e76, 1e7c, 1e7e, 1e80, 1e82, 1e84, 1e86, 1e88, 1e8a, 1e8c, 1e8e, 1e90, 1e92, 1e94, 1ea0, 1ea2, 1ea4, 1ea6, 1ea8, 1eaa, 1eac, 1eae, 1eb0, 1eb2, 1eb4, 1eb6, 1eb8, 1eba, 1ebc, 1ebe, 1ec0, 1ec2, 1ec4, 1ec6, 1ec8, 1eca, 1ecc, 1ece, 1ed0, 1ed2, 1ed4, 1ed6, 1ed8, 1eda, 1edc, 1ede, 1ee0, 1ee2, 1ee4, 1ee6, 1ee8, 1eea, 1eec, 1eee, 1ef0, 1ef2, 1ef4, 1ef6, 1ef8], [300–304, 306–30c, 323, 327]]]]", "[[[[300–304, 306–30c, 323, 327], [f890–f895, f897, f898, f89b–f89d, f89f]], [[f890–f895, f897, f898, f89b–f89d, f89f], [300–304, 306–30c, 323, 327]]]]", "[[13f, fb01, fb02]]", "[[[[302], [300]], [[302], [301]], [[302], [303]], [[302], [309]], [[306], [300]], [[306], [301]], [[306], [303]], [[306], [309]]]]", ], ), ( "ccmp", "latn", "ROM ", vec![ "[[[[i, j], [300–304, 306–30c, 312]]], [[[i, j], [323, 327, 328], [300–304, 306–30c, 312]]], [[[300–304, 306–30c, 323, 327], [300–304, 306–30c, 323, 327]]], [[[A–Z, À–Ö, Ø–Þ, 100, 102, 104, 106, 108, 10a, 10c, 10e, 110, 112, 114, 116, 118, 11a, 11c, 11e, 120, 122, 124, 126, 128, 12a, 12c, 12e, 130, 132, 134, 136, 139, 13b, 13d, 13f, 141, 143, 145, 147, 14a, 14c, 14e, 150, 152, 154, 156, 158, 15a, 15c, 15e, 160, 162, 164, 166, 168, 16a, 16c, 16e, 170, 172, 174, 176, 178, 179, 17b, 17d, 189, 1a0, 1af, 1cd, 1cf, 1d1, 1d3, 1d7, 1d9, 1db, 1e2, 1fc, 1fe, 218, 21a, 232, 1e00, 1e02, 1e04, 1e06, 1e08, 1e0a, 1e0c, 1e0e, 1e10, 1e12, 1e18, 1e1a, 1e1e, 1e20, 1e22, 1e24, 1e26, 1e28, 1e2a, 1e2e, 1e30, 1e32, 1e34, 1e36, 1e38, 1e3a, 1e3c, 1e3e, 1e40, 1e42, 1e44, 1e46, 1e48, 1e4a, 1e4e, 1e54, 1e56, 1e58, 1e5a, 1e5e, 1e60, 1e62, 1e64, 1e66, 1e68, 1e6a, 1e6c, 1e6e, 1e70, 1e72, 1e74, 1e76, 1e7c, 1e7e, 1e80, 1e82, 1e84, 1e86, 1e88, 1e8a, 1e8c, 1e8e, 1e90, 1e92, 1e94, 1ea0, 1ea2, 1ea4, 1ea6, 1ea8, 1eaa, 1eac, 1eae, 1eb0, 1eb2, 1eb4, 1eb6, 1eb8, 1eba, 1ebc, 1ebe, 1ec0, 1ec2, 1ec4, 1ec6, 1ec8, 1eca, 1ecc, 1ece, 1ed0, 1ed2, 1ed4, 1ed6, 1ed8, 1eda, 1edc, 1ede, 1ee0, 1ee2, 1ee4, 1ee6, 1ee8, 1eea, 1eec, 1eee, 1ef0, 1ef2, 1ef4, 1ef6, 1ef8], [300–304, 306–30c, 323, 327]]]]", "[[[[300–304, 306–30c, 323, 327], [f890–f895, f897, f898, f89b–f89d, f89f]], [[f890–f895, f897, f898, f89b–f89d, f89f], [300–304, 306–30c, 323, 327]]]]", "[[13f, fb01, fb02]]", "[[[[302], [300]], [[302], [301]], [[302], [303]], [[302], [309]], [[306], [300]], [[306], [301]], [[306], [303]], [[306], [309]]]]", ], ), ( "ccmp", "latn", "TAT ", vec![ "[[[[i, j], [300–304, 306–30c, 312]]], [[[i, j], [323, 327, 328], [300–304, 306–30c, 312]]], [[[300–304, 306–30c, 323, 327], [300–304, 306–30c, 323, 327]]], [[[A–Z, À–Ö, Ø–Þ, 100, 102, 104, 106, 108, 10a, 10c, 10e, 110, 112, 114, 116, 118, 11a, 11c, 11e, 120, 122, 124, 126, 128, 12a, 12c, 12e, 130, 132, 134, 136, 139, 13b, 13d, 13f, 141, 143, 145, 147, 14a, 14c, 14e, 150, 152, 154, 156, 158, 15a, 15c, 15e, 160, 162, 164, 166, 168, 16a, 16c, 16e, 170, 172, 174, 176, 178, 179, 17b, 17d, 189, 1a0, 1af, 1cd, 1cf, 1d1, 1d3, 1d7, 1d9, 1db, 1e2, 1fc, 1fe, 218, 21a, 232, 1e00, 1e02, 1e04, 1e06, 1e08, 1e0a, 1e0c, 1e0e, 1e10, 1e12, 1e18, 1e1a, 1e1e, 1e20, 1e22, 1e24, 1e26, 1e28, 1e2a, 1e2e, 1e30, 1e32, 1e34, 1e36, 1e38, 1e3a, 1e3c, 1e3e, 1e40, 1e42, 1e44, 1e46, 1e48, 1e4a, 1e4e, 1e54, 1e56, 1e58, 1e5a, 1e5e, 1e60, 1e62, 1e64, 1e66, 1e68, 1e6a, 1e6c, 1e6e, 1e70, 1e72, 1e74, 1e76, 1e7c, 1e7e, 1e80, 1e82, 1e84, 1e86, 1e88, 1e8a, 1e8c, 1e8e, 1e90, 1e92, 1e94, 1ea0, 1ea2, 1ea4, 1ea6, 1ea8, 1eaa, 1eac, 1eae, 1eb0, 1eb2, 1eb4, 1eb6, 1eb8, 1eba, 1ebc, 1ebe, 1ec0, 1ec2, 1ec4, 1ec6, 1ec8, 1eca, 1ecc, 1ece, 1ed0, 1ed2, 1ed4, 1ed6, 1ed8, 1eda, 1edc, 1ede, 1ee0, 1ee2, 1ee4, 1ee6, 1ee8, 1eea, 1eec, 1eee, 1ef0, 1ef2, 1ef4, 1ef6, 1ef8], [300–304, 306–30c, 323, 327]]]]", "[[[[300–304, 306–30c, 323, 327], [f890–f895, f897, f898, f89b–f89d, f89f]], [[f890–f895, f897, f898, f89b–f89d, f89f], [300–304, 306–30c, 323, 327]]]]", "[[13f, fb01, fb02]]", "[[[[302], [300]], [[302], [301]], [[302], [303]], [[302], [309]], [[306], [300]], [[306], [301]], [[306], [303]], [[306], [309]]]]", ], ), ( "ccmp", "latn", "TRK ", vec![ "[[[[i, j], [300–304, 306–30c, 312]]], [[[i, j], [323, 327, 328], [300–304, 306–30c, 312]]], [[[300–304, 306–30c, 323, 327], [300–304, 306–30c, 323, 327]]], [[[A–Z, À–Ö, Ø–Þ, 100, 102, 104, 106, 108, 10a, 10c, 10e, 110, 112, 114, 116, 118, 11a, 11c, 11e, 120, 122, 124, 126, 128, 12a, 12c, 12e, 130, 132, 134, 136, 139, 13b, 13d, 13f, 141, 143, 145, 147, 14a, 14c, 14e, 150, 152, 154, 156, 158, 15a, 15c, 15e, 160, 162, 164, 166, 168, 16a, 16c, 16e, 170, 172, 174, 176, 178, 179, 17b, 17d, 189, 1a0, 1af, 1cd, 1cf, 1d1, 1d3, 1d7, 1d9, 1db, 1e2, 1fc, 1fe, 218, 21a, 232, 1e00, 1e02, 1e04, 1e06, 1e08, 1e0a, 1e0c, 1e0e, 1e10, 1e12, 1e18, 1e1a, 1e1e, 1e20, 1e22, 1e24, 1e26, 1e28, 1e2a, 1e2e, 1e30, 1e32, 1e34, 1e36, 1e38, 1e3a, 1e3c, 1e3e, 1e40, 1e42, 1e44, 1e46, 1e48, 1e4a, 1e4e, 1e54, 1e56, 1e58, 1e5a, 1e5e, 1e60, 1e62, 1e64, 1e66, 1e68, 1e6a, 1e6c, 1e6e, 1e70, 1e72, 1e74, 1e76, 1e7c, 1e7e, 1e80, 1e82, 1e84, 1e86, 1e88, 1e8a, 1e8c, 1e8e, 1e90, 1e92, 1e94, 1ea0, 1ea2, 1ea4, 1ea6, 1ea8, 1eaa, 1eac, 1eae, 1eb0, 1eb2, 1eb4, 1eb6, 1eb8, 1eba, 1ebc, 1ebe, 1ec0, 1ec2, 1ec4, 1ec6, 1ec8, 1eca, 1ecc, 1ece, 1ed0, 1ed2, 1ed4, 1ed6, 1ed8, 1eda, 1edc, 1ede, 1ee0, 1ee2, 1ee4, 1ee6, 1ee8, 1eea, 1eec, 1eee, 1ef0, 1ef2, 1ef4, 1ef6, 1ef8], [300–304, 306–30c, 323, 327]]]]", "[[[[300–304, 306–30c, 323, 327], [f890–f895, f897, f898, f89b–f89d, f89f]], [[f890–f895, f897, f898, f89b–f89d, f89f], [300–304, 306–30c, 323, 327]]]]", "[[13f, fb01, fb02]]", "[[[[302], [300]], [[302], [301]], [[302], [303]], [[302], [309]], [[306], [300]], [[306], [301]], [[306], [303]], [[306], [309]]]]", ], ), ( "dlig", "DFLT", "DFLT", vec![ "[[[[T], [h]], [[f], [b]], [[f], [f], [b]], [[f], [f], [h]], [[f], [f], [j]], [[f], [f], [k]], [[f], [h]], [[f], [j]], [[f], [k]]]]", ], ), ( "dlig", "latn", "AZE ", vec![ "[[[[T], [h]], [[f], [b]], [[f], [f], [b]], [[f], [f], [h]], [[f], [f], [j]], [[f], [f], [k]], [[f], [h]], [[f], [j]], [[f], [k]]]]", ], ), ( "dlig", "latn", "CAT ", vec![ "[[[[T], [h]], [[f], [b]], [[f], [f], [b]], [[f], [f], [h]], [[f], [f], [j]], [[f], [f], [k]], [[f], [h]], [[f], [j]], [[f], [k]]]]", ], ), ( "dlig", "latn", "CRT ", vec![ "[[[[T], [h]], [[f], [b]], [[f], [f], [b]], [[f], [f], [h]], [[f], [f], [j]], [[f], [f], [k]], [[f], [h]], [[f], [j]], [[f], [k]]]]", ], ), ( "dlig", "latn", "DFLT", vec![ "[[[[T], [h]], [[f], [b]], [[f], [f], [b]], [[f], [f], [h]], [[f], [f], [j]], [[f], [f], [k]], [[f], [h]], [[f], [j]], [[f], [k]]]]", ], ), ( "dlig", "latn", "KAZ ", vec![ "[[[[T], [h]], [[f], [b]], [[f], [f], [b]], [[f], [f], [h]], [[f], [f], [j]], [[f], [f], [k]], [[f], [h]], [[f], [j]], [[f], [k]]]]", ], ), ( "dlig", "latn", "MOL ", vec![ "[[[[T], [h]], [[f], [b]], [[f], [f], [b]], [[f], [f], [h]], [[f], [f], [j]], [[f], [f], [k]], [[f], [h]], [[f], [j]], [[f], [k]]]]", ], ), ( "dlig", "latn", "ROM ", vec![ "[[[[T], [h]], [[f], [b]], [[f], [f], [b]], [[f], [f], [h]], [[f], [f], [j]], [[f], [f], [k]], [[f], [h]], [[f], [j]], [[f], [k]]]]", ], ), ( "dlig", "latn", "TAT ", vec![ "[[[[T], [h]], [[f], [b]], [[f], [f], [b]], [[f], [f], [h]], [[f], [f], [j]], [[f], [f], [k]], [[f], [h]], [[f], [j]], [[f], [k]]]]", ], ), ( "dlig", "latn", "TRK ", vec![ "[[[[T], [h]], [[f], [b]], [[f], [f], [b]], [[f], [f], [h]], [[f], [f], [j]], [[f], [f], [k]], [[f], [h]], [[f], [j]], [[f], [k]]]]", ], ), ( "dnom", "DFLT", "DFLT", vec![ "[[0, …, 4]]", ], ), ( "dnom", "latn", "AZE ", vec![ "[[0, …, 4]]", ], ), ( "dnom", "latn", "CAT ", vec![ "[[0, …, 4]]", ], ), ( "dnom", "latn", "CRT ", vec![ "[[0, …, 4]]", ], ), ( "dnom", "latn", "DFLT", vec![ "[[0, …, 4]]", ], ), ( "dnom", "latn", "KAZ ", vec![ "[[0, …, 4]]", ], ), ( "dnom", "latn", "MOL ", vec![ "[[0, …, 4]]", ], ), ( "dnom", "latn", "ROM ", vec![ "[[0, …, 4]]", ], ), ( "dnom", "latn", "TAT ", vec![ "[[0, …, 4]]", ], ), ( "dnom", "latn", "TRK ", vec![ "[[0, …, 4]]", ], ), ( "frac", "DFLT", "DFLT", vec![ "[[[[1], [/], [2]], [[1], [/], [4]], [[3], [/], [4]]]]", ], ), ( "frac", "latn", "AZE ", vec![ "[[[[1], [/], [2]], [[1], [/], [4]], [[3], [/], [4]]]]", ], ), ( "frac", "latn", "CAT ", vec![ "[[[[1], [/], [2]], [[1], [/], [4]], [[3], [/], [4]]]]", ], ), ( "frac", "latn", "CRT ", vec![ "[[[[1], [/], [2]], [[1], [/], [4]], [[3], [/], [4]]]]", ], ), ( "frac", "latn", "DFLT", vec![ "[[[[1], [/], [2]], [[1], [/], [4]], [[3], [/], [4]]]]", ], ), ( "frac", "latn", "KAZ ", vec![ "[[[[1], [/], [2]], [[1], [/], [4]], [[3], [/], [4]]]]", ], ), ( "frac", "latn", "MOL ", vec![ "[[[[1], [/], [2]], [[1], [/], [4]], [[3], [/], [4]]]]", ], ), ( "frac", "latn", "ROM ", vec![ "[[[[1], [/], [2]], [[1], [/], [4]], [[3], [/], [4]]]]", ], ), ( "frac", "latn", "TAT ", vec![ "[[[[1], [/], [2]], [[1], [/], [4]], [[3], [/], [4]]]]", ], ), ( "frac", "latn", "TRK ", vec![ "[[[[1], [/], [2]], [[1], [/], [4]], [[3], [/], [4]]]]", ], ), ( "kern", "DFLT", "DFLT", vec![ "[?, ?]", ], ), ( "kern", "latn", "DFLT", vec![ "[?, ?]", ], ), ( "liga", "DFLT", "DFLT", vec![ "[[[[f], [f]], [[f], [f], [i]], [[f], [f], [l]], [[f], [i]], [[f], [l]]]]", ], ), ( "liga", "latn", "AZE ", vec![ "[[[[f], [f]], [[f], [f], [i]], [[f], [f], [l]], [[f], [i]], [[f], [l]]]]", ], ), ( "liga", "latn", "CAT ", vec![ "[[[[f], [f]], [[f], [f], [i]], [[f], [f], [l]], [[f], [i]], [[f], [l]]]]", ], ), ( "liga", "latn", "CRT ", vec![ "[[[[f], [f]], [[f], [f], [i]], [[f], [f], [l]], [[f], [i]], [[f], [l]]]]", ], ), ( "liga", "latn", "DFLT", vec![ "[[[[f], [f]], [[f], [f], [i]], [[f], [f], [l]], [[f], [i]], [[f], [l]]]]", ], ), ( "liga", "latn", "KAZ ", vec![ "[[[[f], [f]], [[f], [f], [i]], [[f], [f], [l]], [[f], [i]], [[f], [l]]]]", ], ), ( "liga", "latn", "MOL ", vec![ "[[[[f], [f]], [[f], [f], [i]], [[f], [f], [l]], [[f], [i]], [[f], [l]]]]", ], ), ( "liga", "latn", "ROM ", vec![ "[[[[f], [f]], [[f], [f], [i]], [[f], [f], [l]], [[f], [i]], [[f], [l]]]]", ], ), ( "liga", "latn", "TAT ", vec![ "[[[[f], [f]], [[f], [f], [i]], [[f], [f], [l]], [[f], [i]], [[f], [l]]]]", ], ), ( "liga", "latn", "TRK ", vec![ "[[[[f], [f]], [[f], [f], [i]], [[f], [f], [l]], [[f], [i]], [[f], [l]]]]", ], ), ( "locl", "latn", "AZE ", vec![ "[[i]]", ], ), ( "locl", "latn", "CAT ", vec![ "[[[[L], [·], [L]], [[l], [·], [l]]]]", ], ), ( "locl", "latn", "CRT ", vec![ "[[i]]", ], ), ( "locl", "latn", "KAZ ", vec![ "[[i]]", ], ), ( "locl", "latn", "MOL ", vec![ "[[15e, 15f, 162, 163]]", ], ), ( "locl", "latn", "ROM ", vec![ "[[15e, 15f, 162, 163]]", ], ), ( "locl", "latn", "TAT ", vec![ "[[i]]", ], ), ( "locl", "latn", "TRK ", vec![ "[[i]]", ], ), ( "mark", "DFLT", "DFLT", vec![ "[?]", "[?]", ], ), ( "mark", "latn", "DFLT", vec![ "[?]", "[?]", ], ), ( "mkmk", "DFLT", "DFLT", vec![ "[?]", "[?]", ], ), ( "mkmk", "latn", "DFLT", vec![ "[?]", "[?]", ], ), ( "numr", "DFLT", "DFLT", vec![ "[[0, …, 4]]", ], ), ( "numr", "latn", "AZE ", vec![ "[[0, …, 4]]", ], ), ( "numr", "latn", "CAT ", vec![ "[[0, …, 4]]", ], ), ( "numr", "latn", "CRT ", vec![ "[[0, …, 4]]", ], ), ( "numr", "latn", "DFLT", vec![ "[[0, …, 4]]", ], ), ( "numr", "latn", "KAZ ", vec![ "[[0, …, 4]]", ], ), ( "numr", "latn", "MOL ", vec![ "[[0, …, 4]]", ], ), ( "numr", "latn", "ROM ", vec![ "[[0, …, 4]]", ], ), ( "numr", "latn", "TAT ", vec![ "[[0, …, 4]]", ], ), ( "numr", "latn", "TRK ", vec![ "[[0, …, 4]]", ], ), ( "sinf", "DFLT", "DFLT", vec![ "[[0, …, 4]]", ], ), ( "sinf", "latn", "AZE ", vec![ "[[0, …, 4]]", ], ), ( "sinf", "latn", "CAT ", vec![ "[[0, …, 4]]", ], ), ( "sinf", "latn", "CRT ", vec![ "[[0, …, 4]]", ], ), ( "sinf", "latn", "DFLT", vec![ "[[0, …, 4]]", ], ), ( "sinf", "latn", "KAZ ", vec![ "[[0, …, 4]]", ], ), ( "sinf", "latn", "MOL ", vec![ "[[0, …, 4]]", ], ), ( "sinf", "latn", "ROM ", vec![ "[[0, …, 4]]", ], ), ( "sinf", "latn", "TAT ", vec![ "[[0, …, 4]]", ], ), ( "sinf", "latn", "TRK ", vec![ "[[0, …, 4]]", ], ), ( "subs", "DFLT", "DFLT", vec![ "[[0, …, 4]]", ], ), ( "subs", "latn", "AZE ", vec![ "[[0, …, 4]]", ], ), ( "subs", "latn", "CAT ", vec![ "[[0, …, 4]]", ], ), ( "subs", "latn", "CRT ", vec![ "[[0, …, 4]]", ], ), ( "subs", "latn", "DFLT", vec![ "[[0, …, 4]]", ], ), ( "subs", "latn", "KAZ ", vec![ "[[0, …, 4]]", ], ), ( "subs", "latn", "MOL ", vec![ "[[0, …, 4]]", ], ), ( "subs", "latn", "ROM ", vec![ "[[0, …, 4]]", ], ), ( "subs", "latn", "TAT ", vec![ "[[0, …, 4]]", ], ), ( "subs", "latn", "TRK ", vec![ "[[0, …, 4]]", ], ), ( "sups", "DFLT", "DFLT", vec![ "[[0, …, 4]]", ], ), ( "sups", "latn", "AZE ", vec![ "[[0, …, 4]]", ], ), ( "sups", "latn", "CAT ", vec![ "[[0, …, 4]]", ], ), ( "sups", "latn", "CRT ", vec![ "[[0, …, 4]]", ], ), ( "sups", "latn", "DFLT", vec![ "[[0, …, 4]]", ], ), ( "sups", "latn", "KAZ ", vec![ "[[0, …, 4]]", ], ), ( "sups", "latn", "MOL ", vec![ "[[0, …, 4]]", ], ), ( "sups", "latn", "ROM ", vec![ "[[0, …, 4]]", ], ), ( "sups", "latn", "TAT ", vec![ "[[0, …, 4]]", ], ), ( "sups", "latn", "TRK ", vec![ "[[0, …, 4]]", ], ), ( "zero", "DFLT", "DFLT", vec![ "[[0]]", ], ), ( "zero", "latn", "AZE ", vec![ "[[0]]", ], ), ( "zero", "latn", "CAT ", vec![ "[[0]]", ], ), ( "zero", "latn", "CRT ", vec![ "[[0]]", ], ), ( "zero", "latn", "DFLT", vec![ "[[0]]", ], ), ( "zero", "latn", "KAZ ", vec![ "[[0]]", ], ), ( "zero", "latn", "MOL ", vec![ "[[0]]", ], ), ( "zero", "latn", "ROM ", vec![ "[[0]]", ], ), ( "zero", "latn", "TAT ", vec![ "[[0]]", ], ), ( "zero", "latn", "TRK ", vec![ "[[0]]", ], ), ], ); } #[test] fn noto_serif() { let mut file = setup(Fixture::NotoSerifThai); let entries = extract(&mut file[0]); let entries = entries .iter() .map(|(feature, script, language, lookups)| { ( &**feature, &**script, &**language, lookups.iter().map(Deref::deref).collect::>(), ) }) .collect::>(); #[rustfmt::skip] assert_eq!( entries, [ ( "aalt", "DFLT", "DFLT", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "cyrl", "DFLT", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "cyrl", "MKD ", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "cyrl", "SRB ", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "grek", "APPH", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "grek", "DFLT", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "grek", "IPPH", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "latn", "APPH", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "latn", "CAT ", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "latn", "DFLT", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "latn", "IPPH", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "latn", "MAH ", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "latn", "MOL ", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "latn", "NAV ", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "latn", "ROM ", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "aalt", "thai", "DFLT", vec![ "[[?, A, O, a, i, j, o, 15e, 15f, e0d, …, e10, e24, e26, e2c, e31, e34, …, e37, e3a, e47, e4d]]", "[[331 (3), e38 (2), e39 (2), e48 (2), e49 (2), e4a (2), e4b (2), e4c (2)]]", ], ), ( "ccmp", "DFLT", "DFLT", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "cyrl", "DFLT", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "cyrl", "MKD ", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "cyrl", "SRB ", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "grek", "APPH", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "grek", "DFLT", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "grek", "IPPH", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "latn", "APPH", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "latn", "CAT ", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "latn", "DFLT", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "latn", "IPPH", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "latn", "MAH ", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "latn", "MOL ", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "latn", "NAV ", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "latn", "ROM ", vec![ "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "ccmp", "thai", "DFLT", vec![ "[[e33]]", "[[[[e38], [331]], [[e39], [331]]]]", "[[[[e0d–e10, e24, e26], [e38–e3a]]], [?], [[[e31, e34–e37, e47–e4e], [e48–e4c]]], [[[e2c], [e31, e34–e37, e47–e4e]]], [[[e1b, e1d, e1f], [e31, e34–e37, e47–e4d]]], [?], [?], [[[e1b, e1d, e1f], [e38–e3a], [e48–e4c]]], [?], [[[e0c, e0d, e12, e13], [331]]]]", "[[?]]", "[[[[e2c], [e31, e34–e37, e47–e4e]]]]", "[[[[i, j], [300–304, 306–308, 30a–30c, 312]]]]", ], ), ( "dist", "DFLT", "DFLT", vec![ "[?]", ], ), ( "dist", "cyrl", "DFLT", vec![ "[?]", ], ), ( "dist", "cyrl", "MKD ", vec![ "[?]", ], ), ( "dist", "cyrl", "SRB ", vec![ "[?]", ], ), ( "dist", "grek", "APPH", vec![ "[?]", ], ), ( "dist", "grek", "DFLT", vec![ "[?]", ], ), ( "dist", "grek", "IPPH", vec![ "[?]", ], ), ( "dist", "latn", "APPH", vec![ "[?]", ], ), ( "dist", "latn", "CAT ", vec![ "[?]", ], ), ( "dist", "latn", "DFLT", vec![ "[?]", ], ), ( "dist", "latn", "IPPH", vec![ "[?]", ], ), ( "dist", "latn", "MAH ", vec![ "[?]", ], ), ( "dist", "latn", "MOL ", vec![ "[?]", ], ), ( "dist", "latn", "NAV ", vec![ "[?]", ], ), ( "dist", "latn", "ROM ", vec![ "[?]", ], ), ( "dist", "thai", "DFLT", vec![ "[?]", ], ), ( "kern", "DFLT", "DFLT", vec![ "[?, ?]", ], ), ( "kern", "latn", "APPH", vec![ "[?, ?]", "[?, ?]", ], ), ( "kern", "latn", "CAT ", vec![ "[?, ?]", "[?, ?]", ], ), ( "kern", "latn", "DFLT", vec![ "[?, ?]", "[?, ?]", ], ), ( "kern", "latn", "IPPH", vec![ "[?, ?]", "[?, ?]", ], ), ( "kern", "latn", "MAH ", vec![ "[?, ?]", "[?, ?]", ], ), ( "kern", "latn", "MOL ", vec![ "[?, ?]", "[?, ?]", ], ), ( "kern", "latn", "NAV ", vec![ "[?, ?]", "[?, ?]", ], ), ( "kern", "latn", "ROM ", vec![ "[?, ?]", "[?, ?]", ], ), ( "kern", "thai", "DFLT", vec![ "[?, ?]", "[?, ?]", "[?]", ], ), ( "liga", "DFLT", "DFLT", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "cyrl", "DFLT", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "cyrl", "MKD ", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "cyrl", "SRB ", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "grek", "APPH", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "grek", "DFLT", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "grek", "IPPH", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "latn", "APPH", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "latn", "CAT ", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "latn", "DFLT", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "latn", "IPPH", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "latn", "MAH ", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "latn", "MOL ", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "latn", "NAV ", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "latn", "ROM ", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "liga", "thai", "DFLT", vec![ "[[[[e24], [e45]], [[e26], [e45]]]]", ], ), ( "locl", "latn", "MOL ", vec![ "[[15e, 15f]]", ], ), ( "locl", "latn", "ROM ", vec![ "[[15e, 15f]]", ], ), ( "mark", "DFLT", "DFLT", vec![ "[?]", ], ), ( "mark", "cyrl", "DFLT", vec![ "[?]", ], ), ( "mark", "cyrl", "MKD ", vec![ "[?]", ], ), ( "mark", "cyrl", "SRB ", vec![ "[?]", ], ), ( "mark", "grek", "APPH", vec![ "[?]", ], ), ( "mark", "grek", "DFLT", vec![ "[?]", ], ), ( "mark", "grek", "IPPH", vec![ "[?]", ], ), ( "mark", "latn", "APPH", vec![ "[?]", ], ), ( "mark", "latn", "CAT ", vec![ "[?]", ], ), ( "mark", "latn", "DFLT", vec![ "[?]", ], ), ( "mark", "latn", "IPPH", vec![ "[?]", ], ), ( "mark", "latn", "MAH ", vec![ "[?]", ], ), ( "mark", "latn", "MOL ", vec![ "[?]", ], ), ( "mark", "latn", "NAV ", vec![ "[?]", ], ), ( "mark", "latn", "ROM ", vec![ "[?]", ], ), ( "mark", "thai", "DFLT", vec![ "[?]", ], ), ( "mkmk", "DFLT", "DFLT", vec![ "[?]", "[?]", ], ), ( "mkmk", "cyrl", "DFLT", vec![ "[?]", "[?]", ], ), ( "mkmk", "cyrl", "MKD ", vec![ "[?]", "[?]", ], ), ( "mkmk", "cyrl", "SRB ", vec![ "[?]", "[?]", ], ), ( "mkmk", "grek", "APPH", vec![ "[?]", "[?]", ], ), ( "mkmk", "grek", "DFLT", vec![ "[?]", "[?]", ], ), ( "mkmk", "grek", "IPPH", vec![ "[?]", "[?]", ], ), ( "mkmk", "latn", "APPH", vec![ "[?]", "[?]", ], ), ( "mkmk", "latn", "CAT ", vec![ "[?]", "[?]", ], ), ( "mkmk", "latn", "DFLT", vec![ "[?]", "[?]", ], ), ( "mkmk", "latn", "IPPH", vec![ "[?]", "[?]", ], ), ( "mkmk", "latn", "MAH ", vec![ "[?]", "[?]", ], ), ( "mkmk", "latn", "MOL ", vec![ "[?]", "[?]", ], ), ( "mkmk", "latn", "NAV ", vec![ "[?]", "[?]", ], ), ( "mkmk", "latn", "ROM ", vec![ "[?]", "[?]", ], ), ( "mkmk", "thai", "DFLT", vec![ "[?]", "[?]", ], ), ( "ordn", "DFLT", "DFLT", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "cyrl", "DFLT", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "cyrl", "MKD ", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "cyrl", "SRB ", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "grek", "APPH", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "grek", "DFLT", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "grek", "IPPH", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "latn", "APPH", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "latn", "CAT ", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "latn", "DFLT", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "latn", "IPPH", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "latn", "MAH ", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "latn", "MOL ", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "latn", "NAV ", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "latn", "ROM ", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ordn", "thai", "DFLT", vec![ "[[[[0–9], [A, a]]], [[[0–9], [O, o]]]]", ], ), ( "ss01", "DFLT", "DFLT", vec![ "[[e0d, e10]]", ], ), ( "ss01", "cyrl", "DFLT", vec![ "[[e0d, e10]]", ], ), ( "ss01", "cyrl", "MKD ", vec![ "[[e0d, e10]]", ], ), ( "ss01", "cyrl", "SRB ", vec![ "[[e0d, e10]]", ], ), ( "ss01", "grek", "APPH", vec![ "[[e0d, e10]]", ], ), ( "ss01", "grek", "DFLT", vec![ "[[e0d, e10]]", ], ), ( "ss01", "grek", "IPPH", vec![ "[[e0d, e10]]", ], ), ( "ss01", "latn", "APPH", vec![ "[[e0d, e10]]", ], ), ( "ss01", "latn", "CAT ", vec![ "[[e0d, e10]]", ], ), ( "ss01", "latn", "DFLT", vec![ "[[e0d, e10]]", ], ), ( "ss01", "latn", "IPPH", vec![ "[[e0d, e10]]", ], ), ( "ss01", "latn", "MAH ", vec![ "[[e0d, e10]]", ], ), ( "ss01", "latn", "MOL ", vec![ "[[e0d, e10]]", ], ), ( "ss01", "latn", "NAV ", vec![ "[[e0d, e10]]", ], ), ( "ss01", "latn", "ROM ", vec![ "[[e0d, e10]]", ], ), ( "ss01", "thai", "DFLT", vec![ "[[e0d, e10]]", ], ), ], ); } #[test] fn qahiri() { let mut file = setup(Fixture::Qahiri); let entries = extract(&mut file[0]); let entries = entries .iter() .map(|(feature, script, language, lookups)| { ( &**feature, &**script, &**language, lookups.iter().map(Deref::deref).collect::>(), ) }) .collect::>(); #[rustfmt::skip] assert_eq!( entries, [ ( "calt", "DFLT", "DFLT", vec![ "[[?]]", ], ), ( "calt", "arab", "DFLT", vec![ "[[?]]", ], ), ( "ccmp", "DFLT", "DFLT", vec![ "[[622, …, 626, 628, …, 62c, 62e, 630, 632, 634, 636, 638, 63a, 641, 642, 646, 64a, 671, 679, 67e, 686, 688, 691, 698, 6a2, 6a4, 6a7, 6a9, 6af, 6c1, …, 6c3]]", ], ), ( "ccmp", "arab", "DFLT", vec![ "[[622, …, 626, 628, …, 62c, 62e, 630, 632, 634, 636, 638, 63a, 641, 642, 646, 64a, 671, 679, 67e, 686, 688, 691, 698, 6a2, 6a4, 6a7, 6a9, 6af, 6c1, …, 6c3]]", ], ), ( "clig", "DFLT", "DFLT", vec![ "[[?]]", "[[], [?], [?]]", "[[?]]", "[[?]]", "[[?]]", "[[?]]", "[[?], [?], [?], [?], [?]]", ], ), ( "clig", "arab", "DFLT", vec![ "[[?]]", "[[], [?], [?]]", "[[?]]", "[[?]]", "[[?]]", "[[?]]", "[[?], [?], [?], [?], [?]]", ], ), ( "curs", "DFLT", "DFLT", vec![ "[?]", ], ), ( "curs", "arab", "DFLT", vec![ "[?]", ], ), ( "dnom", "DFLT", "DFLT", vec![ "[[0, …, 9, 660, …, 669, 6f0, …, 6f9]]", ], ), ( "dnom", "arab", "DFLT", vec![ "[[0, …, 9, 660, …, 669, 6f0, …, 6f9]]", ], ), ( "fina", "DFLT", "DFLT", vec![ "[[627, 62d, 62f, 631, 633, 635, 637, 639, 643, …, 645, 647, …, 649, 66e, 66f, 6a1, 6ba, 6cc, 6d2, 8bb, …, 8bd]]", ], ), ( "fina", "arab", "DFLT", vec![ "[[627, 62d, 62f, 631, 633, 635, 637, 639, 643, …, 645, 647, …, 649, 66e, 66f, 6a1, 6ba, 6cc, 6d2, 8bb, …, 8bd]]", ], ), ( "init", "DFLT", "DFLT", vec![ "[[62d, 633, 635, 637, 639, 643, …, 645, 647, 649, 66e, 66f, 6a1, 6ba, 6cc, 8bb, …, 8bd]]", ], ), ( "init", "arab", "DFLT", vec![ "[[62d, 633, 635, 637, 639, 643, …, 645, 647, 649, 66e, 66f, 6a1, 6ba, 6cc, 8bb, …, 8bd]]", ], ), ( "isol", "DFLT", "DFLT", vec![ "[[6cc, 8bb, …, 8bd]]", ], ), ( "isol", "arab", "DFLT", vec![ "[[6cc, 8bb, …, 8bd]]", ], ), ( "kern", "DFLT", "DFLT", vec![ "[?, ?, ?, ?, ?, ?, ?, ?]", "[?, ?, ?]", ], ), ( "kern", "arab", "DFLT", vec![ "[?, ?, ?, ?, ?, ?, ?, ?]", "[?, ?, ?]", ], ), ( "locl", "latn", "DFLT", vec![ "[[20]]", ], ), ( "mark", "DFLT", "DFLT", vec![ "[?]", "[?]", "[?]", "[?]", "[?, ?, ?, ?, ?]", ], ), ( "mark", "arab", "DFLT", vec![ "[?]", "[?]", "[?]", "[?]", "[?, ?, ?, ?, ?]", ], ), ( "medi", "DFLT", "DFLT", vec![ "[[62d, 633, 635, 637, 639, 643, …, 645, 647, 649, 66e, 66f, 6a1, 6ba, 6cc, 8bb, …, 8bd]]", ], ), ( "medi", "arab", "DFLT", vec![ "[[62d, 633, 635, 637, 639, 643, …, 645, 647, 649, 66e, 66f, 6a1, 6ba, 6cc, 8bb, …, 8bd]]", ], ), ( "numr", "DFLT", "DFLT", vec![ "[[0, …, 9, 660, …, 669, 6f0, …, 6f9]]", ], ), ( "numr", "arab", "DFLT", vec![ "[[0, …, 9, 660, …, 669, 6f0, …, 6f9]]", ], ), ( "onum", "DFLT", "DFLT", vec![ "[[661, …, 664, 666, 669]]", ], ), ( "onum", "arab", "DFLT", vec![ "[[661, …, 664, 666, 669]]", ], ), ( "rclt", "DFLT", "DFLT", vec![ "[[?], [?], [?], [?]]", "[[?]]", "[[[[20], [20]]]]", ], ), ( "rclt", "arab", "DFLT", vec![ "[[?], [?], [?], [?]]", "[[?]]", "[[[[20], [20]]]]", ], ), ( "salt", "DFLT", "DFLT", vec![ "[[?, 627 (4), 62d (6), 631 (4), 633 (7), 635 (2), 639 (4), 643 (3), 645 (3), 647 (3), 648 (4), 649 (7), 662 (2), 663 (2), 664 (3), 666 (2), 667 (3), 668 (3), 6a1 (4)]]", ], ), ( "salt", "arab", "DFLT", vec![ "[[?, 627 (4), 62d (6), 631 (4), 633 (7), 635 (2), 639 (4), 643 (3), 645 (3), 647 (3), 648 (4), 649 (7), 662 (2), 663 (2), 664 (3), 666 (2), 667 (3), 668 (3), 6a1 (4)]]", ], ), ( "salt", "latn", "DFLT", vec![ "[[G (2), H (2), K (2), M (2), N (2), P (2), Q (2), R (3), U (2), Y (2)]]", ], ), ( "ss01", "DFLT", "DFLT", vec![ "[[?, 621, 654, 655]]", ], ), ( "ss01", "arab", "DFLT", vec![ "[[?, 621, 654, 655]]", ], ), ( "ss02", "DFLT", "DFLT", vec![ "[[?]]", ], ), ( "ss02", "arab", "DFLT", vec![ "[[?]]", ], ), ], ); } fn extract(font: &mut Font) -> Vec<(String, String, String, Vec)> where T: font::Read, { let directory = ok!(font.features()); let mut values = directory .scripts .iter() .flat_map(|(script, indices)| { indices .iter() .cloned() .map(|index| &directory.languages[index]) .flat_map(|(language, indices)| { indices .iter() .cloned() .map(|index| &directory.features[index]) .map(|(feature, indices)| { ( ok!(Tag::from(feature.clone()).as_str()).to_string(), ok!(Tag::from(script.clone()).as_str()).to_string(), ok!(Tag::from(language.clone()).as_str()).to_string(), indices .iter() .cloned() .map(|index| { join(directory.lookups[index].iter().map(|values| { values.as_ref().map(flatten).unwrap_or("?".to_string()) })) }) .collect(), ) }) }) }) .collect::>(); values.sort(); values } fn join(values: T) -> String where T: IntoIterator, { let mut result = "[".to_string(); for (index, value) in values.into_iter().enumerate() { if index > 0 { result.push_str(", "); } result.push_str(&value); } result.push(']'); result } fn flatten(values: &BTreeSet>) -> String { let mut buffer = String::new(); buffer.push('['); for (index, value) in values.iter().enumerate() { match value { Some(Sample::Simple(Component::Scalar(value))) => { buffer.push_str(&escape(*value)); } Some(Sample::Simple(Component::Range((start, end)))) => { buffer.push_str(&escape(*start)); if *start as usize + 1 == *end as usize { buffer.push_str(", "); } else { buffer.push_str(", …, "); } buffer.push_str(&escape(*end)); } Some(Sample::Alternate((value, count))) => { buffer.push_str(&escape(*value)); buffer.push_str(&format!(" ({count})")); } Some(Sample::Composite(positions)) => { buffer.push('['); for (index, components) in positions.iter().enumerate() { buffer.push('['); for (index, value) in components.iter().enumerate() { match value { Component::Scalar(value) => { buffer.push_str(&escape(*value)); } Component::Range((start, end)) => { buffer.push_str(&escape(*start)); if *start as usize + 1 == *end as usize { buffer.push_str(", "); } else { buffer.push('–'); } buffer.push_str(&escape(*end)); } } if index + 1 < components.len() { buffer.push_str(", "); } } buffer.push(']'); if index + 1 < positions.len() { buffer.push_str(", "); } } buffer.push(']'); } _ => { buffer.push('?'); } } if index + 1 < values.len() { buffer.push_str(", "); } } buffer.push(']'); buffer } fn escape(value: char) -> String { if !value.is_control() && !value.is_whitespace() && (value as usize) < 0xFF { value.to_string() } else { format!("{:0x}", value as u32) } }