all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Kazuhiro Ito <kzhr@d1.dion.ne.jp>
Cc: 12693@debbugs.gnu.org
Subject: bug#12693: [cygwin] Setting fonts with non-ascii names throws error quit
Date: Mon, 14 Sep 2020 12:52:12 +0200	[thread overview]
Message-ID: <87o8m8d40z.fsf@gnus.org> (raw)
In-Reply-To: <867dswsqdp.wl--xmue@d1.dion.ne.jp> (Kazuhiro Ito's message of "Mon, 14 Sep 2020 17:40:18 +0900")

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	other threads:[~2020-09-14 10:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-20 21:46 bug#12693: 24.2.50; src/w32font.c should depend on ANSI code page Kazuhiro Ito
2012-10-23 11:52 ` Jason Rumney
2012-10-23 13:05   ` Kazuhiro Ito
2012-10-23 16:22     ` Eli Zaretskii
2012-10-25 21:18       ` Daniel Colascione
2012-10-26  7:30         ` Eli Zaretskii
2012-10-23 16:12   ` Eli Zaretskii
2020-09-13 16:16 ` bug#12693: [cygwin] Setting fonts with non-ascii names throws error quit Lars Ingebrigtsen
2020-09-14  8:40   ` Kazuhiro Ito
2020-09-14 10:52     ` Lars Ingebrigtsen [this message]
2020-09-14 11:38       ` Kazuhiro Ito

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=87o8m8d40z.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=12693@debbugs.gnu.org \
    --cc=kzhr@d1.dion.ne.jp \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.