Edit

kc3-lang/freetype/src/autofit/autofit.c

Branch :

  • Show log

    Commit

  • Author : Werner Lemberg
    Date : 2025-06-13 11:23:14
    Hash : cda418a4
    Message : [autofit] Speed up computation of `af_reverse_character_map_new`. (1/4) Using HarfBuzz's API functions to construct the reverse map is too slow; we have to call `hb_ot_layout_lookup_get_glyph_alternates` far too often because it can only handle a single glyph at a time. For this reason we are going to parse the GSUB table by ourselves. The new non-local functions are `af_parse_gsub` and `af_map_lookup`. * src/autofit/afgsub.c, src/autofit/afgsub.h: New files for parsing, validating, and mapping the `SingleSubst` and `AlternateSubst` subtable types of a GSUB table. * src/autofit/autofit.c, src/autofit/rules.mk (AUTOF_DRV_SRC): Updated.

  • src/autofit/autofit.c
  • /****************************************************************************
     *
     * autofit.c
     *
     *   Auto-fitter module (body).
     *
     * Copyright (C) 2003-2024 by
     * David Turner, Robert Wilhelm, and Werner Lemberg.
     *
     * This file is part of the FreeType project, and may only be used,
     * modified, and distributed under the terms of the FreeType project
     * license, LICENSE.TXT.  By continuing to use, modify, or distribute
     * this file you indicate that you have read the license and
     * understand and accept it fully.
     *
     */
    
    
    #define FT_MAKE_OPTION_SINGLE_OBJECT
    
    #include "ft-hb.c"
    #include "ft-hb-ft.c"
    #include "afadjust.c"
    #include "afblue.c"
    #include "afcjk.c"
    #include "afdummy.c"
    #include "afglobal.c"
    #include "afgsub.c"
    #include "afhints.c"
    #include "afindic.c"
    #include "aflatin.c"
    #include "afloader.c"
    #include "afmodule.c"
    #include "afranges.c"
    #include "afshaper.c"
    
    
    /* END */