#include "font.h"
#include "ftfont.h"
-/* Symbolic type of this font-driver. */
-static Lisp_Object Qfreetype;
-
-/* Fontconfig's generic families and their aliases. */
-static Lisp_Object Qmonospace, Qsans_serif, Qserif, Qmono, Qsans, Qsans__serif;
-
/* Flag to tell if FcInit is already called or not. */
static bool fc_initialized;
if (NILP (cache))
{
if (NILP (ft_face_cache))
- {
- Lisp_Object args[2];
-
- args[0] = QCtest;
- args[1] = Qequal;
- ft_face_cache = Fmake_hash_table (2, args);
- }
+ ft_face_cache = CALLN (Fmake_hash_table, QCtest, Qequal);
cache_data = xmalloc (sizeof *cache_data);
cache_data->ft_face = NULL;
cache_data->fc_charset = NULL;
Lisp_Object
ftfont_shape (Lisp_Object lgstring)
{
- struct font *font;
- struct ftfont_info *ftfont_info;
- OTF *otf;
+ struct font *font = CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring));
+ struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
+ OTF *otf = ftfont_get_otf (ftfont_info);
- CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring), font);
- ftfont_info = (struct ftfont_info *) font;
- otf = ftfont_get_otf (ftfont_info);
if (! otf)
return make_number (0);
return ftfont_shape_by_flt (lgstring, font, ftfont_info->ft_size->face, otf,
void
syms_of_ftfont (void)
{
+ /* Symbolic type of this font-driver. */
DEFSYM (Qfreetype, "freetype");
+
+ /* Fontconfig's generic families and their aliases. */
DEFSYM (Qmonospace, "monospace");
DEFSYM (Qsans_serif, "sans-serif");
DEFSYM (Qserif, "serif");