[solved]aqua text with round fonts

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
vmanda
Posts: 3
Joined: 2012-08-18T04:36:59-07:00
Authentication code: 67789

[solved]aqua text with round fonts

Post by vmanda »

I'm verry new user of imagemagick tools, and i'm need some assistance from somebody fancy.

I'm trying to create text using this command line (win32) :
convert.exe -extent 1500x500 -background none -fill DodgerBlue -font "Channel" -pointsize 60 label:"Aqua Text" -auto-level +repage ( +clone -bordercolor None -border 1x1 -alpha Extract -blur 0x8 -shade 200x200 -alpha On -background gray50 -alpha background -auto-level -function polynomial 3.5,-5.05,2.05,0.3 ( +clone -alpha extract -blur 0x2 ) -channel RGB -compose multiply -composite +channel +compose -chop 2x2 ) -compose Hardlight -composite aqua_text.png
Regular text are showed correct , but using rounded fonts, generated image are trimed somehow up and down
Image

How to correct use and to generate perfect images?

Thanks in advance.

PS. Channel.ttf is here

Just one note for east european users. When use diacritics use CHCP to change codepage.
CHCP 1250
convert.exe -gravity center -background none -fill goldenrod1 -font "JandaElegantHandwriting.ttf" -pointsize 150 label:" Romanian diacritics test. Write: ă Ă î Î â Â ş Ş ţ T " -auto-level +repage ( +clone -bordercolor None -border 1x1 -shadow 2x2+1+1 -alpha Extract -blur 0x8 -shade 200x200 -alpha On -background gray50 -alpha background -auto-level -function polynomial 3.5,-5.05,2.05,0.5 ( +clone -alpha extract -blur 1x1 ) -channel RGB -compose multiply -composite +channel +compose -chop 0x0 -shadow 2x2+1+1 ) -compose Hardlight -composite +repage text_image.png
Image
Used ImageMagick-6.7.9-0-Q16-windows-static package.
Last edited by vmanda on 2012-08-19T04:49:50-07:00, edited 4 times in total.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: aqua text with round fonts

Post by Bonzo »

I think you should post an example of what you actualy want to do.

This will put some text on a transparent background:

Code: Select all

convert -size 1500x500 xc:none -fill DodgerBlue -font Channel.ttf -pointsize 60 -gravity center -annotate +0+0 "Aqua Text" aqua_text.png
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: aqua text with round fonts

Post by fmw42 »

I suspect the font metric in your font may be faulty. Can you get that font elsewhere? Is it ttf?

Bonzo,

Did you actually try that with that particular font? Do is get clipped?
vmanda
Posts: 3
Joined: 2012-08-18T04:36:59-07:00
Authentication code: 67789

Re: aqua text with round fonts

Post by vmanda »

fmw42 wrote:I suspect the font metric in your font may be faulty. Can you get that font elsewhere? Is it ttf?

Bonzo,

Did you actually try that with that particular font? Do is get clipped?
You are right. Seems to be something wrong with font metric.

Thanks for tips.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: aqua text with round fonts

Post by fmw42 »

vmanda wrote:
fmw42 wrote:I suspect the font metric in your font may be faulty. Can you get that font elsewhere? Is it ttf?

Bonzo,

Did you actually try that with that particular font? Does it get clipped?
You are right. Seems to be something wrong with font metric.

Thanks for tips.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: aqua text with round fonts

Post by fmw42 »

This command fails for me as well using the Channel.ttf font from http://www.dafont.com/channel.font and from http://www.fontspace.com/måns-grebäck/channel

convert -background none -fill DodgerBlue -font /Library/Fonts/Channel.ttf -pointsize 60 label:"Aqua Text" 1tmp.png

I cannot say whether it is a bug in IM label: or the font metrics.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: aqua text with round fonts

Post by Bonzo »

Running the OP's code I get the same output as them but I am not sure what effect they actualy want as there is a lot of code just to write some text.

My code gives the text centered on the image although the OP's code has a dark blue text my code has a light blue text.

I used -annotate rather than label which could have had som effect?
vmanda
Posts: 3
Joined: 2012-08-18T04:36:59-07:00
Authentication code: 67789

Re: [solved]aqua text with round fonts

Post by vmanda »

Fixed Channel font metrics into webpage: fontsquirrel @font-face Generator and using expert settings.
Also checked checkbox: "Fix Vertical Metrics". Good to know that exists some place where this issues can be fixed.
Post Reply