Skip to content

RTL Support - #45

Draft
moshekv wants to merge 2 commits into
arch1t3cht:featurefrom
moshekv:rtl_support
Draft

RTL Support#45
moshekv wants to merge 2 commits into
arch1t3cht:featurefrom
moshekv:rtl_support

Conversation

@moshekv

@moshekv moshekv commented Mar 27, 2023

Copy link
Copy Markdown

No description provided.

@moshekv

moshekv commented Mar 27, 2023

Copy link
Copy Markdown
Author

Added a simple RTL support.

There is buttons to choose which align:
image

And text is align automatically!
image

Will improve the system in future time.

@moshekv
moshekv marked this pull request as draft March 27, 2023 23:34
@moshekv moshekv changed the title Rtl support RTL Support Mar 27, 2023
@arch1t3cht
arch1t3cht force-pushed the feature branch 18 times, most recently from 1d8e74e to 26a5f00 Compare April 21, 2023 14:22
@arch1t3cht
arch1t3cht force-pushed the feature branch 6 times, most recently from f2a2973 to 5e51c59 Compare May 19, 2023 18:39
Comment thread src/utils.cpp

bool IsCharRTL(wxChar c) {
// only hebrew for now
return (((wxChar)0x5d0) <= c) && (c <= ((wxChar)0x5ea));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested, but this should be better and support all the RTL character.

Suggested change
return (((wxChar)0x5d0) <= c) && (c <= ((wxChar)0x5ea));
bool IsCharRTL(wxChar character) {
hb_unicode_funcs_t* unicode_funcs = hb_unicode_funcs_get_default();
hb_script_t script = hb_unicode_script(unicode_funcs, character);
return hb_script_get_horizontal_direction(script) == HB_DIRECTION_RTL;
}

@moshekv

moshekv commented Sep 8, 2024

Copy link
Copy Markdown
Author

I would like to insert this feature, @arch1t3cht are you okay with this, or you want me to find a better solution to handle RTL?
Because the patch let's you change to RTL but it still not bidi, and the RTL Unicode character is not that good.

I now have time and want to invest for a good solution.

mojie126 added a commit to mojie126/Aegisub that referenced this pull request Feb 28, 2026
…h1t3cht#28

- 修复TypesettingTools#173: \fn0字体重置,在libass/VSFilter中等同于\fn,重置为样式默认字体
- 修复TypesettingTools#45: 分辨率设置UB,'设为视频分辨率'不再调用ResampleResolution
- 修复TypesettingTools#118: SRT时间精度,厘秒转换从四舍五入改为截断,匹配VSFilter/libass
- 修复TypesettingTools#28: 字体收集器性能,PrintUsage行号批量拼接输出
mojie126 added a commit to mojie126/Aegisub that referenced this pull request Mar 19, 2026
…h1t3cht#28

- 修复TypesettingTools#173: \fn0字体重置,在libass/VSFilter中等同于\fn,重置为样式默认字体
- 修复TypesettingTools#45: 分辨率设置UB,'设为视频分辨率'不再调用ResampleResolution
- 修复TypesettingTools#118: SRT时间精度,厘秒转换从四舍五入改为截断,匹配VSFilter/libass
- 修复TypesettingTools#28: 字体收集器性能,PrintUsage行号批量拼接输出
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants