bugThe FreeType Project - Bugs: bug #45596, FT_Outline_Embolden produces...


bug #45596: FT_Outline_Embolden produces artifacts for a number of fonts

Submitted by:  Stephan Deutsch <dp4>
Submitted on:  Tue 21 Jul 2015 11:50:28 AM UTC  
Severity:  3 - Normal Item Group:  Wishlist
Status:  Confirmed Privacy:  Public
Assigned to:  Alexei Podtelezhnikov <podtelez> Open/Closed:  Open
Planned Release:  None

Add a New Comment (Rich Markup)

You are not logged in

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


( Jump to the original submission)

Tue 18 Aug 2015 12:19:16 PM UTC, comment #7: 

The emboldener now can deal with long and zero-length segments correctly. The remaining issue is short segments that have to collapse in the emboldened outline. The intermediate case is always the most difficult.

Alexei Podtelezhnikov <podtelez>
Project MemberIn charge of this item.
Tue 18 Aug 2015 04:27:35 AM UTC, comment #6: 

Thanks.  I'm now changing the status of this report to `wishlist'.

I still see artifacts here and there that are not directly related to complicated outlines (at least I believe so), so maybe a later iteration over the code can further improve the rendering results.

Werner LEMBERG <wl>
Project Administrator
Tue 18 Aug 2015 03:07:41 AM UTC, comment #5: 
Alexei Podtelezhnikov <podtelez>
Project MemberIn charge of this item.
Sat 15 Aug 2015 06:38:54 PM UTC, comment #4: 

I acknowledge that this is rather fundamental problem with the current algorithm and its refusal to move zero-length segments. I'll see what I can do. This is important to fix with a perspective of future improvements. IT is also rather important for stem darkening at small sizes.

Alexei Podtelezhnikov <podtelez>
Project MemberIn charge of this item.
Sat 01 Aug 2015 07:37:23 AM UTC, comment #3: 

Alexei, have you looked at the font 03963_BAUHAUS.TTF?  I think there's something fishy, as the attached image (bauhaus-emboldened.png) shows...  What's the reason that even those simple glyph shapes are distorted by the emboldening?

Werner LEMBERG <wl>
Project Administrator
Wed 22 Jul 2015 03:14:03 AM UTC, comment #2: 

This problem is not new. It's been documented in the function notes for ever. The current and the old algorithms work until they don't. I am tempted to close as "won't fix" but I will let you decide. Yes, it is possible to fix but the algorithm needs to be a lot more complex, require more memory, and be very careful and slow when dealing with vanishing features. Imagine how hard it is to figure out when inside of glyph 'O' needs to disappear, or when  'V' becomes more like a triangle. It is not easy.

Alexei Podtelezhnikov <podtelez>
Project MemberIn charge of this item.
Tue 21 Jul 2015 04:27:44 PM UTC, comment #1: 

Alexei, please have a look!

Werner LEMBERG <wl>
Project Administrator
Tue 21 Jul 2015 11:50:28 AM UTC, original submission:  

the FT_Outline_Embolden routine produces glitches in the emboldened outline for a number of fonts.

Error occurs mostly in vertical lines, problem is the condition in <ftoutln.c> in function <FT_Outline_EmboldenXY> line 996:

 if ( FT_MulFix( xstrength, q ) <= FT_MulFix( d, l ) )

seems to need some extra condition. Simply removal fixes the error, but produces other artifacts.

Attached a sample image of a rendered "t" (with large embolden) and a number of problematic fonts.

Stephan Deutsch <dp4>


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

Attach Files:

Attached Files
file #34562:  bauhaus-emboldened.png added by wl (5KiB - image/png)
file #34480:  sample artifact.bmp added by dp4 (92KiB - image/bmp)
file #34479:  sample fonts.zip added by dp4 (195KiB - application/x-zip-compressed)


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)
  • -email is unavailable- added by dp4 (Submitted the item)

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

    Only logged-in users can vote.




    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-08-18 wl Item GroupIncorrect behaviour => Wishlist
        StatusIn Progress => Confirmed
    2015-08-15 podtelez StatusNeed Info => In Progress
    2015-08-01 wl Attached File- => Added bauhaus-emboldened.png, #34562
        StatusNone => Need Info
    2015-07-21 wl Assigned toNone => podtelez
    2015-07-21 dp4 Attached File- => Added sample fonts.zip, #34479
        Attached File- => Added sample artifact.bmp, #34480

    Back to the top

    Powered by Savane 3.5