freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][apodtele-master-patch-68578] 2 commits: * src/b


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][apodtele-master-patch-68578] 2 commits: * src/base/ftoutln.c (FT_Outline_Reverse): Anchor first contour points.
Date: Fri, 17 Feb 2023 04:14:11 +0000

Alexei Podtelezhnikov pushed to branch apodtele-master-patch-68578 at FreeType / FreeType

Commits:

  • 74ea5454
    by Alex Ringlein at 2023-02-16T22:38:35-05:00
    * src/base/ftoutln.c (FT_Outline_Reverse): Anchor first contour points.
    
    A cubic contour has to always start from an on-point. Therefore, we
    should not swap the first with the last point, which might be off, and
    obtain an invalid contour. This does not matter for conic contours.
    If anything, it also saves one swap there. Fixes #1207.
    
  • 1ca2efd6
    by Alexei Podtelezhnikov at 2023-02-17T04:14:07+00:00
    [truetype] Hide Infinality.
    
    Remove Infinality as an option before its complete extraction.
    
    * include/freetype/ftoption.h: Remove the Infinality option.
    * devel/ftoption.h: Ditto.
    * inclide/freetype/ftdriver.h (TT_INTERPRETER_VERSION_38): Is 40 now.
    

4 changed files:

Changes:

  • devel/ftoption.h
    ... ... @@ -661,36 +661,12 @@ FT_BEGIN_HEADER
    661 661
        * not) instructions in a certain way so that all TrueType fonts look like
    
    662 662
        * they do in a Windows ClearType (DirectWrite) environment.  See [1] for a
    
    663 663
        * technical overview on what this means.  See `ttinterp.h` for more
    
    664
    -   * details on the LEAN option.
    
    664
    +   * details on this option.
    
    665 665
        *
    
    666
    -   * There are three possible values.
    
    667
    -   *
    
    668
    -   * Value 1:
    
    669
    -   *   This value is associated with the 'Infinality' moniker, contributed by
    
    670
    -   *   an individual nicknamed Infinality with the goal of making TrueType
    
    671
    -   *   fonts render better than on Windows.  A high amount of configurability
    
    672
    -   *   and flexibility, down to rules for single glyphs in fonts, but also
    
    673
    -   *   very slow.  Its experimental and slow nature and the original
    
    674
    -   *   developer losing interest meant that this option was never enabled in
    
    675
    -   *   default builds.
    
    676
    -   *
    
    677
    -   *   The corresponding interpreter version is v38.
    
    678
    -   *
    
    679
    -   * Value 2:
    
    680
    -   *   The new default mode for the TrueType driver.  The Infinality code
    
    681
    -   *   base was stripped to the bare minimum and all configurability removed
    
    682
    -   *   in the name of speed and simplicity.  The configurability was mainly
    
    683
    -   *   aimed at legacy fonts like 'Arial', 'Times New Roman', or 'Courier'.
    
    684
    -   *   Legacy fonts are fonts that modify vertical stems to achieve clean
    
    685
    -   *   black-and-white bitmaps.  The new mode focuses on applying a minimal
    
    686
    -   *   set of rules to all fonts indiscriminately so that modern and web
    
    687
    -   *   fonts render well while legacy fonts render okay.
    
    688
    -   *
    
    689
    -   *   The corresponding interpreter version is v40.
    
    690
    -   *
    
    691
    -   * Value 3:
    
    692
    -   *   Compile both, making both v38 and v40 available (the latter is the
    
    693
    -   *   default).
    
    666
    +   * The new default mode focuses on applying a minimal set of rules to all
    
    667
    +   * fonts indiscriminately so that modern and web fonts render well while
    
    668
    +   * legacy fonts render okay.  The corresponding interpreter version is v40.
    
    669
    +   * The so-called Infinality mode (v38) is no longer available in FreeType.
    
    694 670
        *
    
    695 671
        * By undefining these, you get rendering behavior like on Windows without
    
    696 672
        * ClearType, i.e., Windows XP without ClearType enabled and Win9x
    
    ... ... @@ -705,9 +681,7 @@ FT_BEGIN_HEADER
    705 681
        * [1]
    
    706 682
        * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
    
    707 683
        */
    
    708
    -/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1     */
    
    709
    -/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2     */
    
    710
    -#define TT_CONFIG_OPTION_SUBPIXEL_HINTING     ( 1 | 2 )
    
    684
    +#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
    
    711 685
     
    
    712 686
     
    
    713 687
       /**************************************************************************
    
    ... ... @@ -977,21 +951,14 @@ FT_BEGIN_HEADER
    977 951
     
    
    978 952
     
    
    979 953
       /*
    
    980
    -   * The next three macros are defined if native TrueType hinting is
    
    954
    +   * The next two macros are defined if native TrueType hinting is
    
    981 955
        * requested by the definitions above.  Don't change this.
    
    982 956
        */
    
    983 957
     #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
    
    984 958
     #define  TT_USE_BYTECODE_INTERPRETER
    
    985
    -
    
    986 959
     #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
    
    987
    -#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1
    
    988
    -#define  TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
    
    989
    -#endif
    
    990
    -
    
    991
    -#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2
    
    992 960
     #define  TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
    
    993 961
     #endif
    
    994
    -#endif
    
    995 962
     #endif
    
    996 963
     
    
    997 964
     
    

  • include/freetype/config/ftoption.h
    ... ... @@ -661,36 +661,12 @@ FT_BEGIN_HEADER
    661 661
        * not) instructions in a certain way so that all TrueType fonts look like
    
    662 662
        * they do in a Windows ClearType (DirectWrite) environment.  See [1] for a
    
    663 663
        * technical overview on what this means.  See `ttinterp.h` for more
    
    664
    -   * details on the LEAN option.
    
    664
    +   * details on this option.
    
    665 665
        *
    
    666
    -   * There are three possible values.
    
    667
    -   *
    
    668
    -   * Value 1:
    
    669
    -   *   This value is associated with the 'Infinality' moniker, contributed by
    
    670
    -   *   an individual nicknamed Infinality with the goal of making TrueType
    
    671
    -   *   fonts render better than on Windows.  A high amount of configurability
    
    672
    -   *   and flexibility, down to rules for single glyphs in fonts, but also
    
    673
    -   *   very slow.  Its experimental and slow nature and the original
    
    674
    -   *   developer losing interest meant that this option was never enabled in
    
    675
    -   *   default builds.
    
    676
    -   *
    
    677
    -   *   The corresponding interpreter version is v38.
    
    678
    -   *
    
    679
    -   * Value 2:
    
    680
    -   *   The new default mode for the TrueType driver.  The Infinality code
    
    681
    -   *   base was stripped to the bare minimum and all configurability removed
    
    682
    -   *   in the name of speed and simplicity.  The configurability was mainly
    
    683
    -   *   aimed at legacy fonts like 'Arial', 'Times New Roman', or 'Courier'.
    
    684
    -   *   Legacy fonts are fonts that modify vertical stems to achieve clean
    
    685
    -   *   black-and-white bitmaps.  The new mode focuses on applying a minimal
    
    686
    -   *   set of rules to all fonts indiscriminately so that modern and web
    
    687
    -   *   fonts render well while legacy fonts render okay.
    
    688
    -   *
    
    689
    -   *   The corresponding interpreter version is v40.
    
    690
    -   *
    
    691
    -   * Value 3:
    
    692
    -   *   Compile both, making both v38 and v40 available (the latter is the
    
    693
    -   *   default).
    
    666
    +   * The new default mode focuses on applying a minimal set of rules to all
    
    667
    +   * fonts indiscriminately so that modern and web fonts render well while
    
    668
    +   * legacy fonts render okay.  The corresponding interpreter version is v40.
    
    669
    +   * The so-called Infinality mode (v38) is no longer available in FreeType.
    
    694 670
        *
    
    695 671
        * By undefining these, you get rendering behavior like on Windows without
    
    696 672
        * ClearType, i.e., Windows XP without ClearType enabled and Win9x
    
    ... ... @@ -705,9 +681,7 @@ FT_BEGIN_HEADER
    705 681
        * [1]
    
    706 682
        * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
    
    707 683
        */
    
    708
    -/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1         */
    
    709
    -#define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2
    
    710
    -/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 ) */
    
    684
    +#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
    
    711 685
     
    
    712 686
     
    
    713 687
       /**************************************************************************
    
    ... ... @@ -977,21 +951,14 @@ FT_BEGIN_HEADER
    977 951
     
    
    978 952
     
    
    979 953
       /*
    
    980
    -   * The next three macros are defined if native TrueType hinting is
    
    954
    +   * The next two macros are defined if native TrueType hinting is
    
    981 955
        * requested by the definitions above.  Don't change this.
    
    982 956
        */
    
    983 957
     #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
    
    984 958
     #define  TT_USE_BYTECODE_INTERPRETER
    
    985
    -
    
    986 959
     #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
    
    987
    -#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1
    
    988
    -#define  TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
    
    989
    -#endif
    
    990
    -
    
    991
    -#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2
    
    992 960
     #define  TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
    
    993 961
     #endif
    
    994
    -#endif
    
    995 962
     #endif
    
    996 963
     
    
    997 964
     
    

  • include/freetype/ftdriver.h
    ... ... @@ -651,11 +651,8 @@ FT_BEGIN_HEADER
    651 651
        *     Windows~98; only grayscale and B/W rasterizing is supported.
    
    652 652
        *
    
    653 653
        *   TT_INTERPRETER_VERSION_38 ::
    
    654
    -   *     Version~38 corresponds to MS rasterizer v.1.9; it is roughly
    
    655
    -   *     equivalent to the hinting provided by DirectWrite ClearType (as can
    
    656
    -   *     be found, for example, in the Internet Explorer~9 running on
    
    657
    -   *     Windows~7).  It is used in FreeType to select the 'Infinality'
    
    658
    -   *     subpixel hinting code.  The code may be removed in a future version.
    
    654
    +   *     Version~38 is the same Version~40. The original 'Infinality' code is
    
    655
    +   *     no longer available.
    
    659 656
        *
    
    660 657
        *   TT_INTERPRETER_VERSION_40 ::
    
    661 658
        *     Version~40 corresponds to MS rasterizer v.2.1; it is roughly
    
    ... ... @@ -760,7 +757,7 @@ FT_BEGIN_HEADER
    760 757
        *
    
    761 758
        */
    
    762 759
     #define TT_INTERPRETER_VERSION_35  35
    
    763
    -#define TT_INTERPRETER_VERSION_38  38
    
    760
    +#define TT_INTERPRETER_VERSION_38  40
    
    764 761
     #define TT_INTERPRETER_VERSION_40  40
    
    765 762
     
    
    766 763
     
    

  • src/base/ftoutln.c
    ... ... @@ -556,6 +556,10 @@
    556 556
         {
    
    557 557
           last  = outline->contours[n];
    
    558 558
     
    
    559
    +      /* keep the first contour point as is and swap points around it */
    
    560
    +      /* to guarantee that the cubic arches stay valid after reverse  */
    
    561
    +      first++;
    
    562
    +
    
    559 563
           /* reverse point table */
    
    560 564
           {
    
    561 565
             FT_Vector*  p = outline->points + first;
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]