Skip to content

[mm] Always setup 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 paritally 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 (closed)

Merge request reports