[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recalculate glyph metrics for variable fonts
From: |
Werner LEMBERG |
Subject: |
Re: Recalculate glyph metrics for variable fonts |
Date: |
Wed, 05 Jan 2022 06:53:05 +0000 (UTC) |
> I am trying to adjust the weight of a variable font, Source Code Pro
> in particular (https://fonts.google.com/specimen/Source+Code+Pro).
>
> I simply call FT_Set_Var_Design_Coordinates with the appropriate
> parameters, and it basically works, however, it seems to break all
> the glyph metrics and the whole line of text is displayed with
> overlapping glyphs, like the advance has become incorrect.
>
> This only happens when setting a design coordinate. Do I need to
> recalculate the metrics or something after changing a variable? I
> had a look around the docs but could not figure out what I'm doing
> wrong. Currently using FreeType 2.10.1.
Please check the `ftmulti` FreeType demo program; maybe it gives the
answer you need – If I compile it from current git, the metrics stay
the same for Source Code Pro.
Otherwise please post a small, *compilable* example (preferably to be
executed on the command line) that shows your problem.
Werner