bugThe FreeType Project - Bugs: bug #43356, Cleanup of BBox_Conic_Check...

 
 

bug #43356: Cleanup of BBox_Conic_Check introduced bug

Submitted by:  None
Submitted on:  Sat 04 Oct 2014 08:17:03 PM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Alexei Podtelezhnikov <podtelez>Open/Closed: Closed
Planned Release: 2.5.4

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 09 Oct 2014 05:16:37 AM UTC, comment #5:

This should be fixed by two commits:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=2ffcf17e15a4f9c15609fb2e5a9c9942193e4a1f
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=40dac11360c0d6d130f833b87828eabec012b8f2

Alexei Podtelezhnikov <podtelez>
Project MemberIn charge of this item.
Tue 07 Oct 2014 08:35:57 AM UTC, comment #4:

Admittedly, I don't have an opinion. Please proceed as you wish :-)

Werner LEMBERG <wl>
Project Administrator
Mon 06 Oct 2014 02:37:54 PM UTC, comment #3:

I think I know what is going on. This is that sort of outline where the conic on-point is assumed in the middle of control points. In this case FT_Outline_Get_BBox gets cbox correctly. The on-point bbox could be totally wrong, however, because we just don't have all on-points in the outline.

We can get the on-point bbox correctly if we go through FT_Outline_Decompose just looking for all on-points to begin with. Or, we can do the same thing simultaneously with true conic extrema like the old code did.

Werner?

Alexei Podtelezhnikov <podtelez>
Project MemberIn charge of this item.
Mon 06 Oct 2014 01:20:03 PM UTC, comment #2:

This, of course, should never happen if the control point is truly outside of the on-point bbox. Therefore y2 should be either smaller or larger than both y1 and y3. This makes division-by-0 impossible theoretically, unless the on-point bbox missed a point...

Alexei Podtelezhnikov <podtelez>
Project MemberIn charge of this item.
Sat 04 Oct 2014 08:35:43 PM UTC, comment #1:

Alexei, please take care of this.

Werner LEMBERG <wl>
Project Administrator
Sat 04 Oct 2014 08:17:03 PM UTC, original submission:

I am one of the developers of ImageMagick and one of our users reported an issue when rendering a specific font (http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26341) and a certain point size. I have attached the problematic font. The output is okay at pointsize 44 but fails at 40. And it also depends on the characters that are written. It happens if the text contains one of the following characters: o,r,w,U (maybe more). After some debugging I noticed that FT_Outline_Get_BBox returned an incorrect result. I then narrowed the problem down to the BBox_Conic_Check method. The call to FT_MulDiv ended up with a 'c' value of zero and it would return 0x7FFFFFFFL. Reverting the changes from the commit 'http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/src/base/ftbbox.c?id=32a7d87050bf891d476892d441a56921eda299b0' seems to fix the issue.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #32222:  test.otf added by None (34KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by podtelez (Posted a comment)
  • -unavailable- added by wl (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 09 Oct 2014 09:47:32 AM UTCwlStatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.5.4
    Sat 04 Oct 2014 08:35:43 PM UTCwlAssigned toNone=>podtelez
    Sat 04 Oct 2014 08:17:03 PM UTCNoneAttached File-=>Added test.otf, #32222

    Back to the top


    Powered by Savane 3.1-cleanup1