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

Rendering: natural line break punctuation position in RTL languages #741

Open
TsUNaMyWaVe opened this issue Mar 19, 2024 · 2 comments
Open

Comments

@TsUNaMyWaVe
Copy link

Screenshots

Notice the position of the .
VSFilter

libass

Description of the issue

In both VSFilter and libass, in order for the punctuation marks to show at the end (left side) of the line (as needed in RTL language), they are needed to be typed at the beginning of it.

When a line is breaking naturally in VSFilter (without \N) another option to achieve that goal is to type the punctuation mark as the first "letter" of the first word in the second line for it to show up in the end, while in libass it still shows up in the beginning. Basically, to use punctuation marks correctly for RTL languages with libass, one must use a forced break (with \N), and can't use that workaround (which granted, is also bad, but I was asked to open this issue so here I am).

libass version

The one that comes with Aegisub 9530-cibuilds-79a0655eb

Is it a regression?

I have no idea

ASS Sample

; Script generated by Aegisub 9530-cibuilds-79a0655eb
; http://www.aegisub.org/
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: None
PlayResX: 1280
PlayResY: 720

[Aegisub Project Garbage]
Last Style Storage: Default
Video File: ?dummy:23.976000:100000:1280:720:47:163:254:
Video AR Value: 1.777778

[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: Default,Arial,60,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,2,5,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:05.00,Default,,0,0,0,,אני שורה ארוכה בעברית שנשברת באופן .טבעי, ללא שימוש בירידת שורה ידנית

Special Fonts

I uploaded or linked to the required font

System Information

Windows 10 with 64bit x86 (Intel) CPU

Log

No response

Additional info

No response

@astiob
Copy link
Member

astiob commented Mar 19, 2024

Thanks for the report and for the realistic example! This is actually a part of #661 (specifically the bidi part). The full thing seemed hard to do, so I kinda filed it and forgot about it, but I wonder if tackling just the bidi is feasible for a start.

Edit: oh, but rerunning bidi necessitates rerunning shaping. Bah.

@arch1t3cht
Copy link
Contributor

Since rcombs asked elsewhere, the libass version is (based on) 9f4e6af.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants