Re: OpenType font variations and cairo

Matthias Clasen <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAFwd_vBUDKmbtv4gzh+QBgWM83aTMj37mTTBziDXdQK+f9LMxA@mail.gmail.com>
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.

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.