Terry J. Reedy <tjre...@udel.edu> added the comment:

I suggest reclosing this issue, for the same reason I suggested closure of 
#24665 in msg321291: abstract unicode 'characters' (graphemes) do not, in 
general, have fixed physical widths of 0, 1, or 2 n-pixel columns (or spaces).  
I based that fairly long message on IDLE's multiscript font sample as displayed 
on Windows 10.  In that context, for instance, the width of (fixed-pitch) East 
Asian characters is about 1.6, not 2.0, times the width of fixed-pitch Ascii 
characters.  Variable-width Tamil characters average about the same.  The exact 
ratio depends on the Latin font used.

I did more experiments with Python started from Command Prompt with code page 
437 or 65001 and characters 20 pixels high.  The Windows console only allows 
'fixed pitch' fonts.  East Asian characters, if displayed, are expanded to 
double width.

However, European characters are not reliably displayed in one column. The 
width depends on the both the font selected when a character is entered and the 
current font. The 20 latin1 characters in '¢£¥§©«®¶½ĞÀÁÂÃÄÅÇÐØß' usually 
display in 20 columns.  But if they are entered with the font set to MSGothic, 
the '§' and '¶' are each displayed in the middle of 2 columns, for 22 total.  
If the font is changed to MSGothic after entry, the '§' and '¶' are shifted 1/2 
column right to overlap the following '©' or '½' without changing the total 
width.  Greek and Cyrillic characters also sometimes take two columns.

I did not test whether the font size (pixel height) affects horizontal column 
spacing.

----------
stage:  -> test needed
versions: +Python 3.8 -Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue12568>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to