freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [cff, truetype] Always set up default v


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] [cff, truetype] Always set up default variable instance.
Date: Thu, 29 Feb 2024 06:10:28 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

  • 2a790a9f
    by Ben Wanger at 2024-02-29T07:06:46+01:00
    [cff, truetype] Always set up default variable instance.
    
    For default variable instances `cff_face_init` did not set the blend.  This
    mostly worked as later use of the unset blend produced the default
    variation.  However, if a user called `TT_Get_MM_Var` the blend would be
    partially set up, but not fully.  In particular the number of axes, the axis
    definitions, and the instance locations would be set up, but not the current
    instance location (`coords` and `normalizedcoords`).  This could lead to the
    default instances of CFF2 fonts erroring on any use of `blend`.
    
    Ensure the default variable instance is fully set up by always calling
    `FT_Set_Named_Instance` on a variable face.
    
    * src/cff/cffobjs.c (cff_face_init): Call `FT_Set_Named_Instance` on
    default instances.
    * src/truetype/ttobjs.c (tt_face_init): Ditto.
    
    Fixes #1268.
    

2 changed files:

Changes:

  • src/cff/cffobjs.c
    ... ... @@ -694,8 +694,7 @@
    694 694
             FT_UInt  instance_index = (FT_UInt)face_index >> 16;
    
    695 695
     
    
    696 696
     
    
    697
    -        if ( FT_HAS_MULTIPLE_MASTERS( cffface ) &&
    
    698
    -             instance_index > 0                 )
    
    697
    +        if ( FT_HAS_MULTIPLE_MASTERS( cffface ) )
    
    699 698
             {
    
    700 699
               error = FT_Set_Named_Instance( cffface, instance_index );
    
    701 700
               if ( error )
    

  • src/truetype/ttobjs.c
    ... ... @@ -784,8 +784,7 @@
    784 784
           FT_UInt  instance_index = (FT_UInt)face_index >> 16;
    
    785 785
     
    
    786 786
     
    
    787
    -      if ( FT_HAS_MULTIPLE_MASTERS( ttface ) &&
    
    788
    -           instance_index > 0                )
    
    787
    +      if ( FT_HAS_MULTIPLE_MASTERS( ttface ) )
    
    789 788
           {
    
    790 789
             error = FT_Set_Named_Instance( ttface, instance_index );
    
    791 790
             if ( error )
    


  • reply via email to

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