root/src/sfntfont.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


     1 /* sfnt format font driver for GNU Emacs.
     2 
     3 Copyright (C) 2023 Free Software Foundation, Inc.
     4 
     5 This file is part of GNU Emacs.
     6 
     7 GNU Emacs is free software: you can redistribute it and/or modify
     8 it under the terms of the GNU General Public License as published by
     9 the Free Software Foundation, either version 3 of the License, or (at
    10 your option) any later version.
    11 
    12 GNU Emacs is distributed in the hope that it will be useful,
    13 but WITHOUT ANY WARRANTY; without even the implied warranty of
    14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15 GNU General Public License for more details.
    16 
    17 You should have received a copy of the GNU General Public License
    18 along with GNU Emacs.  If not, write to the Free Software Foundation,
    19 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    20 
    21 #ifndef _SFNTFONT_H_
    22 #define _SFNTFONT_H_
    23 
    24 #include "lisp.h"
    25 #include "frame.h"
    26 #include "font.h"
    27 #include "sfnt.h"
    28 
    29 extern int sfnt_enum_font (const char *);
    30 
    31 
    32 /* Font driver callbacks.  */
    33 
    34 extern Lisp_Object sfntfont_list (struct frame *, Lisp_Object);
    35 extern Lisp_Object sfntfont_match (struct frame *, Lisp_Object);
    36 extern Lisp_Object sfntfont_open (struct frame *, Lisp_Object, int);
    37 
    38 extern unsigned int sfntfont_encode_char (struct font *, int);
    39 extern void sfntfont_text_extents (struct font *, const unsigned int *,
    40                                    int, struct font_metrics *);
    41 extern void sfntfont_close (struct font *);
    42 extern int sfntfont_draw (struct glyph_string *, int, int,
    43                           int, int, bool);
    44 extern Lisp_Object sfntfont_list_family (struct frame *);
    45 extern int sfntfont_get_variation_glyphs (struct font *, int, unsigned[256]);
    46 
    47 
    48 /* Initialization functions.  */
    49 
    50 typedef void (*sfntfont_put_glyph_proc) (struct glyph_string *, int, int,
    51                                          int, int, bool, struct sfnt_raster **,
    52                                          int *);
    53 
    54 extern void syms_of_sfntfont (void);
    55 extern void init_sfntfont (void);
    56 extern void mark_sfntfont (void);
    57 extern void init_sfntfont_vendor (Lisp_Object, const struct font_driver *,
    58                                   sfntfont_put_glyph_proc);
    59 
    60 
    61 /* mmap specific functions.  */
    62 
    63 #ifdef HAVE_MMAP
    64 
    65 extern bool sfntfont_detect_sigbus (void *);
    66 
    67 #endif /* HAVE_MMAP */
    68 
    69 
    70 
    71 /* HarfBuzz specific functions.  */
    72 
    73 #ifdef HAVE_HARFBUZZ
    74 
    75 extern hb_font_t *sfntfont_begin_hb_font (struct font *, double *);
    76 
    77 #endif /* HAVE_HARFBUZZ */
    78 
    79 #endif /* _SFNTFONT_H_ */

/* [<][>][^][v][top][bottom][index][help] */