[Magick-bugs] SVG font-size bug (resolution)
Thomas.Stegemann at materna.de
Thomas.Stegemann at materna.de
Tue Jan 20 12:20:02 PST 2009
Hello,
in svg with resolutions other than 72.0 dpi text is transformed twice:
In RenderFreetype FT_Vector_Transform and FT_Glyph_Transform is called.
In FT_Glyph_Transform FT_Vector_Transform is called, too.
When I remove the call of FT_Vector_Transform in RenderFreetype the text is rendered as expected.
file: magick\annotate.c
function: RenderFreetype
> FT_Vector_Transform(&glyph.origin,&affine);
> (void) FT_Glyph_Transform(glyph.image,&affine,&glyph.origin);
file: ttf\src\base\ftglyph.c:
function: FT_Glyph_Transform
> FT_Vector_Transform( &glyph->advance, matrix );
Can you check that?
Best regards
Thomas Stegemann
>
> the SVG just contains two lines of text:
>
> <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
> <svg encoding="ISO-8859-1" width="82.55mm" height="203mm"
> text-rendering="optimizeLegibility">
> <text x="0mm" y="10mm" style="font-size: 16.0pt">Line 1</text>
> <text x="0mm" y="20mm" style="font-size: 16.0pt">Line 2</text>
> </svg>
>
> with the command
> > convert -density 72 c:\test.svg c:\test_72.jpg
> I get the two lines of text as expected.
>
> with the command
> > convert -density 200 c:\test.svg c:\test_200.jpg
> I get the two lines but the characters are bigger than
> expected. The two lines overlap.
>
> with the command
> > convert -density 36 c:\test.svg c:\test_36.jpg
> I get the two lines but the characters are smaller than expected.
>
>
>
More information about the Magick-bugs
mailing list