[prev in list] [next in list] [prev in thread] [next in thread]
List: cairo
Subject: Re: [cairo] OpenType font variations and cairo
From: Matthias Clasen <matthias.clasen () gmail ! com>
Date: 2017-09-21 22:48:42
Message-ID: CAFwd_vBUDKmbtv4gzh+QBgWM83aTMj37mTTBziDXdQK+f9LMxA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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.
[Attachment #5 (text/html)]
<div dir="ltr">I found one typo in your cairo fixes, Behdad:<br><div><br>diff --git \
a/src/cairo-ft-font.c b/src/cairo-ft-font.c<br>index 7d823c284..107746794 \
100644<br>--- a/src/cairo-ft-font.c<br>+++ b/src/cairo-ft-font.c<br>@@ -3664,7 \
+3664,7 @@ cairo_ft_apply_variations (FT_Face face,<br> if \
(instance_id && instance_id <= ft_mm_var->num_namedstyles)<br> \
{<br> FT_Var_Named_Style *instance = \
&ft_mm_var->namedstyle[instance_id - 1];<br>- memcpy \
(coords, instance->coords, ft_mm_var->num_axis & sizeof (*coords));<br>+ \
memcpy (coords, instance->coords, ft_mm_var->num_axis * sizeof (*coords));<br> \
}<br> else<br> for (i = 0; i < \
ft_mm_var->num_axis; i++)<br></div><div><br></div><div></div><div>After fixing \
that, I _still_ get failures of my cairo tests. Here is what happens: One of my tests \
happens to</div><div>set the axes to the coords of a named instance. freetype takes \
that as a signal to turn the FT_Face into a</div><div>named instance, and then the \
next test that doesn't explicitly sets a weight value gets the named \
instance</div><div>coordinate instead of the axis default. Not sure who to blame \
here, but the end result is confusng and</div><div>suboptimal.<br></div></div>
[Attachment #6 (text/plain)]
--
cairo mailing list
cairo@cairographics.org
https://lists.cairographics.org/mailman/listinfo/cairo
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic