Skip to content

Added support for RTL override character. - #15

Open
matthew-ivre wants to merge 1 commit into
developfrom
feature/EN-44052-rtl-override-support
Open

Added support for RTL override character.#15
matthew-ivre wants to merge 1 commit into
developfrom
feature/EN-44052-rtl-override-support

Conversation

@matthew-ivre

Copy link
Copy Markdown

Like a broken record, I'm suggesting that we add support for the RTL override character. It'll let us fix formatting anomalies in the strings.

E.g., closing bracket placed after a URL, and double space before YouTube.
image

Adding RTLO characters at strategic points in the string forces a fix:
image

We'd need to make sure that it doesn't actually appear in the string. It shouldn't have a character:
image

I'm not sure about how to fix this otherwise. Maybe the Arabic translator could rewrite it so there's some Arabic text before the closing bracket.

@matthew-ivre

Copy link
Copy Markdown
Author

Option 1 to remove the character: Go to the fallback font (e.g., Noto Sans), and change the width and height to zero:
image

@matthew-ivre
matthew-ivre requested a review from a team September 2, 2024 11:32
@matthew-ivre

matthew-ivre commented Sep 2, 2024

Copy link
Copy Markdown
Author

Option 2 to remove the character: I've created a font that contains only the \u202E character - as a narrow space. If you add it as the first option in the fallback list, it's used as the RTLO character:
image

@matthew-ivre

Copy link
Copy Markdown
Author

Option 3 to remove the character: At the end of LigatureFixer.cs is a check for whether or not to display a character. A ZeroWidthNoJoiner is mentioned, and the RTL override could also be added there:
image

@matthew-ivre

Copy link
Copy Markdown
Author

See Jira for a solution to force an RTL change (if locale is Arabic) without this PR: https://vreducation.atlassian.net/browse/EN-44052

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.

1 participant