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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #43356: Cleanup of BBox_Conic_Check introduced bug

Submitter:  None
Submitted:  Sat 04 Oct 2014 08:17:03 PM UTC
   
 
Severity:  3 - Normal Item Group:  Incorrect behaviour
Status:  Fixed Privacy:  Public
Assigned to:  podtelez Open/Closed:  Closed
Planned Release:  2.5.4

Thu 09 Oct 2014 05:16:37 AM UTC, comment #5: 
Alexei Podtelezhnikov <podtelez>
Group Member
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>
Group 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>
Group Member
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>
Group Member
Sat 04 Oct 2014 08:35:43 PM UTC, comment #1: 

Alexei, please take care of this.

Werner LEMBERG <wl>
Group 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.)

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
  • -email is unavailable- added by podtelez (Posted a comment)
  • -email is unavailable- added by wl (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-10-09 wl StatusNone Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.5.4
    2014-10-04 wl Assigned toNone podtelez
    2014-10-04 None Attached File- Added test.otf, #32222

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code