emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic WYSIWYG printing in GNU Emacs (Arabic & Hebrew)


From: Eli Zaretskii
Subject: Re: Basic WYSIWYG printing in GNU Emacs (Arabic & Hebrew)
Date: Wed, 11 Aug 2021 14:37:24 +0300

> From: Anand Tamariya <atamariya@gmail.com>
> Date: Wed, 11 Aug 2021 09:18:23 +0530
> Cc: emacs-devel@gnu.org
> 
>  Does it also start RTL text at the right edge of the paper?  And how
>  does it reorder characters for printing?
> 
>  (Sorry for asking these questions, but I'm still unable to see
>  anything useful on the GitLab URL you show -- when I go there, I see
>  only the navigation tree on the left and an empty pane on the right.)
> 
> The code uses window positioning information for characters from Emacs and 
> then scales the content to fit
> the print width. 

So this needs the buffer text be displayed in some window, before it
could be printed?

> It uses following API to determine BIDI classification and processes 
> accordingly:
> (get-char-code-property (char-after from) 'bidi-class)

Hmm... not sure this is enough, except in the simplest cases.  The
bidi-class of a character is just its basic attribute; application of
the full Unicode Bidirectional Algorithm can and does change the
effective attributes of some characters, before they are displayed.

Is this test performed on each character or only at the beginning of a
visual line?

And I see that if you detect RTL characters, you just reverse the text
you get?  That is also very simplistic and will work correctly only if
the text includes only strong RTL characters, not numbers and no
embedded LTR characters.

Apologies if I didn't understand what the code does correctly; I only
had a cursory glance on it, and there are not so many comments
explaining what it does.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]