freetype2/include/freetype/internal
Ben Wagner e78e2d29a9 [sfnt, truetype] Add `size_reset` to `MetricsVariations`.
This is a generalization of commit

```
commit e6699596af
Author: Werner Lemberg <wl@gnu.org>
Date:   Thu Feb 2 11:38:04 2017 +0100

    [truetype] Fix MVAR post-action handling.
```

It is also possible for plain `CFF ` style fonts to contain an `fvar` and
`MVAR` table and use `cff_metrics_adjust`.  `tt_size_reset` should only be
called with `TT_Size` and never with `CFF_Size`.

Allow the "metrics-variations" service to specify the correct function (if
any) to reset `FT_Size`s after adjusting metrics.

* src/truetype/ttobjs.c (tt_size_reset): Split off some functionality
into...
(tt_size_reset_height): ... this new function.

* src/truetype/ttdriver.c (tt_service_metrics_variations): Add
`size_reset`.
(tt_size_select, tt_size_request): Updated.

* src/truetype/ttobjs.h: Updated.

* include/freetype/internal/services/svmetric.h (MetricsVariations): Add
`size_reset`.
(FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Updated.

* include/freetype/internal/tttypes.h (TT_FaceRec_): Rename `var` to
`tt_var` and add `face_var`.

* src/cff/cffdrivr.c (cff_service_metrics_variations): Add `size_reset`.
(cff_hadvance_adjust, cff_metrics_adjust): Updated.

* src/cff/cffobjs.c (cff_face_init): Use `face_var`.

* src/sfnt/sfobjs.c (sfnt_init_face): Initialize `face_var`.

* src/sfnt/ttmtx.c (tt_face_get_metrics): Use `tt_var`.

* src/truetype/ttgxvar.c (tt_size_reset_iterator): Renamed to...
(ft_size_reset_iterator): ... this new function.
Call `size_reset`.
(tt_apply_mvar): Pass `size_reset` to `ft_size_reset_iterator`.

Fixes #1211
2023-04-11 10:20:58 +02:00
..
services [sfnt, truetype] Add `size_reset` to `MetricsVariations`. 2023-04-11 10:20:58 +02:00
autohint.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
cffotypes.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
cfftypes.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
compiler-macros.h * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Update. 2023-03-01 06:36:59 +01:00
ftcalc.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftdebug.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftdrv.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftgloadr.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
fthash.h Remove redundant inclusion of `ft2build.h'. 2020-06-13 21:15:45 +02:00
ftmemory.h Avoid reserved identifiers that are globally defined. 2023-02-08 21:09:30 +01:00
ftmmtypes.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftobjs.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftpsprop.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftrfork.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftserv.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftstream.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
fttrace.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftvalid.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
psaux.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
pshints.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
sfnt.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
svginterface.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
t1types.h Comment on optional ascender and descender. 2023-02-04 09:47:44 -05:00
tttypes.h [sfnt, truetype] Add `size_reset` to `MetricsVariations`. 2023-04-11 10:20:58 +02:00
wofftypes.h Update all copyright notices. 2023-01-17 09:18:25 +01:00