Issue of the Implementation # V0028


FT_Get_MM_Var returns incorrect default values for design coordinates

Detailed Description

According to FreeType2 API reference, FT_Get_MM_Var retrieves the Multiple Masters descriptor corresponding to a given Multiple Master font. The description of FT_Var_Axis structure also states that

FreeType computes meaningful default values for MM; it is then an integer value, not in 16.16 format.

That means that the default value of a design coordinate should be at least not less than the minimum value and not greater than the maximum value for this coordinate.

For example, for the first axis (design coordinate) of 'ZX______.PFB' font (see the attached archive), minimum and maximum values are 50 and 1450 (0x00320000 and 0x05AA0000 in 16.16 fixed point format), respectively.

FT_Get_MM_Var, however, chooses the default value for this axis outside of the allowed range for this design coordinate: 0xFBD20000 and 0x000001A3FBD20000 on 32-bit and 64-bit systems, respectively.

In addition, when FT_Get_MM_Var does return a value that fits between maximum and minimum, it is in 16.16 fixed point format unlike the reference says:

it is then an integer value, not in 16.16 format

Problem location(s) in the standard

Linux Standard Base Desktop Specification 3.2, Chapter 12. Libraries, 12.1 Interfaces for libfreetype that refers FreeType-2.1.10 API Reference, section "Multiple Masters"


  1. Unpack the attached archive
  2. Build the sample C program contained in it
  3. Run the program with font file name as its argument:
    ./multiple_masters ZX______.PFB
    ./multiple_masters ZY______.PFB


freetype 2.1.10 or later


freetype-devel mailing list, #26, 2008.11


Fixed in freetype 2.3.8