[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-19 13:25:24
Message-ID: CAFwd_vDfPQ60xV2ReAeRbi43nvhfHoViWbEcYFQhY12huQ-ZwA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Tue, Sep 19, 2017 at 8:41 AM, Adrian Johnson <ajohnson@redneon.com>
wrote:

> On 19/09/17 21:02, Matthias Clasen wrote:
> > On Tue, Sep 19, 2017 at 7:04 AM, Adrian Johnson <ajohnson@redneon.com
> > <mailto:ajohnson@redneon.com>> wrote:
> >
> >
> >     On 18/09/17 01:03, Matthias Clasen wrote:
> >     > On Sun, Sep 17, 2017 at 1:12 AM, Adrian Johnson <
> ajohnson@redneon.com <mailto:ajohnson@redneon.com>
> >     > <mailto:ajohnson@redneon.com <mailto:ajohnson@redneon.com>>>
> wrote:
> >     >     I've attached a patch that refactors the float parsing code
> from
> >     >     cff-subset into a new function: _cairo_strtod(). So you can
> now use this
> >     >     for a C locale strtod.
> >     >
> >     >
> >     > Yay, thanks.It might still be nice to apply the strtod_l patch on
> top,
> >     > and only use that code as fallback.
> >
> >     -1. Just use the cairo_strtod all the time. We don't use non ANSI C
> >     functions with #include guarded fallbacks in cairo. It adds to source
> >     code bloat and one side of the #if won't get regularly tested.
> >
> >
> > I disagree, at least in this case, but your call.
>
> We don't do it that way in cairo. If the fallback works just use it all
> the time.
>

Fine. Easy enough to drop that commit.


> I did some more testing. With my system fontconfig (2.11) the test
> failed (same result) when using the ttf font. FC 2.11 did not recognize
> the otf font.
>
> I tested fontconfig 2.12.5. The test crashed with both the ttf and otf
> fonts due to a divide by zero error.
>
> What version of FC are you using and which font (otf or ttf)?
>

I have fontconfig 2.12.5 and freetype 2.8 on my system, and I am using the
ttf version of the font.
Behdad, does my test work on your system ?

Is there some printfs you could add to help debug this?
>

 I'll think about it.

[Attachment #5 (text/html)]

<div dir="ltr">On Tue, Sep 19, 2017 at 8:41 AM, Adrian Johnson <span dir="ltr">&lt;<a \
href="mailto:ajohnson@redneon.com" \
target="_blank">ajohnson@redneon.com</a>&gt;</span> wrote:<br><div \
class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span \
class="">On 19/09/17 21:02, Matthias Clasen wrote:<br> &gt; On Tue, Sep 19, 2017 at \
7:04 AM, Adrian Johnson &lt;<a \
href="mailto:ajohnson@redneon.com">ajohnson@redneon.com</a><br> </span><span \
class="">&gt; &lt;mailto:<a \
href="mailto:ajohnson@redneon.com">ajohnson@redneon.com</a>&gt;&gt; wrote:<br> \
&gt;<br> &gt;<br>
&gt;        On 18/09/17 01:03, Matthias Clasen wrote:<br>
&gt;        &gt; On Sun, Sep 17, 2017 at 1:12 AM, Adrian Johnson &lt;<a \
href="mailto:ajohnson@redneon.com">ajohnson@redneon.com</a> &lt;mailto:<a \
href="mailto:ajohnson@redneon.com">ajohnson@redneon.com</a>&gt;<br> </span><span \
class="">&gt;        &gt; &lt;mailto:<a \
href="mailto:ajohnson@redneon.com">ajohnson@redneon.com</a> &lt;mailto:<a \
href="mailto:ajohnson@redneon.com">ajohnson@redneon.com</a>&gt;&gt;<wbr>&gt; \
wrote:<br> &gt;        &gt;        I&#39;ve attached a patch that refactors the float \
parsing code from<br> &gt;        &gt;        cff-subset into a new function: \
_cairo_strtod(). So you can now use this<br> &gt;        &gt;        for a C locale \
strtod.<br> &gt;        &gt;<br>
&gt;        &gt;<br>
&gt;        &gt; Yay, thanks.It might still be nice to apply the strtod_l patch on \
top,<br> &gt;        &gt; and only use that code as fallback.<br>
&gt;<br>
&gt;        -1. Just use the cairo_strtod all the time. We don&#39;t use non ANSI \
C<br> &gt;        functions with #include guarded fallbacks in cairo. It adds to \
source<br> &gt;        code bloat and one side of the #if won&#39;t get regularly \
tested.<br> &gt;<br>
&gt;<br>
&gt; I disagree, at least in this case, but your call.<br>
<br>
</span>We don&#39;t do it that way in cairo. If the fallback works just use it \
all<br> the time.<span class=""><br></span></blockquote><div><br></div><div>Fine. \
Easy enough to drop that commit.</div><div> <br></div><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span \
class=""><br> </span>I did some more testing. With my system fontconfig (2.11) the \
test<br> failed (same result) when using the ttf font. FC 2.11 did not recognize<br>
the otf font.<br>
<br>
I tested fontconfig 2.12.5. The test crashed with both the ttf and otf<br>
fonts due to a divide by zero error.<br>
<br>
What version of FC are you using and which font (otf or \
ttf)?<br></blockquote><div><br></div><div>I have fontconfig 2.12.5 and freetype 2.8 \
on my system, and I am using the ttf version of the font.</div><div>Behdad, does my \
test work on your system ?<br></div><div><br></div><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Is there some \
printfs you could add to help debug this?<div></div></blockquote><div><br></div><div> \
I&#39;ll think about it. <br></div></div></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