Font rendered not properly
Font rendered not properly
Hello,
I use same font on web using gd2 lib and using mogrify localy. Rendering same text I get different output.
Please take a look at the image
In the screen shot upper text in picture is result of mogrify rendering below is result from gd2. If you look at "c" letter you will see that it is cut from button in image generated from mogrify and few more letters feels cutted a bit from bottom.
I am using following font http://www.richard-vanek.eu/wp-content/ ... nt_ttf.zip
I would really apreciate if you can take a look. Not sure where is the problem.
Thank you very much.
I use same font on web using gd2 lib and using mogrify localy. Rendering same text I get different output.
Please take a look at the image
In the screen shot upper text in picture is result of mogrify rendering below is result from gd2. If you look at "c" letter you will see that it is cut from button in image generated from mogrify and few more letters feels cutted a bit from bottom.
I am using following font http://www.richard-vanek.eu/wp-content/ ... nt_ttf.zip
I would really apreciate if you can take a look. Not sure where is the problem.
Thank you very much.
Re: Font rendered not properly
Any idea how can i avoid this effect of cutting button of the text?
I may be doing something wrong, but no clue what.
Thanks in advance!
I may be doing something wrong, but no clue what.
Thanks in advance!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Font rendered not properly
post your IM command
Re: Font rendered not properly
Thanks for reacting
I use
mogrify.exe -font annifont -pointsize 14 -fill black -annotate +25+70 "Serene landscape" empty.gif
This effect is happening only if font is less than 16 point, when larger it is rendered nicely.
Is there anything I can improve it so also with small font sizes the image is ok?
Thanks
I use
mogrify.exe -font annifont -pointsize 14 -fill black -annotate +25+70 "Serene landscape" empty.gif
This effect is happening only if font is less than 16 point, when larger it is rendered nicely.
Is there anything I can improve it so also with small font sizes the image is ok?
Thanks
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Font rendered not properly
See http://www.imagemagick.org/Usage/text/ for many options.
For example, this gives a better "c":
You could then composite serene.png over your image.
(EDIT: removed bad quote after convert.)
For example, this gives a better "c":
Code: Select all
convert -size 800x100 xc:none -fill black -density 288 -font annifont.ttf -annotate 0 "Serene landscape" -resize 25%% -trim +repage serene.png
(EDIT: removed bad quote after convert.)
Last edited by snibgo on 2010-05-30T08:23:15-07:00, edited 1 time in total.
snibgo's IM pages: im.snibgo.com
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Font rendered not properly
In my example, the -resize might mess up the original image. It could be done in a single "convert" command.
snibgo's IM pages: im.snibgo.com
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Font rendered not properly
On my linux system I see no clipping of the 'c'.
After installing the font and running my "imagick_type_gen" script appropriatally to add the font to my personal type.xml file...
I then ran teh command...
No problem I can see.. prehaps it is the font engine that your windows machine is using.
Note mogrify is not particuarly nice or safe to use, as it can only modify existing images.
After installing the font and running my "imagick_type_gen" script appropriatally to add the font to my personal type.xml file...
I then ran teh command...
Code: Select all
convert -size 200x50 xc: -font annifont -pointsize 14 -fill black -gravity center -annotate +0+0 "Serene landscape" serene.png
No problem I can see.. prehaps it is the font engine that your windows machine is using.
Note mogrify is not particuarly nice or safe to use, as it can only modify existing images.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Font rendered not properly
anthony,
thank you very much. This feels like bad news as I don't think I can change my font engine on Windows7.
thank you very much. This feels like bad news as I don't think I can change my font engine on Windows7.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Font rendered not properly
I get the same result as Anthony on IM 6.6.2.1 Q16 Mac OSX Tiger.
What version of IM are you using? Perhaps if old, you might try upgrading.
What version of IM are you using? Perhaps if old, you might try upgrading.
Re: Font rendered not properly
I am using recent ImageMagick with 16bit calculations and in 64bit executable format on Win7 Pro 64bit.
I mentioned in my first post that gd2 library renders that text better. I just tried run it locally on the same system where I run ImageMagick and text is also rendered correctly. Does it means that gd2 lib is using different font engine?
I am using ImageTTFText() function of gd2 library to render the font.
I mentioned in my first post that gd2 library renders that text better. I just tried run it locally on the same system where I run ImageMagick and text is also rendered correctly. Does it means that gd2 lib is using different font engine?
I am using ImageTTFText() function of gd2 library to render the font.