Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
static Lisp_Object Qmonospace, Qsans_serif, Qserif, Qmono, Qsans, Qsans__serif;
/* Flag to tell if FcInit is already called or not. */
static Lisp_Object Qmonospace, Qsans_serif, Qserif, Qmono, Qsans, Qsans__serif;
/* Flag to tell if FcInit is already called or not. */
#ifdef HAVE_LIBOTF
/* The following four members must be here in this order to be
compatible with struct xftfont_info (in xftfont.c). */
#ifdef HAVE_LIBOTF
/* The following four members must be here in this order to be
compatible with struct xftfont_info (in xftfont.c). */
- val = make_save_value (NULL, 0);
- XSAVE_VALUE (val)->integer = 0;
- XSAVE_VALUE (val)->pointer = cache_data;
+ val = make_save_value (SAVE_TYPE_PTR_INT, cache_data, 0);
cache = Fcons (Qnil, val);
Fputhash (key, cache, ft_face_cache);
}
else
{
val = XCDR (cache);
cache = Fcons (Qnil, val);
Fputhash (key, cache, ft_face_cache);
}
else
{
val = XCDR (cache);
re[j] = '\0';
regexp = make_unibyte_string (re, j);
for (i = 0; fc_charset_table[i].name; i++)
re[j] = '\0';
regexp = make_unibyte_string (re, j);
for (i = 0; fc_charset_table[i].name; i++)
- if (fast_c_string_match_ignore_case (regexp, fc_charset_table[i].name) >= 0)
+ if (fast_c_string_match_ignore_case
+ (regexp, fc_charset_table[i].name,
+ strlen (fc_charset_table[i].name)) >= 0)
FT_Size ft_size;
FT_UInt size;
Lisp_Object val, filename, idx, cache, font_object;
FT_Size ft_size;
FT_UInt size;
Lisp_Object val, filename, idx, cache, font_object;
{
/* FT_Face in this cache is already used by the different size. */
if (FT_New_Size (ft_face, &ft_size) != 0)
{
/* FT_Face in this cache is already used by the different size. */
if (FT_New_Size (ft_face, &ft_size) != 0)
size = XINT (AREF (entity, FONT_SIZE_INDEX));
if (size == 0)
size = pixel_size;
if (FT_Set_Pixel_Sizes (ft_face, size, size) != 0)
{
size = XINT (AREF (entity, FONT_SIZE_INDEX));
if (size == 0)
size = pixel_size;
if (FT_Set_Pixel_Sizes (ft_face, size, size) != 0)
{
val = Fcons (font->props[FONT_FILE_INDEX], make_number (ftfont_info->index));
cache = ftfont_lookup_cache (val, FTFONT_CACHE_FOR_FACE);
val = Fcons (font->props[FONT_FILE_INDEX], make_number (ftfont_info->index));
cache = ftfont_lookup_cache (val, FTFONT_CACHE_FOR_FACE);
- (XSAVE_VALUE (val)->integer)--;
- if (XSAVE_VALUE (val)->integer == 0)
+ set_save_integer (val, 1, XSAVE_INTEGER (val, 1) - 1);
+ if (XSAVE_INTEGER (val, 1) == 0)
struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
FT_Face ft_face = ftfont_info->ft_size->face;
int width = 0;
struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
FT_Face ft_face = ftfont_info->ft_size->face;
int width = 0;
return (otf
&& (OTF_check_features (otf, 0, spec->script, spec->langsys,
NULL, 0) > 0
return (otf
&& (OTF_check_features (otf, 0, spec->script, spec->langsys,
NULL, 0) > 0
- gstring.glyphs = xnrealloc (gstring.glyphs, len * 2, sizeof (MFLTGlyph));
+ gstring.glyphs = xnrealloc (gstring.glyphs, len * 2,
+ sizeof *gstring.glyphs);
for (i = 0; i < len; i++)
{
Lisp_Object g = LGSTRING_GLYPH (lgstring, i);
for (i = 0; i < len; i++)
{
Lisp_Object g = LGSTRING_GLYPH (lgstring, i);
LGSTRING_SET_GLYPH (lgstring, i, lglyph);
}
LGLYPH_SET_FROM (lglyph, g->from);
LGSTRING_SET_GLYPH (lgstring, i, lglyph);
}
LGLYPH_SET_FROM (lglyph, g->from);
ASET (vec, 0, make_number (g->xoff >> 6));
ASET (vec, 1, make_number (g->yoff >> 6));
ASET (vec, 2, make_number (g->xadv >> 6));
ASET (vec, 0, make_number (g->xoff >> 6));
ASET (vec, 1, make_number (g->yoff >> 6));
ASET (vec, 2, make_number (g->xadv >> 6));