freetype2/src
Werner Lemberg cc79174dce [truetype] Fix PostScript name handling for variation fonts.
A variation font's PostScript name of a named instance is usually different
from the PostScript name of an unnamed instance.  However, if a change
between a named instance and an unnamed instance with exactly the same
design axis values happened, it was possible that the PostScript name wasn't
correctly updated.

This commit reorganizes the code to handle this issue within the top-level
API functions, using a new service to trigger recomputation of the
PostScript name.

* include/freetype/internal/services/svmm.h (FT_Construct_PS_Name_Func): New
typedef.
(FT_Service_MultiMasters): New field `construct_ps_name`.
(FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.

* src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Call
`mm->construct_ps_name` to handle `postscript_name`.
(FT_Set_Named_Instance): Call `mm->construct_ps_name` to handle
`postscript_name`.
Use shortcut.
* src/cff/cffdrivr.c (cff_construct_ps_name): New function.
(cff_service_multi_masters): Updated.

* src/truetype/ttgxvar.c (tt_set_mm_blend): Don't handle `postscript_name`.
(TT_Set_MM_Blend): Simplify.
(TT_Set_Named_Instance): Return -1 if axis values haven't changed.
Don't set `face_index`.
(tt_construct_ps_name): New function.

* src/truetype/ttgxvar.h: Updated.

* src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.

* src/type1/t1driver.c (t1_service_multi_masters): Updated.

* src/type1/t1load.c (T1_Set_MM_Blend): Simplify.
2023-05-06 16:47:04 +02:00
..
autofit s/this is,/that is,/ 2023-04-27 06:24:48 +02:00
base [truetype] Fix PostScript name handling for variation fonts. 2023-05-06 16:47:04 +02:00
bdf [bdf] Clean up the atom property parsing. 2023-04-26 23:15:24 -04:00
bzip2 Update all copyright notices. 2023-01-17 09:18:25 +01:00
cache Update all copyright notices. 2023-01-17 09:18:25 +01:00
cff [truetype] Fix PostScript name handling for variation fonts. 2023-05-06 16:47:04 +02:00
cid * src/cid/cidgload.c (cid_load_glyph): Fix compiler warnings. 2023-04-28 06:54:25 +02:00
dlg * src/*: Replace leading underscores with trailing ones in dummy variables. 2023-02-26 20:18:54 +01:00
gxvalid Update all copyright notices. 2023-01-17 09:18:25 +01:00
gzip [gzip] File `infback.c` is not needed. 2023-03-07 08:55:58 +01:00
lzw Fix 'fall-through' warning messages. 2023-02-08 21:09:32 +01:00
otvalid Update all copyright notices. 2023-01-17 09:18:25 +01:00
pcf Whitespace. 2023-01-28 17:04:11 +01:00
pfr Align `char_next` return types. 2023-04-10 15:30:43 +00:00
psaux Align `char_next` return types. 2023-04-10 15:30:43 +00:00
pshinter s/this is,/that is,/ 2023-04-27 06:24:48 +02:00
psnames Align `char_next` return types. 2023-04-10 15:30:43 +00:00
raster [raster] Clean up contour indexing. 2023-02-21 16:17:07 +00:00
sdf s/this is,/that is,/ 2023-04-27 06:24:48 +02:00
sfnt New Variation Font function `FT_Get_Default_Named_Instance`. 2023-04-28 10:44:14 +02:00
smooth [base] Clean up contour indexing. 2023-02-20 16:33:45 +00:00
svg Update all copyright notices. 2023-01-17 09:18:25 +01:00
tools apinames.c: Add comment. 2023-03-08 10:49:42 +01:00
truetype [truetype] Fix PostScript name handling for variation fonts. 2023-05-06 16:47:04 +02:00
type1 [truetype] Fix PostScript name handling for variation fonts. 2023-05-06 16:47:04 +02:00
type42 Fix 'fall-through' warning messages. 2023-02-08 21:09:32 +01:00
winfonts Align `char_next` return types. 2023-04-10 15:30:43 +00:00