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: Lars Ingebrigtsen
Subject: bug#12693: [cygwin] Setting fonts with non-ascii names throws error quit
Date: Mon, 14 Sep 2020 12:52:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Kazuhiro Ito <kzhr@d1.dion.ne.jp> writes:

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

Hm...  I don't use Windows, so I can't test this, but perhaps the result
from `x-select-font' should use `detect-coding-string' or something on
the result (and then decode it) so that we get a correct string in Emacs?

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

And the same here, but the other way around -- encode the string before
calling set-frame-front?

Unfortunately, on Debian, it looks like none of the fonts available here
have non-ASCII names, so I can't really test whether this idea even
makes any sense.  Anybody?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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