Menu

#50 Annotate Stroke doesn't work well

v1.0_(example)
open
Algorithms (87)
5
2018-04-18
2006-08-12
Anonymous
No

The Annotate Stroke parameter doesn't work well. Here
are a list of problems.

When stroke is specified with antialias=>'false', the
text is antialiased anyways.

When strokewidth is set to 0, some specks of the
strokecolor still appear in the image.

When strokewidth is set to various negative numbers,
some specks of the strokecolor still appear in the image.

When strokewidth is set to a number > 1, it seens to
invade the text, that is, it does not stay ouside the
text but seems to overlay the fill color of the text as
well. Stroke should just be drawn aboutg the outside
of the fill color (if antialias is false).

Attached is a Perl script file that I used to test the
function. This has been a problem with Imagemagick for
a long time as well.

Discussion

  • Nobody/Anonymous

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2006-08-12

    Logged In: YES
    user_id=128624

    You are right. This has been a problem for as long as
    stroke has been supported. The workaround is to set the
    stroke color to 'none' and color the text using only the
    fill color. Experience shows that adding a stroke color only
    works acceptably for large fonts.

    As far as antialias goes, when the text is rendered, it is
    always antialised in the FreeType interface, but when
    antialias is disabled, the result is thresholded before
    being applied to the image. This is of course cheating,
    does not result in any speed-up, and the results are different.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2006-08-12

    Logged In: YES
    user_id=128624

    You are right. This has been a problem for as long as
    stroke has been supported. The workaround is to set the
    stroke color to 'none' and color the text using only the
    fill color. Experience shows that adding a stroke color only
    works acceptably for large fonts.

    As far as antialias goes, when the text is rendered, it is
    always antialised in the FreeType interface, but when
    antialias is disabled, the result is thresholded before
    being applied to the image. This is of course cheating,
    does not result in any speed-up, and the results are different.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2018-04-18
    • assigned_to: Bob Friesenhahn --> Gregory J Wolfe
    • Group: --> v1.0_(example)
     

Log in to post a comment.