Re: [ft-devel] Artefacts when rendering with FreeType 2.4.9

2012-06-13 Thread Werner LEMBERG

 Do you understand the Rx calculations?

Not without a lot of time to introduce myself to the code :-)

 They are wrong if integer overflows, aren't they?

Yes, it seems so, but up to now we haven't had a bug report.

 So there will be artifacts, possibly very small ones, when
 SMulDiv_NoRound becomes necessary.  Aren't we overthinking here?
 Does Ftgrays avoid FT_MulDiv by splitting long lines?

It's probably a good idea to fix Rx also.  What about this:

  old:
   Rx = ( ras.precision * Dx ) % Dy;

  new:
   Rx = ( ( ras.precision % Dy ) * ( Dx % Dy ) ) % Dy;


 Werner

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


Re: [ft-devel] Artefacts when rendering with FreeType 2.4.9

2012-06-13 Thread Alexei Podtelezhnikov
On Wed, Jun 13, 2012 at 9:22 AM, Werner LEMBERG w...@gnu.org wrote:
 It's probably a good idea to fix Rx also.  What about this:

  old:
       Rx = ( ras.precision * Dx ) % Dy;

  new:
       Rx = ( ( ras.precision % Dy ) * ( Dx % Dy ) ) % Dy;


Let's not rush with this and just say that your fix is incomplete for
now. I have a completely new ftgrays implementation without '%' that
works quite nicely. Who knows I may take a closer look at the ftraster
in the near future. Again to be honest, it is rather easy to just
split the long lines and avoid the very possibility of the overflow
and the need for 64-bit arithmetic going back to the original code of
2 years ago.

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


Re: [ft-devel] Artefacts when rendering with FreeType 2.4.9

2012-06-13 Thread Werner LEMBERG
 Let's not rush with this and just say that your fix is incomplete
 for now.

OK.

 I have a completely new ftgrays implementation without '%' that
 works quite nicely.

Aah, great to hear!


Werner

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


Re: [ft-devel] Artefacts when rendering with FreeType 2.4.9

2012-06-06 Thread jola


Alexei Podtelezhnikov-2 wrote:
 
 On Tue, Jun 5, 2012 at 7:20 AM, jola hans-jochen@lhsystems.com
 wrote:



 Alexei Podtelezhnikov-2 wrote:

 The only potential change in question is this:
 http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=7baeeafcec7fd2267191937e14c1f753424beb89

 It was supposed to fix bug http://savannah.nongnu.org/bugs/?29335
 Do you mind reverting this change only and testing? Are you using a
 64-bit or 32-bit build?

 I reverted both lines in ftraster.c of version 2.4.9 and rebuilt my
 software. The bug still ocurs.
 
 Ok, my guess was wrong ;)
 ...
 Strange though...
 
Your guess was not wrong! This morning I repeated the tests, I had conducted
yesterday. I had been in a hurry and obviously mixed something up. If I just
revert the two lines everything is ok. Sorry for this confusion. And thanks
for your help.
-- 
View this message in context: 
http://old.nabble.com/Artefacts-when-rendering-with-FreeType-2.4.9-tp33938755p33968787.html
Sent from the Freetype - Dev mailing list archive at Nabble.com.


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


Re: [ft-devel] Artefacts when rendering with FreeType 2.4.9

2012-06-06 Thread Werner LEMBERG

 The only potential change in question is this:
 http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=7baeeafcec7fd2267191937e14c1f753424beb89

 Your guess was not wrong!  This morning I repeated the tests, I had
 conducted yesterday.  I had been in a hurry and obviously mixed
 something up.  If I just revert the two lines everything is ok.

Fixed in git.  Thanks to both of you for the report and analysis!

Please test.


   Werner

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


Re: [ft-devel] Artefacts when rendering with FreeType 2.4.9

2012-06-06 Thread Alexei Podtelezhnikov
On Wed, Jun 6, 2012 at 7:25 AM, Werner LEMBERG w...@gnu.org wrote:

 The only potential change in question is this:
 http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=7baeeafcec7fd2267191937e14c1f753424beb89

 Your guess was not wrong!  This morning I repeated the tests, I had
 conducted yesterday.  I had been in a hurry and obviously mixed
 something up.  If I just revert the two lines everything is ok.

 Fixed in git.  Thanks to both of you for the report and analysis!

 Please test.


Alright. Do you understand the Rx calculations? They are wrong if
integer overflows, aren't they? So there will be artifacts, possibly
very small ones, when SMulDiv_NoRound becomes necessary. Aren't we
overthinking here? Does Ftgrays avoid FT_MulDiv by splits long lines?

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


Re: [ft-devel] Artefacts when rendering with FreeType 2.4.9

2012-06-05 Thread Alexei Podtelezhnikov
On Mon, Jun 4, 2012 at 4:38 AM, jola hans-jochen@lhsystems.com wrote:
 the bug was obviously introduced with the transition from 2.3.12 (working)
 to 2.4.0 (showing the bug). HTH.

The only potential change in question is this:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=7baeeafcec7fd2267191937e14c1f753424beb89

It was supposed to fix bug http://savannah.nongnu.org/bugs/?29335
Do you mind reverting this change only and testing? Are you using a
64-bit or 32-bit build?

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


Re: [ft-devel] Artefacts when rendering with FreeType 2.4.9

2012-06-05 Thread jola



Alexei Podtelezhnikov-2 wrote:
 
 The only potential change in question is this:
 http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=7baeeafcec7fd2267191937e14c1f753424beb89
 
 It was supposed to fix bug http://savannah.nongnu.org/bugs/?29335
 Do you mind reverting this change only and testing? Are you using a
 64-bit or 32-bit build?
 

I reverted both lines in ftraster.c of version 2.4.9 and rebuilt my
software. The bug still ocurs.

I am using a 32-bit build, development software VisualC, operating system
Windows XP
-- 
View this message in context: 
http://old.nabble.com/Artefacts-when-rendering-with-FreeType-2.4.9-tp33938755p33963419.html
Sent from the Freetype - Dev mailing list archive at Nabble.com.


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


Re: [ft-devel] Artefacts when rendering with FreeType 2.4.9

2012-06-05 Thread Alexei Podtelezhnikov
On Tue, Jun 5, 2012 at 7:20 AM, jola hans-jochen@lhsystems.com wrote:



 Alexei Podtelezhnikov-2 wrote:

 The only potential change in question is this:
 http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=7baeeafcec7fd2267191937e14c1f753424beb89

 It was supposed to fix bug http://savannah.nongnu.org/bugs/?29335
 Do you mind reverting this change only and testing? Are you using a
 64-bit or 32-bit build?

 I reverted both lines in ftraster.c of version 2.4.9 and rebuilt my
 software. The bug still ocurs.

Ok, my guess was wrong ;)
The buffer size fix is probably NOT to blame:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=6c0d8814189ea5cf03de66b31be9542f3ac79db1

and we are left with just one more commit in that folder:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=603d1218724055f538e2f36d7e74454b1a44cc12
which happens to be Windows specific for STANDALONE compilation.
Sounds like yourself? Please revert and test.

Strange though...


 I am using a 32-bit build, development software VisualC, operating system
 Windows XP

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


Re: [ft-devel] Artefacts when rendering with FreeType 2.4.9

2012-06-04 Thread jola

Hi Alexei,

the bug was obviously introduced with the transition from 2.3.12 (working)
to 2.4.0 (showing the bug). HTH.


Alexei Podtelezhnikov-2 wrote:
 
 This is clearly a bug in BW rasterizer. Can you help to git bisect it?
 You know two versions with and without a bug.
 
 On Thu, May 31, 2012 at 10:38 AM, jola hans-jochen@lhsystems.com
 wrote:
 To make use of new API (kerning etc.) I upgraded from FT 2.1.10 to FT
 2.4.8
 and then 2.4.9. When rendering some PostScript Type 1 fonts with these
 versions some artefacts show up. As an example ITC Kabel was rendered
 at
 font sizes 106, 212, 318, an 423 pixels (files K001013T.PFB and
 K001013T.PFM in the attached zip file). See image
 M_ITCKabel_FT2.4.9.png
 for the erroneus result of 2.4.9. I replaced the folder raster of 2.4.9
 by
 the folder raster of 2.1.10 and rebuilt the software. Now everything
 looked ok again (image M_ITCKabel_FT2.4.9_with_FT2.1_raster.png). This
 is
 a workaround, but is there a better solution? ft_2.4.9_bug.zip
 
 View this message in context: Artefacts when rendering with FreeType
 2.4.9
 Sent from the Freetype - Dev mailing list archive at Nabble.com.

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

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

-- 
View this message in context: 
http://old.nabble.com/Artefacts-when-rendering-with-FreeType-2.4.9-tp33938755p33956456.html
Sent from the Freetype - Dev mailing list archive at Nabble.com.


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


Re: [ft-devel] Artefacts when rendering with FreeType 2.4.9

2012-06-01 Thread Alexei Podtelezhnikov
This is clearly a bug in BW rasterizer. Can you help to git bisect it?
You know two versions with and without a bug.

On Thu, May 31, 2012 at 10:38 AM, jola hans-jochen@lhsystems.com wrote:
 To make use of new API (kerning etc.) I upgraded from FT 2.1.10 to FT 2.4.8
 and then 2.4.9. When rendering some PostScript Type 1 fonts with these
 versions some artefacts show up. As an example ITC Kabel was rendered at
 font sizes 106, 212, 318, an 423 pixels (files K001013T.PFB and
 K001013T.PFM in the attached zip file). See image M_ITCKabel_FT2.4.9.png
 for the erroneus result of 2.4.9. I replaced the folder raster of 2.4.9 by
 the folder raster of 2.1.10 and rebuilt the software. Now everything
 looked ok again (image M_ITCKabel_FT2.4.9_with_FT2.1_raster.png). This is
 a workaround, but is there a better solution? ft_2.4.9_bug.zip
 
 View this message in context: Artefacts when rendering with FreeType 2.4.9
 Sent from the Freetype - Dev mailing list archive at Nabble.com.

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


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


[ft-devel] Artefacts when rendering with FreeType 2.4.9

2012-05-31 Thread jola

To make use of new API (kerning etc.) I upgraded from FT 2.1.10 to FT 2.4.8
and then 2.4.9. When rendering some PostScript Type 1 fonts with these
versions some artefacts show up. As an example ITC Kabel was rendered at
font sizes 106, 212, 318, an 423 pixels (files K001013T.PFB and
K001013T.PFM in the attached zip file). See image M_ITCKabel_FT2.4.9.png
for the erroneus result of 2.4.9.

I replaced the folder raster of 2.4.9 by the folder raster of 2.1.10 and
rebuilt the software. Now everything looked ok again (image
M_ITCKabel_FT2.4.9_with_FT2.1_raster.png).

This is a workaround, but is there a better solution?

http://old.nabble.com/file/p33938755/ft_2.4.9_bug.zip ft_2.4.9_bug.zip 
-- 
View this message in context: 
http://old.nabble.com/Artefacts-when-rendering-with-FreeType-2.4.9-tp33938755p33938755.html
Sent from the Freetype - Dev mailing list archive at Nabble.com.
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel