Skip to content
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
1 change: 1 addition & 0 deletions regression/encoding-rtl/DejaVuSans.ttf
45 changes: 45 additions & 0 deletions regression/encoding-rtl/desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Encoding -2: right-to-left base direction without whole text layout.

The visual order is the same as with whole text layout: the Unicode
Bidirectional Algorithm runs over the whole event text with a
right-to-left paragraph direction, and each line is reordered after
wrapping. Text is still shaped run by run (each character with \fsp),
and a run is split where its bidi level changes.
Style R uses Encoding -2, style L Encoding 0. Coloured text marks
separate runs.

Each event is shown for one second and sampled half a second in.

rtl-runs.ass: end punctuation, a line starting with Latin, a number in
text, a coloured word, a number as its own run, Latin followed by a
number run, brackets, Arabic with Arabic-Indic digits, a drawing inside
a line, \an9 (alignment is unchanged), a decimal point that is a run
of its own between two number runs, a paragraph separator (U+2029)
between tags (each paragraph is reordered on its own), a Latin phrase
split by a tag next to Hebrew text, a Hebrew line ending in Latin
text and a period (the period goes to the left), a Latin-only line
(also a right-to-left paragraph, so its period goes to the left), a
tagged Latin word between Hebrew words, an isolate (LRI...PDI) across
a tag (needs FriBidi 1.0 or later), an override (LRO...PDF) inside a
bold run, a translucent BorderStyle 3 box behind Hebrew, Latin and a
number in one run, an RLO over Hebrew with niqqud and an LRO over
Arabic with harakat.
rtl-karaoke.ass: \k, \kf halfway through the first syllable, \ko,
\k0 starting karaoke in the middle of a Latin phrase, Latin syllables
between Hebrew ones and a line starting with Latin syllables (spaces
between syllables stay in place), and a \kf syllable whose Hebrew and
Latin parts end up apart. Karaoke timing is unchanged, and \kf still
fills each syllable from left to right, across its whole width.
rtl-fsp.ass: \fsp with Hebrew, Hebrew with digits, Hebrew with Latin
words, numbers with separators ("50%", "3.14", "1,000",
"03-1234567"), U+001C (a paragraph separator, drawn as a missing
glyph), an LRE between digits, alone and inside Hebrew text (it
applies to the rest of the line), and a Latin-only line.
rtl-wrap.ass: lines are reordered after wrapping; a long line with a
coloured run, a wrap inside an italic Latin run, \N, and a coloured
number followed by "%" and \N.
rtl-overrides.ass: \fe-2 in an Encoding 0 style, \fe0 in an Encoding -2
style (left to right as before), \r to an Encoding 0 style and back
(the event's last setting applies), and \fay (the shear restarts at
each run, and continues across the parts of a run that has Hebrew and
Latin text).
Binary file added regression/encoding-rtl/rtl-fsp-00500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-fsp-01500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-fsp-02500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-fsp-03500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-fsp-04500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-fsp-05500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-fsp-06500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-fsp-07500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-fsp-08500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions regression/encoding-rtl/rtl-fsp.ass
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[Script Info]
ScriptType: v4.00+
PlayResX: 640
PlayResY: 200
WrapStyle: 0
ScaledBorderAndShadow: yes

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: R,DejaVu Sans,32,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,20,20,20,-2
Style: L,DejaVu Sans,32,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,20,20,20,0

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:01.00,R,hebrew,0,0,0,,{\fsp6}שלום עולם!
Dialogue: 0,0:00:01.00,0:00:02.00,R,digits,0,0,0,,{\fsp6}יש לי 12 תפוחים.
Dialogue: 0,0:00:02.00,0:00:03.00,R,latin,0,0,0,,{\fsp6}אמרתי hello world היום.
Dialogue: 0,0:00:03.00,0:00:04.00,R,price,0,0,0,,{\fsp3}מחיר: 50%, 3.14 ו-1,000!
Dialogue: 0,0:00:04.00,0:00:05.00,R,phone,0,0,0,,{\fsp3}התקשר ל-03-1234567
Dialogue: 0,0:00:05.00,0:00:06.00,R,separator,0,0,0,,{\fsp1}Xאחד שתיים four חמש
Dialogue: 0,0:00:06.00,0:00:07.00,R,embedding,0,0,0,,{\fsp3}12‪34
Dialogue: 0,0:00:07.00,0:00:08.00,R,embedding-in-text,0,0,0,,{\fsp3}מספר 12‪34 בסדר
Dialogue: 0,0:00:08.00,0:00:09.00,R,latin-only,0,0,0,,{\fsp6}Hello world.
Binary file added regression/encoding-rtl/rtl-karaoke-00500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-karaoke-01500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-karaoke-02500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-karaoke-03500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-karaoke-04500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-karaoke-05500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-karaoke-06500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions regression/encoding-rtl/rtl-karaoke.ass
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[Script Info]
ScriptType: v4.00+
PlayResX: 640
PlayResY: 200
WrapStyle: 0
ScaledBorderAndShadow: yes

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: R,DejaVu Sans,32,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,20,20,20,-2
Style: L,DejaVu Sans,32,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,20,20,20,0

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:01.00,R,k,0,0,0,,{\k40}שלום {\k40}עולם {\k40}יפה!
Dialogue: 0,0:00:01.00,0:00:02.00,R,kf,0,0,0,,{\kf100}שלום {\kf100}עולם!
Dialogue: 0,0:00:02.00,0:00:03.00,R,ko,0,0,0,,{\ko40}שלום {\ko40}עולם {\ko40}יפה!
Dialogue: 0,0:00:03.00,0:00:04.00,R,k0,0,0,0,,אמרתי hello {\k0}world היום.
Dialogue: 0,0:00:04.00,0:00:05.00,R,k-latin-middle,0,0,0,,{\k20}אני {\k20}אוהב {\k20}you {\k20}baby {\k20}הלילה
Dialogue: 0,0:00:05.00,0:00:06.00,R,kf-latin-first,0,0,0,,{\kf25}I {\kf25}love {\kf25}you {\kf25}אהובה
Dialogue: 0,0:00:06.00,0:00:07.00,R,kf-split,0,0,0,,{\kf100}שלום hello {\kf100}world
Binary file added regression/encoding-rtl/rtl-overrides-00500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-overrides-01500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-overrides-02500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-overrides-03500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-overrides-04500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions regression/encoding-rtl/rtl-overrides.ass
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[Script Info]
ScriptType: v4.00+
PlayResX: 640
PlayResY: 200
WrapStyle: 0
ScaledBorderAndShadow: yes

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: R,DejaVu Sans,32,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,20,20,20,-2
Style: L,DejaVu Sans,32,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,20,20,20,0

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:01.00,L,fe-2,0,0,0,,{\fe-2}שלום {\1c&H00C0FF&}עולם{\1c}!
Dialogue: 0,0:00:01.00,0:00:02.00,R,fe0,0,0,0,,{\fe0}שלום {\1c&H00C0FF&}עולם{\1c}!
Dialogue: 0,0:00:02.00,0:00:03.00,R,reset-ltr-style,0,0,0,,שלום {\rL}hello{\r} עולם!
Dialogue: 0,0:00:03.00,0:00:04.00,R,fay,0,0,0,,{\fay0.2}שלום {\1c&H00C0FF&}ע{\1c} יפה מאוד!
Dialogue: 0,0:00:04.00,0:00:05.00,R,fay-mixed,0,0,0,,{\fay0.2}שלום hello {\1c&H00C0FF&}עולם{\1c} 12!
Binary file added regression/encoding-rtl/rtl-runs-00500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-runs-01500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-runs-02500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-runs-03500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regression/encoding-rtl/rtl-runs-04500.png
Binary file added regression/encoding-rtl/rtl-runs-05500.png
Binary file added regression/encoding-rtl/rtl-runs-06500.png
Binary file added regression/encoding-rtl/rtl-runs-07500.png
Binary file added regression/encoding-rtl/rtl-runs-08500.png
Binary file added regression/encoding-rtl/rtl-runs-09500.png
Binary file added regression/encoding-rtl/rtl-runs-10500.png
Binary file added regression/encoding-rtl/rtl-runs-11500.png
Binary file added regression/encoding-rtl/rtl-runs-12500.png
Binary file added regression/encoding-rtl/rtl-runs-13500.png
Binary file added regression/encoding-rtl/rtl-runs-14500.png
Binary file added regression/encoding-rtl/rtl-runs-15500.png
Binary file added regression/encoding-rtl/rtl-runs-16500.png
Binary file added regression/encoding-rtl/rtl-runs-17500.png
Binary file added regression/encoding-rtl/rtl-runs-18500.png
Binary file added regression/encoding-rtl/rtl-runs-19500.png
Binary file added regression/encoding-rtl/rtl-runs-20500.png
36 changes: 36 additions & 0 deletions regression/encoding-rtl/rtl-runs.ass
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[Script Info]
ScriptType: v4.00+
PlayResX: 640
PlayResY: 200
WrapStyle: 0
ScaledBorderAndShadow: yes

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: R,DejaVu Sans,32,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,20,20,20,-2
Style: L,DejaVu Sans,32,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,20,20,20,0
Style: B,DejaVu Sans,32,&H00FFFFFF,&H000000FF,&H80C04000,&H00000000,0,0,0,0,100,100,0,0,3,4,0,2,20,20,20,-2

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:01.00,R,end-punct,0,0,0,,שלום עולם!
Dialogue: 0,0:00:01.00,0:00:02.00,R,latin-first,0,0,0,,OK, אני בא?
Dialogue: 0,0:00:02.00,0:00:03.00,R,number,0,0,0,,אני גר ברחוב 12 בתל אביב.
Dialogue: 0,0:00:03.00,0:00:04.00,R,tagged-word,0,0,0,,זה {\1c&H00C0FF&}חשוב{\1c} מאוד.
Dialogue: 0,0:00:04.00,0:00:05.00,R,number-run,0,0,0,,יש לי {\1c&H00C0FF&}12{\1c} תפוחים.
Dialogue: 0,0:00:05.00,0:00:06.00,R,latin-then-number,0,0,0,,Windows {\1c&H00C0FF&}11{\1c} יצא היום.
Dialogue: 0,0:00:06.00,0:00:07.00,R,brackets,0,0,0,,הוא אמר (שלום) ו[עולם] {\1c&H00C0FF&}<טוב>{\1c}.
Dialogue: 0,0:00:07.00,0:00:08.00,R,arabic,0,0,0,,عندي ١٢ {\1c&H00C0FF&}تفاحة{\1c}!
Dialogue: 0,0:00:08.00,0:00:09.00,R,drawing,0,0,0,,שלום {\p1}m 0 0 l 20 0 20 20 0 20{\p0} עולם!
Dialogue: 0,0:00:09.00,0:00:10.00,R,an9,0,0,0,,{\an9}שלום {\1c&H00C0FF&}עולם{\1c}!
Dialogue: 0,0:00:10.00,0:00:11.00,R,separator-run,0,0,0,,המחיר {\1c&H00C0FF&}3{\b1}.{\b0}14{\1c} שקל
Dialogue: 0,0:00:11.00,0:00:12.00,R,paragraph-separator,0,0,0,,{\b1}X{\b0}
אחד {\b1}שתיים{\b0} שלוש {\i1}four{\i0} חמש
Dialogue: 0,0:00:12.00,0:00:13.00,R,split-phrase,0,0,0,,אמרתי {\i1}hello {\i0}world ואז הלכתי.
Dialogue: 0,0:00:13.00,0:00:14.00,R,latin-end,0,0,0,,אמרתי {\i1}hello {\i0}world.
Dialogue: 0,0:00:14.00,0:00:15.00,R,latin-only,0,0,0,,Hello {\1c&H00C0FF&}big{\1c} world.
Dialogue: 0,0:00:15.00,0:00:16.00,R,tagged-latin-spaces,0,0,0,,שלום {\i1}hello {\i0}עולם
Dialogue: 0,0:00:16.00,0:00:17.00,R,isolate,0,0,0,,שלום ⁦{\i1}one{\i0}, two!⁩ עולם
Dialogue: 0,0:00:17.00,0:00:18.00,R,override,0,0,0,,שלום {\b1}‭אבג‬{\b0} עולם
Dialogue: 0,0:00:18.00,0:00:19.00,B,box,0,0,0,,שלום hello עולם 123 סוף
Dialogue: 0,0:00:19.00,0:00:20.00,R,rlo-niqqud,0,0,0,,‮שָׁלוֹם‬ abc
Dialogue: 0,0:00:20.00,0:00:21.00,R,lro-harakat,0,0,0,,שלום ‭سَلَام‬
Binary file added regression/encoding-rtl/rtl-wrap-00500.png
Binary file added regression/encoding-rtl/rtl-wrap-01500.png
Binary file added regression/encoding-rtl/rtl-wrap-02500.png
Binary file added regression/encoding-rtl/rtl-wrap-03500.png
18 changes: 18 additions & 0 deletions regression/encoding-rtl/rtl-wrap.ass
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Script Info]
ScriptType: v4.00+
PlayResX: 640
PlayResY: 200
WrapStyle: 0
ScaledBorderAndShadow: yes

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: R,DejaVu Sans,32,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,20,20,20,-2
Style: L,DejaVu Sans,32,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,20,20,20,0

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:01.00,R,wrap,0,0,0,,זה משפט ארוך מאוד שצריך {\1c&H00C0FF&}להישבר{\1c} לשתי שורות לפחות כדי שנוכל לבדוק את הגלישה, נכון?
Dialogue: 0,0:00:01.00,0:00:02.00,R,wrap-latin,0,0,0,,זה משפט ארוך עם מילים באנגלית כמו {\i1}Windows Subsystem for Linux{\i0} שצריך להישבר לשורות.
Dialogue: 0,0:00:02.00,0:00:03.00,R,hard-break,0,0,0,,שורה ראשונה!\Nשורה {\1c&H00C0FF&}שנייה{\1c}?
Dialogue: 0,0:00:03.00,0:00:04.00,R,hard-break-after-run,0,0,0,,שלום {\1c&H00C0FF&}50{\1c}%\Nabc