• Show log

    Commit

  • Hash : b04db387
    Author : Werner Lemberg
    Date : 2025-07-04T19:52:53

    [sfnt] Rewrite GPOS kerning support. (2/2)
    
    The previous code had a fundamental flaw: it didn't validate the necessary
    parts of the 'GPOS' table before accessing it, causing crashes with
    malformed data (since `TT_CONFIG_OPTION_GPOS_KERNING` is off by default,
    standard fuzzers don't catch these problems).  Additionally, it did a lot of
    parsing while accessing kerning data, making it rather slow.
    
    The new implementation fixes this.  After validation, offsets to the 'GPOS'
    lookup subtables used in the 'kern' feature that correspond to 'simple'
    kerning (i.e., similar to 'kern' table kerning) are stored in `TT_Face`;
    this greatly simplifies and accelerates access to the kerning data.
    
    Testing with font `SF-Pro.ttf` version '1.00', the validation time for the
    'GPOS' table increases the start-up time of `FT_New_Face` by less than 1%,
    while calls to `FT_Get_Kerning` become about 3.5 times faster.
    
    * include/freetype/internal (gpos_kerning_available): Replace with...
      (gpos_lookups_kerning, num_gpos_lookups_kerning): ... these new fields.
      Update callers.
    
    * src/ttgpos.c [TT_CONFIG_OPTION_GPOS_KERNING]: A new implementation.
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/freetype.git
    Git SSH git@git.kmx.io:kc3-lang/freetype.git
    Public access ? public
    Description
    Users
    thodg_m kc3_lang_org thodg_w www_kmx_io thodg_l thodg
    Tags

  • README

  • After saying `make refdoc' or `make refdoc-venv' the `reference/' directory
    contains the FreeType API reference.  You need Python >= 3.5 and pip to make
    this target.
    
    There are two ways to generate the documentation:
    
    1. Using `make refdoc':
    
        - Ensure `python' and `pip' are available.
        - Install pip package `docwriter' with `pip install --user docwriter'.
        - Make target with `make refdoc'.
        - This target can be run offline once required packages are installed.
    
    2. Using `make refdoc-venv' (requires internet access):
    
        - Ensure `python', `pip' and Python package `virtualenv' are available.
        - Make target with `make refdoc-venv'.
        - This may or may not require internet access every time depending on
        pip and system caching.
    
    Some troubleshooting tips:
    
    * Regularly run `pip install --upgrade docwriter' to check for updates which
    may include bug fixes.
    
    * `Docwriter' does not support Python 2.  Ensure that Python >= 3.5 is
    installed and available as `python3'/`python'.
    
    * Ensure that `docwriter' is installed in the same Python target that
    `make refdoc' uses (python3/python).
    
    * If none of this works, send a mail to `freetype-devel@nongnu.org' or file
    an issue at `https://github.com/freetype/docwriter/issues'.