From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kazuhiro Ito Newsgroups: gmane.emacs.bugs Subject: bug#12693: [cygwin] Setting fonts with non-ascii names throws error quit Date: Mon, 14 Sep 2020 17:40:18 +0900 Message-ID: <867dswsqdp.wl--xmue@d1.dion.ne.jp> References: <87y5j0ddgj.wl%%xmue@d1.dion.ne.jp> <871rj5k5xp.fsf@gnus.org> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-2022-JP Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11341"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL-LB/10.8 Emacs/28.0.50 (x86_64-w64-mingw32) MULE/6.0 (HANACHIRUSATO) Cc: 12693@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 14 10:41:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHk2v-0002qb-Oc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Sep 2020 10:41:09 +0200 Original-Received: from localhost ([::1]:52210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHk2u-0004oE-As for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Sep 2020 04:41:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHk2o-0004nr-3T for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2020 04:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40917) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHk2n-0004C5-Qw for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2020 04:41:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kHk2n-0003i3-Nm for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2020 04:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kazuhiro Ito Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Sep 2020 08:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12693 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 12693-submit@debbugs.gnu.org id=B12693.160007282714203 (code B ref 12693); Mon, 14 Sep 2020 08:41:01 +0000 Original-Received: (at 12693) by debbugs.gnu.org; 14 Sep 2020 08:40:27 +0000 Original-Received: from localhost ([127.0.0.1]:52463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHk2F-0003h0-FK for submit@debbugs.gnu.org; Mon, 14 Sep 2020 04:40:27 -0400 Original-Received: from snd00009.auone-net.jp ([111.86.247.9]:62049 helo=dmta0006.auone-net.jp) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHk2C-0003gn-0J for 12693@debbugs.gnu.org; Mon, 14 Sep 2020 04:40:25 -0400 Original-Received: from kzhr.d1.dion.ne.jp by dmta0006.auone-net.jp with ESMTP id <20200914084020824.FSKX.121622.kzhr.d1.dion.ne.jp@dmta0006.auone-net.jp>; Mon, 14 Sep 2020 17:40:20 +0900 In-Reply-To: <871rj5k5xp.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188030 Archived-At: > > When I run Emacs on Cygwin with the native Windows UI, I can't specify > > font by non-ascii font name. For example, the below code success on > > precompiled binary on Windows (Japanese edition) but raises error on > > Cygwin with the native Windows UI. > > > > (set-default-font "MS ゴシック-14") > > This was seven years ago, and this function no longer exists, so > obviously things have changed in this area. Are you still seeing this > bug in a recent version of Emacs? Yes. (set-frame-font "MS ゴシック-14") raises an error on Cygw32 build but not on MinGW64 build. x-select-font function returns encoded string on Cygw32 build. Let-binding locale-coding-system to the correct codepage can avoid the problem. ;; Chose "MS ゴシック-14" (x-select-font) -> "\202l\202r \203S\203V\203b\203N-14" (let ((locale-coding-system 'cp932)) (x-select-font)) -> #("MS ゴシック-14" 0 10 (charset cp932-2-byte)) (set-frame-font "MS ゴシック-14") -> error (let ((locale-coding-system 'cp932)) (set-frame-font "MS ゴシック-14")) -> Frame font is changed. -- Kazuhiro Ito