all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: mituharu@math.s.chiba-u.ac.jp
To: "Stephen Berman" <stephen.berman@gmx.net>
Cc: emacs-devel@gnu.org
Subject: Re: Cairo font selection for Ethiopic
Date: Sat, 22 Jun 2019 18:32:46 +0900	[thread overview]
Message-ID: <1a8cc6af2800282718fd8a56459fe98f.squirrel@weber.math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <87a7earntw.fsf@gmx.net>

>> Thanks.  Please get the latest master and show the results of the
>> following on both builds:
>>
>>   1. $ emacs -Q -D &
>>   2. (setq font-log nil) C-j
>>   3. (insert 4768) C-j
>>   4. M-x font-show-log RET
>
> Attached.

Thanks.  Could you try the patch below?

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index 0cc40b4c944..f15e79334ac 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -25,6 +25,7 @@ along with GNU Emacs.  If not, see
<https://www.gnu.org/licenses/>.  */
 #include "lisp.h"
 #include "xterm.h"
 #include "blockinput.h"
+#include "charset.h"
 #include "composite.h"
 #include "font.h"
 #include "ftfont.h"
@@ -308,6 +309,17 @@ ftcrfont_has_char (Lisp_Object font, int c)
   if (FONT_ENTITY_P (font))
     return ftfont_has_char (font, c);

+  struct charset *cs = NULL;
+
+  if (EQ (AREF (font, FONT_ADSTYLE_INDEX), Qja)
+      && charset_jisx0208 >= 0)
+    cs = CHARSET_FROM_ID (charset_jisx0208);
+  else if (EQ (AREF (font, FONT_ADSTYLE_INDEX), Qko)
+      && charset_ksc5601 >= 0)
+    cs = CHARSET_FROM_ID (charset_ksc5601);
+  if (cs)
+    return (ENCODE_CHAR (cs, c) != CHARSET_INVALID_CODE (cs));
+
   return -1;
 }






  reply	other threads:[~2019-06-22  9:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20 19:30 Cairo font selection for Ethiopic Stephen Berman
2019-06-21  1:54 ` YAMAMOTO Mitsuharu
2019-06-21  8:05   ` Stephen Berman
2019-06-21 10:52     ` mituharu
2019-06-21 11:28       ` Stephen Berman
2019-06-22  3:08         ` YAMAMOTO Mitsuharu
2019-06-22  9:06           ` Stephen Berman
2019-06-22  9:32             ` mituharu [this message]
2019-06-22  9:48               ` Stephen Berman

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=1a8cc6af2800282718fd8a56459fe98f.squirrel@weber.math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=emacs-devel@gnu.org \
    --cc=stephen.berman@gmx.net \
    /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.