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

Unicode right-to-left mark (RLM+LRM) for Hebrew #4943

Closed
immetoo2 opened this issue Jan 26, 2022 · 2 comments
Closed

Unicode right-to-left mark (RLM+LRM) for Hebrew #4943

immetoo2 opened this issue Jan 26, 2022 · 2 comments

Comments

@immetoo2
Copy link

Version/Branch of Dear ImGui:

Version: 1.86

Back-end/Renderer/Compiler/OS

Back-ends: imgui_java_impl_glfw within libGDX
Operating System: Debian

My Issue/Question:

Could the unicode directions marks be supported for auto reversal of the text code points ?

left-to-right mark (LRM) - 0x200E
right-to-left mark (RLM) - 0x200F

Now when rendering Hebrew, the text is reversed and the vowels are misaligned.
With an hardcoded reversal workaround, the text renders correct in Imgui.

Screenshots/Video

imgui-hebrew-wallet

Standalone, minimal, complete and verifiable example:

As seen in source, the Hebrew is displayed reversed in Imgui and breaks the font vowel rendering.

		String[] walletData = {
				"ה","מ","מָ","ח","חֱ","חֱ‎מָא",
				"א","בד","ב","ד","ץףן",
				"הזפץ","מספר","צצצצ","ץאאא","דואר"
			};
		for (String data:walletData) {
			HebrewGê̄ld geld = new HebrewGê̄ld(data);
			ImGui.tableNextRow();
			ImGui.tableNextColumn();
			ImGui.text(data.length()==2||data.length()==3?"OUT":"IN");
			ImGui.tableNextColumn();
			ImGui.text(data);
			ImGui.tableNextColumn();
			ImGui.text(geld.toHebrewString(true)); // true=reverse for ImGui
			ImGui.tableNextColumn();
			ImGui.text(Double.toString(geld.getTotalDecimalValue()));
		}
@ocornut
Copy link
Owner

ocornut commented Jan 26, 2022

Hello,
We don't support RTL text not text shaping.

Could the unicode directions marks be supported for auto reversal of the text code points ?

Probably not anytime soon but the best would be to move that discussion to #4227.

@ocornut ocornut closed this as completed Jan 26, 2022
@immetoo2
Copy link
Author

Clear will wait until #4227 gets merged.

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

2 participants