public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* half- and full-width CJK characters
@ 2023-10-07  8:23 Dr Bean
  2023-10-07  8:48 ` Thomas Wolff
  0 siblings, 1 reply; 7+ messages in thread
From: Dr Bean @ 2023-10-07  8:23 UTC (permalink / raw)
  To: cygwin

I am memorializing this for my own benefit here.

Benefitting from https://eng-blog.iij.ad.jp/archives/12576
I see that I don't need to change any envars, but only fonts.

The default Lucida Console font renders CJK as half-width chars, on 
this PC with 3 Windows language packs.

With MS ゴシック, Japanese かな and 漢字 look good.
Traditional Chinese ㄅㄛˋㄆㄛˋㄇㄛˋand 漢字 look good.
Korean 한글 doesn't look good. It looks like they're
half-width characters drawn with the space for one full-width 
character.

I wonder if this is a problem with the Korean language pack.

-- 
Greg Matheson                 Teacher: a spooky-action-at-a-distance
http://drbean.sdf.org         device for turning knowledge into
drbean@freeshell.org          learning

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: half- and full-width CJK characters
  2023-10-07  8:23 half- and full-width CJK characters Dr Bean
@ 2023-10-07  8:48 ` Thomas Wolff
  2023-10-07 12:47   ` Dr Bean
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Wolff @ 2023-10-07  8:48 UTC (permalink / raw)
  To: cygwin


Am 07/10/2023 um 10:23 schrieb Dr Bean via Cygwin:
> I am memorializing this for my own benefit here.
>
> Benefitting from https://eng-blog.iij.ad.jp/archives/12576
> I see that I don't need to change any envars, but only fonts.
>
> The default Lucida Console font renders CJK as half-width chars, on
> this PC with 3 Windows language packs.
>
> With MS ゴシック, Japanese かな and 漢字 look good.
> Traditional Chinese ㄅㄛˋㄆㄛˋㄇㄛˋand 漢字 look good.
> Korean 한글 doesn't look good. It looks like they're
> half-width characters drawn with the space for one full-width
> character.
>
> I wonder if this is a problem with the Korean language pack.
>
Please describe the context of your observations (preferably a test 
case); do you have an issue inside the Cygwin Terminal?
Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: half- and full-width CJK characters
  2023-10-07  8:48 ` Thomas Wolff
@ 2023-10-07 12:47   ` Dr Bean
  2023-10-07 14:27     ` Thomas Wolff
  0 siblings, 1 reply; 7+ messages in thread
From: Dr Bean @ 2023-10-07 12:47 UTC (permalink / raw)
  To: Thomas Wolff via Cygwin

On Sat, 07 Oct 2023, Thomas Wolff via Cygwin wrote:

> 
> Am 07/10/2023 um 10:23 schrieb Dr Bean via Cygwin:
> > I am memorializing this for my own benefit here.
> > 
> > Benefitting from https://eng-blog.iij.ad.jp/archives/12576
> > I see that I don't need to change any envars, but only fonts.
> > 
> > The default Lucida Console font renders CJK as half-width chars, on
> > this PC with 3 Windows language packs.
> > 
> > With MS ゴシック, Japanese かな and 漢字 look good.
> > Traditional Chinese ㄅㄛˋㄆㄛˋㄇㄛˋand 漢字 look good.
> > Korean 한글 doesn't look good. It looks like they're
> > half-width characters drawn with the space for one full-width
> > character.
> > 
> > I wonder if this is a problem with the Korean language pack.
> > 
> Please describe the context of your observations (preferably a test case);
> do you have an issue inside the Cygwin Terminal?
> Thomas

All mintty contexts. Viewing this email in an SSH session in screen
to a remote tmux session on freeshell.org, writing this reply in vim, 
and changing the mintty font option from ,

Font=Lucida Console
to
Font=MS ゴシック

the above CJK characters change appearance from half-width to full-width,
except for the Korean 한글, which doesn't change appearance.

Attaching to the tmux session on freeshell, sshing in from my
phone with Termius, the characters don't change, of course.

I'm not suggesting there's anything wrong with the default mintty font
option of Lucida Console. It looks good.

I am on the lookout for a good font for viewing korean 한글, so I 
don't have to magnify the screen to read it.

By the way, thanks for mintty. It is a joy to use.

> 
> -- 
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
> 
-- 
Greg Matheson                For every problem, there is a solution that is
http://drbean.sdf.org        simple, neat, and wrong.
drbean@freeshell.org         --HL Mencken 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: half- and full-width CJK characters
  2023-10-07 12:47   ` Dr Bean
@ 2023-10-07 14:27     ` Thomas Wolff
  2023-10-07 20:42       ` Brian Inglis
  2023-10-08 12:55       ` Dr Bean
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Wolff @ 2023-10-07 14:27 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2435 bytes --]



Am 07/10/2023 um 14:47 schrieb Dr Bean via Cygwin:
> On Sat, 07 Oct 2023, Thomas Wolff via Cygwin wrote:
>
>> Am 07/10/2023 um 10:23 schrieb Dr Bean via Cygwin:
>>> I am memorializing this for my own benefit here.
>>>
>>> Benefitting fromhttps://eng-blog.iij.ad.jp/archives/12576
>>> I see that I don't need to change any envars, but only fonts.
>>>
>>> The default Lucida Console font renders CJK as half-width chars, on
>>> this PC with 3 Windows language packs.
>>>
>>> With MS ゴシック, Japanese かな and 漢字 look good.
>>> Traditional Chinese ㄅㄛˋㄆㄛˋㄇㄛˋand 漢字 look good.
>>> Korean 한글 doesn't look good. It looks like they're
>>> half-width characters drawn with the space for one full-width
>>> character.
>>>
>>> I wonder if this is a problem with the Korean language pack.
>>>
>> Please describe the context of your observations (preferably a test case);
>> do you have an issue inside the Cygwin Terminal?
>> Thomas
> All mintty contexts. Viewing this email in an SSH session in screen
> to a remote tmux session on freeshell.org, writing this reply in vim,
> and changing the mintty font option from ,
>
> Font=Lucida Console
> to
> Font=MS ゴシック
>
> the above CJK characters change appearance from half-width to full-width,
> except for the Korean 한글, which doesn't change appearance.
>
> Attaching to the tmux session on freeshell, sshing in from my
> phone with Termius, the characters don't change, of course.
>
> I'm not suggesting there's anything wrong with the default mintty font
> option of Lucida Console. It looks good.
>
> I am on the lookout for a good font for viewing korean 한글, so I
> don't have to magnify the screen to read it.
>
> By the way, thanks for mintty. It is a joy to use.
>
Judging by the name (which has Katakana characters), MS ゴシック is a 
Japanese font, so maybe it simply does not have any special Korean 
ideographs and the Windows font fallback mechanism substitutes some 
unsuitable font.
You should try to find a specific Korean font, I doubt MS ゴシック was 
provided by the Korean language pack. I could try to reproduce the issue 
if you tell me which font it is. As far as I know, the CJK names are 
only used with respective language packs installed, otherwise the same 
font can be addresses by an alternative name. You could also look up the 
font filename (in the Windows Fonts folder) to identify it. Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: half- and full-width CJK characters
  2023-10-07 14:27     ` Thomas Wolff
@ 2023-10-07 20:42       ` Brian Inglis
  2023-10-08 12:55       ` Dr Bean
  1 sibling, 0 replies; 7+ messages in thread
From: Brian Inglis @ 2023-10-07 20:42 UTC (permalink / raw)
  To: cygwin

On 2023-10-07 08:27, Thomas Wolff via Cygwin wrote:
> 
> 
> Am 07/10/2023 um 14:47 schrieb Dr Bean via Cygwin:
>> On Sat, 07 Oct 2023, Thomas Wolff via Cygwin wrote:
>>
>>> Am 07/10/2023 um 10:23 schrieb Dr Bean via Cygwin:
>>>> I am memorializing this for my own benefit here.
>>>>
>>>> Benefitting fromhttps://eng-blog.iij.ad.jp/archives/12576
>>>> I see that I don't need to change any envars, but only fonts.
>>>>
>>>> The default Lucida Console font renders CJK as half-width chars, on
>>>> this PC with 3 Windows language packs.
>>>>
>>>> With MS ゴシック, Japanese かな and 漢字 look good.
>>>> Traditional Chinese ㄅㄛˋㄆㄛˋㄇㄛˋand 漢字 look good.
>>>> Korean 한글 doesn't look good. It looks like they're
>>>> half-width characters drawn with the space for one full-width
>>>> character.
>>>>
>>>> I wonder if this is a problem with the Korean language pack.
>>>>
>>> Please describe the context of your observations (preferably a test case);
>>> do you have an issue inside the Cygwin Terminal?
>>> Thomas
>> All mintty contexts. Viewing this email in an SSH session in screen
>> to a remote tmux session on freeshell.org, writing this reply in vim,
>> and changing the mintty font option from ,
>>
>> Font=Lucida Console
>> to
>> Font=MS ゴシック
>>
>> the above CJK characters change appearance from half-width to full-width,
>> except for the Korean 한글, which doesn't change appearance.
>>
>> Attaching to the tmux session on freeshell, sshing in from my
>> phone with Termius, the characters don't change, of course.
>>
>> I'm not suggesting there's anything wrong with the default mintty font
>> option of Lucida Console. It looks good.
>>
>> I am on the lookout for a good font for viewing korean 한글, so I
>> don't have to magnify the screen to read it.
>>
>> By the way, thanks for mintty. It is a joy to use.
>>
> Judging by the name (which has Katakana characters), MS ゴシック is a Japanese 
> font, so maybe it simply does not have any special Korean ideographs and the 
> Windows font fallback mechanism substitutes some unsuitable font.
> You should try to find a specific Korean font, I doubt MS ゴシック was 
> provided by the Korean language pack. I could try to reproduce the issue if you 
> tell me which font it is. As far as I know, the CJK names are only used with 
> respective language packs installed, otherwise the same font can be addresses by 
> an alternative name. You could also look up the font filename (in the Windows 
> Fonts folder) to identify it. Thomas

Package fontconfig utilities fc-list, fc-match, fc-query are your friends here 
to match by character set ranges or language codes and give you the file or font 
names: here I have installed all non-MS Windows fonts as symlinks under 
/usr/share/fonts/windows/ e.g.

$ fc-list :charset=ac00-d7a3 | sort -t: -k2 -u | sort
/usr/share/fonts/microsoft/malgun.ttf: Malgun Gothic,맑은 고딕:style=Regular
/usr/share/fonts/microsoft/malgunbd.ttf: Malgun Gothic,맑은 고딕:style=Bold
/usr/share/fonts/microsoft/malgunsl.ttf: Malgun Gothic,맑은 고딕,Malgun Gothic 
Semilight,맑은 고딕 Semilight:style=Semilight,Regular
/usr/share/fonts/opentype/unifont/unifont_jp.otf: Unifont\-JP:style=Regular
/usr/share/fonts/windows/code2000.ttf: 
Code2000:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normalan,Normálne,Navadno,thường,Arrunta
/usr/share/fonts/windows/LastResort-Regular.ttf: Last Resort:style=Regular
/usr/share/fonts/windows/NanumGothic_Coding.ttf: 
NanumGothic_Coding,나눔고딕_코딩:style=Regular
/usr/share/fonts/windows/NanumGothic_Coding_Bold.ttf: 
NanumGothic_Coding,나눔고딕_코딩:style=Bold
/usr/share/fonts/windows/NanumGothicCoding-Bold.ttf: NanumGothicCoding:style=Bold
/usr/share/fonts/windows/NanumGothicCoding-Regular.ttf: 
NanumGothicCoding:style=Regular
/usr/share/fonts/windows/UnicodeBMPFallback.ttf: Unicode BMP Fallback 
SIL:style=Regular
/usr/share/fonts/windows/unifont.otf: Unifont:style=Regular
/usr/share/fonts/windows/unifont_sample-12.1.03.ttf: Unifont Sample:style=Medium
$ fc-list :lang=ko | sort -t: -k2 -u | sort
/usr/share/fonts/microsoft/malgun.ttf: Malgun Gothic,맑은 고딕:style=Regular
/usr/share/fonts/microsoft/malgunbd.ttf: Malgun Gothic,맑은 고딕:style=Bold
/usr/share/fonts/microsoft/malgunsl.ttf: Malgun Gothic,맑은 고딕,Malgun Gothic 
Semilight,맑은 고딕 Semilight:style=Semilight,Regular
/usr/share/fonts/opentype/unifont/unifont_jp.otf: Unifont\-JP:style=Regular
/usr/share/fonts/windows/code2000.ttf: 
Code2000:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normalan,Normálne,Navadno,thường,Arrunta
/usr/share/fonts/windows/LastResort-Regular.ttf: Last Resort:style=Regular
/usr/share/fonts/windows/NanumGothic_Coding.ttf: 
NanumGothic_Coding,나눔고딕_코딩:style=Regular
/usr/share/fonts/windows/NanumGothic_Coding_Bold.ttf: 
NanumGothic_Coding,나눔고딕_코딩:style=Bold
/usr/share/fonts/windows/NanumGothicCoding-Bold.ttf: NanumGothicCoding:style=Bold
/usr/share/fonts/windows/NanumGothicCoding-Regular.ttf: 
NanumGothicCoding:style=Regular
/usr/share/fonts/windows/UnicodeBMPFallback.ttf: Unicode BMP Fallback 
SIL:style=Regular
/usr/share/fonts/windows/unifont.otf: Unifont:style=Regular
/usr/share/fonts/windows/unifont_sample-12.1.03.ttf: Unifont Sample:style=Medium

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: half- and full-width CJK characters
  2023-10-07 14:27     ` Thomas Wolff
  2023-10-07 20:42       ` Brian Inglis
@ 2023-10-08 12:55       ` Dr Bean
  2023-10-08 13:47         ` Thomas Wolff
  1 sibling, 1 reply; 7+ messages in thread
From: Dr Bean @ 2023-10-08 12:55 UTC (permalink / raw)
  To: Thomas Wolff via Cygwin

On Sat, 07 Oct 2023, Thomas Wolff via Cygwin wrote:

> 
> 
> Am 07/10/2023 um 14:47 schrieb Dr Bean via Cygwin:
> > On Sat, 07 Oct 2023, Thomas Wolff via Cygwin wrote:
> > 
> > > Am 07/10/2023 um 10:23 schrieb Dr Bean via Cygwin:
> > > > I am memorializing this for my own benefit here.
> > > > 
> > > > Benefitting fromhttps://eng-blog.iij.ad.jp/archives/12576
> > > > I see that I don't need to change any envars, but only fonts.
> > > > 
> > > > The default Lucida Console font renders CJK as half-width chars, on
> > > > this PC with 3 Windows language packs.
> > > > 
> > > > With MS ゴシック, Japanese かな and 漢字 look good.
> > > > Traditional Chinese ㄅㄛˋㄆㄛˋㄇㄛˋand 漢字 look good.
> > > > Korean 한글 doesn't look good. It looks like they're
> > > > half-width characters drawn with the space for one full-width
> > > > character.
> > > > 
> > > > I wonder if this is a problem with the Korean language pack.
> > > > 
> > > Please describe the context of your observations (preferably a test case);
> > > do you have an issue inside the Cygwin Terminal?
> > > Thomas
> > All mintty contexts. Viewing this email in an SSH session in screen
> > to a remote tmux session on freeshell.org, writing this reply in vim,
> > and changing the mintty font option from ,
> > 
> > Font=Lucida Console
> > to
> > Font=MS ゴシック
> > 
> > the above CJK characters change appearance from half-width to full-width,
> > except for the Korean 한글, which doesn't change appearance.
> > 
> > Attaching to the tmux session on freeshell, sshing in from my
> > phone with Termius, the characters don't change, of course.
> > 
> > I'm not suggesting there's anything wrong with the default mintty font
> > option of Lucida Console. It looks good.
> > 
> > I am on the lookout for a good font for viewing korean 한글, so I
> > don't have to magnify the screen to read it.
> > 
> > By the way, thanks for mintty. It is a joy to use.
> > 
> Judging by the name (which has Katakana characters), MS ゴシック is a
> Japanese font, so maybe it simply does not have any special Korean
> ideographs and the Windows font fallback mechanism substitutes some
> unsuitable font.
> You should try to find a specific Korean font, I doubt MS ゴシック was
> provided by the Korean language pack. I could try to reproduce the issue if
> you tell me which font it is. As far as I know, the CJK names are only used
> with respective language packs installed, otherwise the same font can be
> addresses by an alternative name. You could also look up the font filename
> (in the Windows Fonts folder) to identify it. Thomas

In the mintty font option dropdown there are at least 2 (4?) fonts giving 
full-width Korean 한글 here. I have the Windows Korean language pack
installed.

They are with filenames in /cygdrive/c/windows/Fonts:

BatangChe	batang.ttc
DotumChe	gulim.ttc
GulimChe	gulim.ttc
GungsuhChe	batang.ttc

And

MS ゴシック	msgothic.ttc (the MS chars are full-width)
doesn't result in full-width hangul.

So, I've found a suitable font for Korean 한글.

-- 
Greg Matheson                Practitioners just do it.
http://drbean.sdf.org        Reflective Practitioners just think they
drbean@freeshell.org         did it.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: half- and full-width CJK characters
  2023-10-08 12:55       ` Dr Bean
@ 2023-10-08 13:47         ` Thomas Wolff
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Wolff @ 2023-10-08 13:47 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3523 bytes --]



Am 08/10/2023 um 14:55 schrieb Dr Bean via Cygwin:
> On Sat, 07 Oct 2023, Thomas Wolff via Cygwin wrote:
>
>>
>> Am 07/10/2023 um 14:47 schrieb Dr Bean via Cygwin:
>>> On Sat, 07 Oct 2023, Thomas Wolff via Cygwin wrote:
>>>
>>>> Am 07/10/2023 um 10:23 schrieb Dr Bean via Cygwin:
>>>>> I am memorializing this for my own benefit here.
>>>>>
>>>>> Benefitting fromhttps://eng-blog.iij.ad.jp/archives/12576
>>>>> I see that I don't need to change any envars, but only fonts.
>>>>>
>>>>> The default Lucida Console font renders CJK as half-width chars, on
>>>>> this PC with 3 Windows language packs.
>>>>>
>>>>> With MS ゴシック, Japanese かな and 漢字 look good.
>>>>> Traditional Chinese ㄅㄛˋㄆㄛˋㄇㄛˋand 漢字 look good.
>>>>> Korean 한글 doesn't look good. It looks like they're
>>>>> half-width characters drawn with the space for one full-width
>>>>> character.
>>>>>
>>>>> I wonder if this is a problem with the Korean language pack.
>>>>>
>>>> Please describe the context of your observations (preferably a test case);
>>>> do you have an issue inside the Cygwin Terminal?
>>>> Thomas
>>> All mintty contexts. Viewing this email in an SSH session in screen
>>> to a remote tmux session on freeshell.org, writing this reply in vim,
>>> and changing the mintty font option from ,
>>>
>>> Font=Lucida Console
>>> to
>>> Font=MS ゴシック
>>>
>>> the above CJK characters change appearance from half-width to full-width,
>>> except for the Korean 한글, which doesn't change appearance.
>>>
>>> Attaching to the tmux session on freeshell, sshing in from my
>>> phone with Termius, the characters don't change, of course.
>>>
>>> I'm not suggesting there's anything wrong with the default mintty font
>>> option of Lucida Console. It looks good.
>>>
>>> I am on the lookout for a good font for viewing korean 한글, so I
>>> don't have to magnify the screen to read it.
>>>
>>> By the way, thanks for mintty. It is a joy to use.
>>>
>> Judging by the name (which has Katakana characters), MS ゴシック is a
>> Japanese font, so maybe it simply does not have any special Korean
>> ideographs and the Windows font fallback mechanism substitutes some
>> unsuitable font.
>> You should try to find a specific Korean font, I doubt MS ゴシック was
>> provided by the Korean language pack. I could try to reproduce the issue if
>> you tell me which font it is. As far as I know, the CJK names are only used
>> with respective language packs installed, otherwise the same font can be
>> addresses by an alternative name. You could also look up the font filename
>> (in the Windows Fonts folder) to identify it. Thomas
> In the mintty font option dropdown there are at least 2 (4?) fonts giving
> full-width Korean 한글 here. I have the Windows Korean language pack
> installed.
>
> They are with filenames in /cygdrive/c/windows/Fonts:
>
> BatangChe	batang.ttc
> DotumChe	gulim.ttc
> GulimChe	gulim.ttc
> GungsuhChe	batang.ttc
>
> And
>
> MS ゴシック	msgothic.ttc (the MS chars are full-width)
> doesn't result in full-width hangul.
>
> So, I've found a suitable font for Korean 한글.
>
Thanks for confirming. By the way, as CJK fonts are usually not very 
suitable for Latin text (mostly not being monowidth in the first place),
there is a useful mechanism in mintty that allows you to use your 
favourite CJK and non-CJK fonts together.
It's the FontChoice setting for secondary fonts:

|Font=Lucida Console ||Font2=|MS ゴシック
|FontChoice=CJK:2 |

Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-10-08 13:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-07  8:23 half- and full-width CJK characters Dr Bean
2023-10-07  8:48 ` Thomas Wolff
2023-10-07 12:47   ` Dr Bean
2023-10-07 14:27     ` Thomas Wolff
2023-10-07 20:42       ` Brian Inglis
2023-10-08 12:55       ` Dr Bean
2023-10-08 13:47         ` Thomas Wolff

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).