[cairo] OpenType font variations and cairo

Matthias Clasen matthias.clasen at gmail.com
Thu Sep 21 22:48:42 UTC 2017


I found one typo in your cairo fixes, Behdad:

diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 7d823c284..107746794 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -3664,7 +3664,7 @@ cairo_ft_apply_variations (FT_Face     face,
        if (instance_id && instance_id <= ft_mm_var->num_namedstyles)
        {
            FT_Var_Named_Style *instance =
&ft_mm_var->namedstyle[instance_id - 1];
-           memcpy (coords, instance->coords, ft_mm_var->num_axis & sizeof
(*coords));
+           memcpy (coords, instance->coords, ft_mm_var->num_axis * sizeof
(*coords));
        }
        else
            for (i = 0; i < ft_mm_var->num_axis; i++)

‚Äč
After fixing that, I _still_ get failures of my cairo tests. Here is what
happens: One of my tests happens to
set the axes to the coords of a named instance. freetype takes that as a
signal to turn the FT_Face into a
named instance, and then the next test that doesn't explicitly sets a
weight value gets the named instance
coordinate instead of the axis default. Not sure who to blame here, but the
end result is confusng and
suboptimal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20170921/050ffc7e/attachment.html>


More information about the cairo mailing list