font does not work properly

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
koshimoto
Posts: 1
Joined: 2015-06-12T00:32:22-07:00
Authentication code: 6789

font does not work properly

Post by koshimoto »

I want to string the image by using the NotoSansCJKtc-Regular.otf(Google Noto Fonts(chinese)) font

but Image is not successfully created

What imagemagick can not use the NotoSansCJKtc-Regular.otfGoogle Noto Fonts(chinese) fonts?

command:
convert -size 197x80 xc:none -font NotoSansCJKtc-Regular.otf -gravity north -fill "#000000" -draw "font-size 48 text 0,0 '你好 '" test.png
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: font does not work properly

Post by Bonzo »

I do not know if .otf fonts are supported. ttf fonts are; is there one of those you can try?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: font does not work properly

Post by fmw42 »

Try creating it using -annotate. Put the text in a text file (say saved as fontfile.txt) that supports UTF-8. Then call the file as -annotate +0+0 @fontfile.txt or try that in your -draw command. See if either work. If not then your font file may not support UTF-8 characters notation. You can also try label:@fontfile.txt There are a number of ways to create a text image. See

http://www.imagemagick.org/Usage/text/
http://www.imagemagick.org/Usage/text/#unicode
Post Reply