aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2009-01-27 05:10:08 +0000
committerKenichi Handa2009-01-27 05:10:08 +0000
commit7179ce7b35a4e28d4bf6e49508631d074835c9d2 (patch)
tree63c73ed8e2d4db9190e71d842bf4720cc75967b0 /src
parentb0c25608cdec34df50f6546854bbf022476f619e (diff)
downloademacs-7179ce7b35a4e28d4bf6e49508631d074835c9d2.tar.gz
emacs-7179ce7b35a4e28d4bf6e49508631d074835c9d2.zip
(ftfont_has_char): If the arg FONT is a font-object,
directly use GT_Get_Char_index.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/ftfont.c21
2 files changed, 26 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 52eab5a74ce..1b236637671 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12009-01-27 Kenichi Handa <handa@m17n.org>
2
3 * ftfont.c (ftfont_has_char): If the arg FONT is a font-object,
4 directly use GT_Get_Char_index.
5
6 * xftfont.c (struct xftfont_info): New member `index'.
7
8 * fontset.c (font_for_char): Use assq_no_quit, not assoc_no_quit.
9 (Ffontset_font): Adjusted for the change of fontset entry.
10
12009-01-26 Kenichi Handa <handa@m17n.org> 112009-01-26 Kenichi Handa <handa@m17n.org>
2 12
3 * fontset.c (fontset_find_font): Fix handling of non-cons return 13 * fontset.c (fontset_find_font): Fix handling of non-cons return
diff --git a/src/ftfont.c b/src/ftfont.c
index b28c4c3ea21..dea3bf069b4 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -62,7 +62,7 @@ struct ftfont_info
62{ 62{
63 struct font font; 63 struct font font;
64#ifdef HAVE_LIBOTF 64#ifdef HAVE_LIBOTF
65 /* The following three members must be here in this order to be 65 /* The following four members must be here in this order to be
66 compatible with struct xftfont_info (in xftfont.c). */ 66 compatible with struct xftfont_info (in xftfont.c). */
67 int maybe_otf; /* Flag to tell if this may be OTF or not. */ 67 int maybe_otf; /* Flag to tell if this may be OTF or not. */
68 OTF *otf; 68 OTF *otf;
@@ -1189,13 +1189,24 @@ ftfont_close (f, font)
1189} 1189}
1190 1190
1191static int 1191static int
1192ftfont_has_char (entity, c) 1192ftfont_has_char (font, c)
1193 Lisp_Object entity; 1193 Lisp_Object font;
1194 int c; 1194 int c;
1195{ 1195{
1196 FcCharSet *charset = ftfont_get_fc_charset (entity); 1196 if (FONT_ENTITY_P (font))
1197 {
1198 FcCharSet *charset = ftfont_get_fc_charset (font);
1197 1199
1198 return (FcCharSetHasChar (charset, c) == FcTrue); 1200 return (FcCharSetHasChar (charset, c) == FcTrue);
1201 }
1202 else
1203 {
1204 struct ftfont_info *ftfont_info;
1205
1206 ftfont_info = (struct ftfont_info *) XFONT_OBJECT (font);
1207 return (FT_Get_Char_Index (ftfont_info->ft_size->face, (FT_ULong) c)
1208 != 0);
1209 }
1199} 1210}
1200 1211
1201static unsigned 1212static unsigned