bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12693: [cygwin] Setting fonts with non-ascii names throws error quit


From: Kazuhiro Ito
Subject: bug#12693: [cygwin] Setting fonts with non-ascii names throws error quit
Date: Mon, 14 Sep 2020 17:40:18 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 Emacs/28.0.50 (x86_64-w64-mingw32) MULE/6.0 (HANACHIRUSATO)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]