[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src ftfont.c
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] emacs/src ftfont.c |
Date: |
Tue, 27 Jan 2009 05:09:42 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kenichi Handa <handa> 09/01/27 05:09:42
Modified files:
src : ftfont.c
Log message:
(ftfont_has_char): If the arg FONT is a font-object,
directly use GT_Get_Char_index.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ftfont.c?cvsroot=emacs&r1=1.43&r2=1.44
Patches:
Index: ftfont.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ftfont.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- ftfont.c 19 Jan 2009 12:07:32 -0000 1.43
+++ ftfont.c 27 Jan 2009 05:09:42 -0000 1.44
@@ -62,7 +62,7 @@
{
struct font font;
#ifdef HAVE_LIBOTF
- /* The following three members must be here in this order to be
+ /* The following four members must be here in this order to be
compatible with struct xftfont_info (in xftfont.c). */
int maybe_otf; /* Flag to tell if this may be OTF or not. */
OTF *otf;
@@ -1189,13 +1189,24 @@
}
static int
-ftfont_has_char (entity, c)
- Lisp_Object entity;
+ftfont_has_char (font, c)
+ Lisp_Object font;
int c;
{
- FcCharSet *charset = ftfont_get_fc_charset (entity);
+ if (FONT_ENTITY_P (font))
+ {
+ FcCharSet *charset = ftfont_get_fc_charset (font);
return (FcCharSetHasChar (charset, c) == FcTrue);
+ }
+ else
+ {
+ struct ftfont_info *ftfont_info;
+
+ ftfont_info = (struct ftfont_info *) XFONT_OBJECT (font);
+ return (FT_Get_Char_Index (ftfont_info->ft_size->face, (FT_ULong) c)
+ != 0);
+ }
}
static unsigned