Two questions about Arabic and right-to-left text #12121

Closed
opened 2026-01-31 03:06:49 +00:00 by claunia · 7 comments
Owner

Originally created by @vefatica on GitHub (Jan 19, 2021).

I Google for "hello Arabic". I get the usual translation dialog and press the "copy" button.
image
I paste to a TCC command line in WT ...
image
Two questions:
CHARMAP doesn't show any Arabic characters for my font (Consolas). Where are they coming from?

If I backspace, those pasted characters are deleted from the left end! Who (what software) knows (and how) that it's right-to-left?

Originally created by @vefatica on GitHub (Jan 19, 2021). I Google for "hello Arabic". I get the usual translation dialog and press the "copy" button. ![image](https://user-images.githubusercontent.com/61856645/105072653-0b673d00-5a54-11eb-817b-c40e5bf2c0ad.png) I paste to a TCC command line in WT ... ![image](https://user-images.githubusercontent.com/61856645/105072830-3ea9cc00-5a54-11eb-84da-f1c71940351e.png) Two questions: CHARMAP doesn't show any Arabic characters for my font (Consolas). Where are they coming from? If I backspace, those pasted characters are deleted from the left end! Who (what software) knows (and how) that it's right-to-left?
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 03:06:49 +00:00
Author
Owner

@DHowett commented on GitHub (Jan 19, 2021):

Terminal implements font fallback (using DirectWrite); those characters are pulled from somewhere (but we do not surface the source anywhere.)

That RTL script is rendered properly (RTL) is an artifact of our renderer, and cannot be relied-upon or trusted until #538 lands. 😄

@DHowett commented on GitHub (Jan 19, 2021): Terminal implements font fallback (using DirectWrite); those characters are pulled from _somewhere_ (but we do not surface the source anywhere.) That RTL script is rendered properly (RTL) is an artifact of our renderer, and cannot be relied-upon or trusted until #538 lands. :smile:
Author
Owner

@DHowett commented on GitHub (Jan 19, 2021):

That artifact is "we give DirectWrite runs of glyphs that are all the same color; it calculates how to render them itself". It's lucky that it works out as well as it does sometimes.

@DHowett commented on GitHub (Jan 19, 2021): That artifact is "we give DirectWrite runs of glyphs that are all the same color; it calculates how to render them itself". It's _lucky_ that it works out as well as it does sometimes.
Author
Owner

@vefatica commented on GitHub (Jan 19, 2021):

Thanks!

we do not surface the source

Can't ... won't?

@vefatica commented on GitHub (Jan 19, 2021): Thanks! > we do not surface the source Can't ... won't?
Author
Owner

@DHowett commented on GitHub (Jan 19, 2021):

Don't see the need to, don't have a place to do it, don't think anyone cares. 😄

We're not a word processor. You can't just put your cursor on something and ask what font it came out in. There's no additional side channel for us to express that info with, either.

Oh, open a debug tap, "we rendered the glyph at 6, 7 using NSimSun instead of Consolas". Okay, who's going to use that information and for what purpose? 😄

@DHowett commented on GitHub (Jan 19, 2021): Don't see the need to, don't have a place to do it, don't think anyone cares. :smile: We're not a word processor. You can't just put your cursor on something and ask what font it came out in. There's no additional side channel for us to express that info with, either. Oh, open a debug tap, "we rendered the glyph at 6, 7 using NSimSun instead of Consolas". Okay, who's going to use that information and for what purpose? :smile:
Author
Owner

@vefatica commented on GitHub (Jan 19, 2021):

Just curious about how things work.

@vefatica commented on GitHub (Jan 19, 2021): Just curious about how things work.
Author
Owner

@mdtauk commented on GitHub (Jan 19, 2021):

Just a curiosity of mine. For Right to Left, how is the command prompt handled?

|                                                  output  |
|                                                          |
|                                                 █  </:C  |
____________________________________________________________
@mdtauk commented on GitHub (Jan 19, 2021): Just a curiosity of mine. For Right to Left, how is the command prompt handled? ``` | output | | | | █ </:C | ____________________________________________________________ ```
Author
Owner

@DHowett commented on GitHub (Jan 19, 2021):

how.. handled

It's not. It's not handled. Definitely move this discussion over to #538 if you'd like to talk RTL details.

@DHowett commented on GitHub (Jan 19, 2021): > how.. handled It's not. It's not handled. Definitely move this discussion over to #538 if you'd like to talk RTL details.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12121