tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ft-hb.h (1795B)


      1 /****************************************************************************
      2 *
      3 * ft-hb.h
      4 *
      5 *   FreeType-HarfBuzz bridge (specification).
      6 *
      7 * Copyright (C) 2025 by
      8 * Behdad Esfahbod.
      9 *
     10 * This file is part of the FreeType project, and may only be used,
     11 * modified, and distributed under the terms of the FreeType project
     12 * license, LICENSE.TXT.  By continuing to use, modify, or distribute
     13 * this file you indicate that you have read the license and
     14 * understand and accept it fully.
     15 *
     16 */
     17 
     18 
     19 #ifndef FT_HB_H
     20 #define FT_HB_H
     21 
     22 #include <freetype/internal/compiler-macros.h>
     23 #include <freetype/freetype.h>
     24 
     25 
     26 FT_BEGIN_HEADER
     27 
     28 #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
     29 
     30 #  include "ft-hb-types.h"
     31 
     32 #  ifdef FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC
     33 
     34 #    define HB_EXTERN( ret, name, args ) \
     35              typedef ret (*ft_ ## name ## _func_t) args;
     36 #    include "ft-hb-decls.h"
     37 #    undef HB_EXTERN
     38 
     39  typedef struct ft_hb_funcs_t
     40  {
     41 #    define HB_EXTERN( ret, name, args ) \
     42              ft_ ## name ## _func_t  name;
     43 #    include "ft-hb-decls.h"
     44 #    undef HB_EXTERN
     45  } ft_hb_funcs_t;
     46 
     47  struct  AF_ModuleRec_;
     48 
     49  FT_LOCAL( void )
     50  ft_hb_funcs_init( struct AF_ModuleRec_  *af_module );
     51 
     52  FT_LOCAL( void )
     53  ft_hb_funcs_done( struct AF_ModuleRec_  *af_module );
     54 
     55 #    define hb( x )  globals->module->hb_funcs->hb_ ## x
     56 
     57 #  else /* !FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC */
     58 
     59 #    define HB_EXTERN( ret, name, args ) \
     60              ret name args;
     61 #    include "ft-hb-decls.h"
     62 #    undef HB_EXTERN
     63 
     64 #    define hb( x )  hb_ ## x
     65 
     66 #  endif /* !FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC */
     67 
     68 #endif /* FT_CONFIG_OPTION_USE_HARFBUZZ */
     69 
     70 
     71  struct AF_FaceGlobalsRec_;
     72 
     73  FT_LOCAL( FT_Bool )
     74  ft_hb_enabled( struct AF_FaceGlobalsRec_  *globals );
     75 
     76 
     77 FT_END_HEADER
     78 
     79 #endif /* FT_HB_H */
     80 
     81 
     82 /* END */