mintty overstrokes some fonts unexpectedly

Thomas Wolff towo@towo.net
Sun Apr 25 20:33:57 GMT 2021


Am 25.04.2021 um 15:41 schrieb Lemures Lemniscati via Cygwin:
> Hi!
>
> mintty overstrokes some fonts unexpectedly.
> https://gitlab.com/test.cases/mintty-test/-/tree/54ae800e695ecd1741851cab57320a9d0e95a6fd
>
>
> How to reproduce
>
> Setting mintty to use msgothic.ttc in 20pt, run a
> following command.
>
> ====
> perl -e '
> binmode STDOUT, ":utf8";
> print <<END;
> 01234567
> \x{3042}\x{3044}\x{3046}\x{3048}
> AaBbCcDe
> \x{25cb}\x{25cb}\x{25cb}\x{25cb}
> \x{3007}\x{3007}\x{3007}\x{3007}
> \x{300c}\x{300e}\x{3010}\x{3012}
> \x{300d}\x{300f}\x{3011}\x{3013}
> \x{ff62}\x{ff63}\x{ff62}\x{ff63}\x{ff62}\x{ff63}\x{ff62}\x{ff63}
> \x{ff71}\x{ff72}\x{ff73}\x{ff74}\x{ff75}\x{ff76}\x{ff77}\x{ff78}
> END
> '
> ====
>
>
> I got a result mintty-sample-msgothic.png.
> https://gitlab.com/test.cases/mintty-test/-/blob/54ae800e695ecd1741851cab57320a9d0e95a6fd/mintty-sample-msgothic.png
>
> In the 4th line of the output, fonts (of u+25cb) were overstruck
> unexpectedly.
> And there are other characters also, which are similarly overstruck.
This is a Windows bug. Mintty clearly instruct Windows to apply 
equidistant spacing to achieve fixed-width character cell behaviour. But 
for certain character ranges, Windows ignores that. Another example for 
such misbehaviour is the Tibetan block (U+0F00-U+0FFF). Mintty could 
work around that by rendering characters separately, at a significant 
penalty for output speed however. Or it could do that only for affected 
ranges, but criteria to identify them are obscure.
Thomas


More information about the Cygwin mailing list