From 8a57395ee48ecee02c2eb833d232979730f0e445 Mon Sep 17 00:00:00 2001 From: damaxwell Date: Wed, 19 Jul 2023 02:25:24 -0800 Subject: Support OpenType writing script (#1697) --- tests/typ/text/lang.typ | 20 ++++++++++++++++++++ tests/typ/text/shaping.typ | 10 ++++++++++ 2 files changed, 30 insertions(+) (limited to 'tests/typ/text') diff --git a/tests/typ/text/lang.typ b/tests/typ/text/lang.typ index a70b4d63..7f1ae1fc 100644 --- a/tests/typ/text/lang.typ +++ b/tests/typ/text/lang.typ @@ -22,6 +22,26 @@ #text(lang: "uk")[Бб] #text(lang: "sr")[Бб] +--- +// Verify that writing script/language combination has an effect +#{ + set text(size:20pt) + set text(script: "latn", lang: "en") + [Ş ] + set text(script: "latn", lang: "ro") + [Ş ] + set text(script: "grek", lang: "ro") + [Ş ] +} + +--- +// Error: 19-23 expected string or auto, found none +#set text(script: none) + +--- +// Error: 19-23 expected three or four letter script code (ISO 15924 or 'math') +#set text(script: "ab") + --- // Error: 17-21 expected string, found none #set text(lang: none) diff --git a/tests/typ/text/shaping.typ b/tests/typ/text/shaping.typ index 3a99815b..3a8d5411 100644 --- a/tests/typ/text/shaping.typ +++ b/tests/typ/text/shaping.typ @@ -11,6 +11,16 @@ ABCअपार्टमेंट // if we didn't separate by script. अ पा र् ट में ट +--- +// A forced `latn` script inhibits Devanagari font features. +#set text(script: "latn") +ABCअपार्टमेंट + +--- +// A forced `deva` script enables Devanagari font features. +#set text(script: "deva") +ABCअपार्टमेंट + --- // Test that RTL safe-to-break doesn't panic even though newline // doesn't exist in shaping output. -- cgit v1.2.3