diff options
| author | Martin Haug <mhaug@live.de> | 2021-10-28 21:25:03 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-11-02 10:39:45 +0100 |
| commit | 8ccb7d6f15a2fbb44247c143b3dd821e44e0d6eb (patch) | |
| tree | a58b538e34418c035b55e880eaf5a1ffc146a6da /tests | |
| parent | 5b344b663a3d224134923eea0d67ebf44c069b07 (diff) | |
Smallcaps, sub- and superscript, ligature ctrls...
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/text/features.png | bin | 0 -> 8140 bytes | |||
| -rw-r--r-- | tests/typ/text/features.typ | 65 |
2 files changed, 65 insertions, 0 deletions
diff --git a/tests/ref/text/features.png b/tests/ref/text/features.png Binary files differnew file mode 100644 index 00000000..90521427 --- /dev/null +++ b/tests/ref/text/features.png diff --git a/tests/typ/text/features.typ b/tests/typ/text/features.typ new file mode 100644 index 00000000..10214bdb --- /dev/null +++ b/tests/typ/text/features.typ @@ -0,0 +1,65 @@ +// Test OpenType features. + +--- +// Test turning kerning off. +#font(kerning: true)[Tq] \ +#font(kerning: false)[Tq] + +--- +// Test smallcaps. +#font("Roboto") +#font(smallcaps: true)[Smallcaps] + +--- +// Test alternates and stylistic sets. +#font("IBM Plex Serif") +a vs #font(alternates: true)[a] \ +ß vs #font(stylistic-set: 5)[ß] + +--- +// Test ligatures. +fi vs. #font(ligatures: false)[No fi] \ + +--- +// Test number style. +#font("Roboto") +#font(number-style: "old-style") 0123456789 \ +#font(number-style: auto)[0123456789] + +--- +// Test number width. +#font("Roboto") +#font(number-width: "proportional")[0123456789] \ +#font(number-width: "tabular")[3456789123] \ +#font(number-width: "tabular")[0123456789] + +--- +// Test number position. +#font("IBM Plex Sans") +#font(number-position: "normal")[C2H4] \ +#font(number-position: "subscript")[C2H4] \ +#font(number-position: "superscript")[C2H4] + +--- +// Test extra number stuff. +#font("IBM Plex Sans") +0 vs. #font(slashed-zero: true)[0] \ +1/2 vs. #font(fractions: true)[1/2] + +--- +// Test raw features. +#font("Roboto") +#font(features: ("smcp",))[Smcp] \ +fi vs. #font(features: (liga: 0))[No fi] + +--- +// Error: 22-24 must be between 1 and 20 +#font(stylistic-set: 25) + +--- +// Error: 21-32 expected "lining" or "old-style" +#font(number-style: "different") + +--- +// Error: 17-22 expected array of strings or dictionary mapping tags to integers, found boolean +#font(features: false) |
