emacs-orgmode
[Top][All Lists]
Advanced

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

bug#48149: 27.2; Wrong underline width when the line char has a width of


From: Eli Zaretskii
Subject: bug#48149: 27.2; Wrong underline width when the line char has a width of 2
Date: Sun, 02 May 2021 12:16:32 +0300

> From: Rudolf Schlatte <rudi@constantly.at>
> Date: Sun, 02 May 2021 10:36:14 +0200
> 
> > You reported a similar bug already, and I replied there that TRT in
> > these cases is to use window-text-pixel-size, which will automatically
> > account for the actual width on display of any characters and any
> > fonts specified for displaying them.  char-width is an approximation,
> > and is accurate only on TTY frames.
> 
> Isn't the primary result of org-export a plain (UTF-8) text file,
> instead of an emacs buffer to be displayed in a GUI or TTY frame?
> 
> If so, maybe the criterion for correctness should be that "cat
> filename.txt" looks as expected in a terminal, even if opening that file
> in Emacs shows lines of different lengths due to variable-pitch faces
> etc.

If the result is supposed to be displayed only on text-mode terminals,
then indeed string-width is the way to go (assuming that the terminal
in question will use fonts that will not break the alignment).
However, if the result is supposed to be displayed by a GUI program
such as Emacs, then string-width will not produce accurate results.

Maybe this is not important in this kind of export, in which case I
apologize for the noise.





reply via email to

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