* mintty overstrokes some fonts unexpectedly
@ 2021-04-25 13:41 Lemures Lemniscati
2021-04-25 20:33 ` Thomas Wolff
0 siblings, 1 reply; 5+ messages in thread
From: Lemures Lemniscati @ 2021-04-25 13:41 UTC (permalink / raw)
To: 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.
On the other hand, copying the result to a window of notepad.exe
displaying with msgothic.ttc in 20pt.
I got a result notepad-sample-msgothic.png, in which fonts were rendered
expectedly.
https://gitlab.com/test.cases/mintty-test/-/blob/54ae800e695ecd1741851cab57320a9d0e95a6fd/notepad-sample-msgothic.png
My cygwin environment is:
====
$ uname -srvmo; cygcheck -c mintty;
CYGWIN_NT-10.0 3.2.0(0.340/5/3) 2021-03-29 08:42 x86_64 Cygwin
Cygwin Package Information
Package Version Status
mintty 3.5.0-1 OK
====
Regards,
Lem
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mintty overstrokes some fonts unexpectedly
2021-04-25 13:41 mintty overstrokes some fonts unexpectedly Lemures Lemniscati
@ 2021-04-25 20:33 ` Thomas Wolff
2021-04-25 23:14 ` Lemures Lemniscati
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Wolff @ 2021-04-25 20:33 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mintty overstrokes some fonts unexpectedly
2021-04-25 20:33 ` Thomas Wolff
@ 2021-04-25 23:14 ` Lemures Lemniscati
2021-04-26 18:31 ` Thomas Wolff
0 siblings, 1 reply; 5+ messages in thread
From: Lemures Lemniscati @ 2021-04-25 23:14 UTC (permalink / raw)
To: cygwin
On Sun, 25 Apr 2021 22:33:57 +0200, Thomas Wolff
>
> 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
> >
> > 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.
Thank you, Thomas.
I tried some earlier versions of mintty:
* mintty-3.1.0-1 has the same issue
* mintty-2.9.6-0 works expectedly in this case.
Regards,
Lem
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mintty overstrokes some fonts unexpectedly
2021-04-25 23:14 ` Lemures Lemniscati
@ 2021-04-26 18:31 ` Thomas Wolff
2021-04-26 22:55 ` Lemures Lemniscati
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Wolff @ 2021-04-26 18:31 UTC (permalink / raw)
To: cygwin
Am 26.04.2021 um 01:14 schrieb Lemures Lemniscati via Cygwin:
> On Sun, 25 Apr 2021 22:33:57 +0200, Thomas Wolff
>> 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
>>>
>>> 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.
> Thank you, Thomas.
>
> I tried some earlier versions of mintty:
>
> * mintty-3.1.0-1 has the same issue
> * mintty-2.9.6-0 works expectedly in this case.
My previous comment was wrong, sorry. The cause of the issue is that the
Windows CJK fonts are designed for CJK ambiguous-wide layout. If you run
mintty with option Charwidth=ambig-wide, or better in an ambiguous-wide
locale like LC_CTYPE=C.utf8@cjkwide, width handling and font rendering
will match.
Mintty applies auto-narrowing to some characters that would render far
out of their character cell, squeezing them into the cell, in order to
optimise the trade-off between readability and authentic rendering.
Some character ranges were taken out of that mechanism in 2.9.7,
including the Geometric Shapes which you've encountered, in this case
because they are "geometric" and the assumption was that they should not
be tampered for rendering.
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mintty overstrokes some fonts unexpectedly
2021-04-26 18:31 ` Thomas Wolff
@ 2021-04-26 22:55 ` Lemures Lemniscati
0 siblings, 0 replies; 5+ messages in thread
From: Lemures Lemniscati @ 2021-04-26 22:55 UTC (permalink / raw)
To: cygwin
On Mon, 26 Apr 2021 20:31:38 +0200, Thomas Wolff
>
> Am 26.04.2021 um 01:14 schrieb Lemures Lemniscati via Cygwin:
> > On Sun, 25 Apr 2021 22:33:57 +0200, Thomas Wolff
> >> 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
> >>>
> >>> 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.
> > Thank you, Thomas.
> >
> > I tried some earlier versions of mintty:
> >
> > * mintty-3.1.0-1 has the same issue
> > * mintty-2.9.6-0 works expectedly in this case.
> My previous comment was wrong, sorry. The cause of the issue is that the Windows CJK fonts are designed for CJK ambiguous-wide layout. If you run mintty with option Charwidth=ambig-wide, or better in an ambiguous-wide locale like LC_CTYPE=C.utf8@cjkwide, width handling and font rendering will match.
> Mintty applies auto-narrowing to some characters that would render far out of their character cell, squeezing them into the cell, in order to optimise the trade-off between readability and authentic rendering.
> Some character ranges were taken out of that mechanism in 2.9.7, including the Geometric Shapes which you've encountered, in this case because they are "geometric" and the assumption was that they should not be tampered for rendering.
Thank you, Thomas!
I overlooked 'man mintty'.
It works expectedly under the setting.
I'd be happy if the option Charwidth is accessible from GUI.
Regards,
Lem
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-26 22:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-25 13:41 mintty overstrokes some fonts unexpectedly Lemures Lemniscati
2021-04-25 20:33 ` Thomas Wolff
2021-04-25 23:14 ` Lemures Lemniscati
2021-04-26 18:31 ` Thomas Wolff
2021-04-26 22:55 ` Lemures Lemniscati
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).