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, see <https://www.gnu.org/licenses/>.  */
    19 
    20 #ifndef _SFNTFONT_H_
    21 #define _SFNTFONT_H_
    22 
    23 #include "lisp.h"
    24 #include "frame.h"
    25 #include "font.h"
    26 #include "sfnt.h"
    27 
    28 extern int sfnt_enum_font (const char *);
    29 
    30 
    31 /* Font driver callbacks.  */
    32 
    33 extern Lisp_Object sfntfont_list (struct frame *, Lisp_Object);
    34 extern Lisp_Object sfntfont_match (struct frame *, Lisp_Object);
    35 extern Lisp_Object sfntfont_open (struct frame *, Lisp_Object, int);
    36 
    37 extern unsigned int sfntfont_encode_char (struct font *, int);
    38 extern void sfntfont_text_extents (struct font *, const unsigned int *,
    39                                    int, struct font_metrics *);
    40 extern void sfntfont_close (struct font *);
    41 extern int sfntfont_draw (struct glyph_string *, int, int,
    42                           int, int, bool);
    43 extern Lisp_Object sfntfont_list_family (struct frame *);
    44 extern int sfntfont_get_variation_glyphs (struct font *, int, unsigned[256]);
    45 
    46 
    47 /* Initialization functions.  */
    48 
    49 typedef void (*sfntfont_put_glyph_proc) (struct glyph_string *, int, int,
    50                                          int, int, bool, struct sfnt_raster **,
    51                                          int *);
    52 
    53 extern void syms_of_sfntfont (void);
    54 extern void init_sfntfont (void);
    55 extern void mark_sfntfont (void);
    56 extern void init_sfntfont_vendor (Lisp_Object, const struct font_driver *,
    57                                   sfntfont_put_glyph_proc);
    58 
    59 
    60 /* mmap specific functions.  */
    61 
    62 #ifdef HAVE_MMAP
    63 
    64 extern bool sfntfont_detect_sigbus (void *);
    65 
    66 #endif /* HAVE_MMAP */
    67 
    68 
    69 
    70 /* HarfBuzz specific functions.  */
    71 
    72 #ifdef HAVE_HARFBUZZ
    73 
    74 extern hb_font_t *sfntfont_begin_hb_font (struct font *, double *);
    75 
    76 #endif /* HAVE_HARFBUZZ */
    77 
    78 #endif /* _SFNTFONT_H_ */

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