public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Use Microsoft YaHei UI as UI font for Chinese language
Date: Thu, 11 Apr 2024 08:40:48 -0600	[thread overview]
Message-ID: <19349faa-703c-474a-bcd2-b1355d35e7bb@SystematicSW.ab.ca> (raw)
In-Reply-To: <a050c9e8-4158-49e1-9a46-c6785cd1b891@dronecode.org.uk>

On 2024-04-11 06:42, Jon Turney via Cygwin wrote:
> On 03/04/2024 14:19, Yang Yu Lin via Cygwin wrote:
>> For Chinese language, the app’s default UI font is Microsoft YaHei UI. Using 
>> MS Shell Dlg makes the UI become annoying.
>> Here are my changes:
>> diff --git a/res/zh_Hans/res.rc b/res/zh_Hans/res.rc
>> index 9f67a5a..da9d6e8 100644
>> --- a/res/zh_Hans/res.rc
>> +++ b/res/zh_Hans/res.rc
>> @@ -8,7 +8,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
>>   IDD_SOURCE DIALOG 0, 0, SETUP_STANDARD_DIALOG_DIMS
>>   STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
>>   CAPTION "Cygwin 安装程序 - 选择安装类型"
>> -FONT 8, "MS Shell Dlg"
>> +FONT 9, "Microsoft YaHei UI"

> Thanks very much for this patch!
> So, this isn't applicable as is, because the localized res.rc files are 
> generated from a template res.rc file and the language .po file (using po2rc 
> from Translate Toolkit [1][2]).  See section starting after "rules for 
> translation maintenance" in Makefile.am
> However, this seems like it would be straightforward to do via a post-processing 
> step there.
> I'll take your word over the aesthetics of the font choice, but I do have a 
> question about what versions of Windows we can assume that font is available on 
> (in theory at least, one might be using a current setup executable to install 
> Cygwin from the CTM on OSs back to Windows XP3)

MS Yahei UI appeared in Win8; Yahei Reg/Bold in Win7.

> I wonder if we ought to be using "MS Shell Dlg 2" and/or DS_SHELLFONT, but the 
> documentation about those is incomprehensible.

They appear to be intended to be "localizable" font names implemented using font 
substitution on each Windows language version to MS Sans Serif (MS UI Gothic if 
jp) and Tahoma (2 was for W2K):

https://learn.microsoft.com/en-us/windows/win32/intl/using-ms-shell-dlg-and-ms-shell-dlg-2
https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/Intl/using-ms-shell-dlg-and-ms-shell-dlg-2.md

> If you have any future patches to setup, please send them to the cygwin-apps 
> mailing list
> [1] https://github.com/translate/translate
> [2] (Although there may be some patches needed which have yet to make it 
> upstream, so this might not work for you, yet)

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

  reply	other threads:[~2024-04-11 14:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 13:19 Yang Yu Lin
2024-04-11 12:42 ` Jon Turney
2024-04-11 14:40   ` Brian Inglis [this message]
2024-04-16 18:46   ` Jon Turney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19349faa-703c-474a-bcd2-b1355d35e7bb@SystematicSW.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).