[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetype-devel
Subject:    Re: [ft-devel] Problem with FT_Get_MM_Var
From:       Matthias Clasen <matthias.clasen () gmail ! com>
Date:       2017-09-18 10:54:21
Message-ID: CAFwd_vBaU0n1JV_vAQ7awjYW-METtJk1o9Vp70kXjF=8T6ZHtw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Mon, Sep 18, 2017 at 2:35 AM, Werner LEMBERG <wl@gnu.org> wrote:

> > I am working on adding font variations support to cairo, and I am
> > hitting a strange problem in my tests: the first call to
> > FT_Get_MM_Var after FT_New_Face fails with an error code of 85.  If
> > I simply repeat the FT_Get_MM_Var call, everything is fine and
> > things work as expected.
>
> I'm not sure whether you mean 85 or 0x85...  Can you provide a MWE
> that I can compile for further testing?
>

Might take me a bit to create a freetype-only testcase. In the meantime,
here is some more details:
The cairo code I see this problem with essentially does:

 FT_New_Face (font_map->ft_library,
                         unscaled->filename,
                         unscaled->id,
                         &face);

...

 ret = FT_Get_MM_Var (face, &ft_mm_var);
 if (ret != 0) {
        printf ("FT_Get_MM_Var failed: %s\n", getErrorMessage (ret));
        ret = FT_Get_MM_Var (face, &ft_mm_var);
        if (ret == 0)
            printf ("Trying again works. Odd\n");
 }

and this is the output I see:

TESTING font-variations
FT_Get_MM_Var failed: invalid stream operation
Trying again works. Odd

[Attachment #5 (text/html)]

<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep \
18, 2017 at 2:35 AM, Werner LEMBERG <span dir="ltr">&lt;<a href="mailto:wl@gnu.org" \
target="_blank">wl@gnu.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div \
class="gmail-h5">&gt; I am working on adding font variations support to cairo, and I \
am<br> &gt; hitting a strange problem in my tests: the first call to<br>
&gt; FT_Get_MM_Var after FT_New_Face fails with an error code of 85.   If<br>
&gt; I simply repeat the FT_Get_MM_Var call, everything is fine and<br>
&gt; things work as expected.<br>
<br>
</div></div>I&#39;m not sure whether you mean 85 or 0x85...   Can you provide a \
MWE<br> that I can compile for further testing?<br>
<span class="gmail-HOEnZb"><font \
color="#888888"></font></span></blockquote><div><br></div><div>Might take me a bit to \
create a freetype-only testcase. In the meantime, here is some more \
details:<br></div><div>The cairo code I see this problem with essentially \
does:<br><br>  FT_New_Face (font_map-&gt;ft_library,<br>                              \
unscaled-&gt;filename,<br>                                                 \
unscaled-&gt;id,<br>                                                 \
&amp;face);<br><br>...<br><br>  ret = FT_Get_MM_Var (face, &amp;ft_mm_var);<br>  if \
(ret != 0) {<br>               printf (&quot;FT_Get_MM_Var failed: %s\n&quot;, \
getErrorMessage (ret));<br>               ret = FT_Get_MM_Var (face, \
&amp;ft_mm_var);<br>               if (ret == 0)<br>                       printf \
(&quot;Trying again works. Odd\n&quot;);<br>  }<br><br></div><div>and this is the \
output I see:<br><br>TESTING font-variations<br>FT_Get_MM_Var failed: invalid stream \
operation<br>Trying again works. \
Odd<br><br></div><div><br><br></div></div></div></div>



_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic