turkish character problem
convert -background lightblue -fill black -font comicbd.ttf -size 320x140 -pointsize 18 \ caption:"IiİıÄÄÃüİiÅÅÃöÃç" \ sample.jpg
Output sample :
i want configure main charset turkish. but how?
character set
There is a section that may help you out part way down this page: http://www.cit.gu.edu.au/~anthony/graph ... ick6/text/
Edit :
I tried this and the output is below
I wonder if it is partialy due to the font you use - if the character is not there it is replaced with something else ? Again I didn't get some of the letters in the code so I assume my PC is not setup for them ? Therfore they were not in the output image ?
Edit :
I tried this and the output is below
Code: Select all
exec("/usr/local/bin/convert -background lightblue -fill black -font comicbd.ttf -size 320x140 -pointsize 20 caption:\"IiIiGgÃüIiSsÃöÃç\" sample.jpg ");
Right after a further test I find that if I change the "Encode in ANSI" to "Encode in UTF-8" in my editor ( Notepad+++ ). I get all the characters in the code:
I have also done things "properly" now and have added the <html> tags etc. and used the meta tag for UTF8; I may not need to have done this but I thought it would be a good idea.
Note I had to remove the " around the text or else I had the "squares" instead of the characters.
Code: Select all
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF8" />
</head>
<body>
<?php
exec("/usr/local/bin/convert -background lightblue -fill black -font comicbd.ttf -size 320x140 -pointsize 20 caption:IiİıÄÄÃüİiÅÅÃöÃç sample.jpg ");
?>
<img src="sample.jpg">
</body>
</html>
Note I had to remove the " around the text or else I had the "squares" instead of the characters.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
You get squares if the font does not handle the specific UTF-8 characters.
This is a UTF-8 character string and few commandline handlers especially windows commandline, handles UTF-8 directly. I recommnd the UTF-8 string be piped into Im using a file or pipeline. This is the way I handle the chinese text in IM Examples
http://www.cit.gu.edu.au/~anthony/graph ... t/#unicode
This is a UTF-8 character string and few commandline handlers especially windows commandline, handles UTF-8 directly. I recommnd the UTF-8 string be piped into Im using a file or pipeline. This is the way I handle the chinese text in IM Examples
http://www.cit.gu.edu.au/~anthony/graph ... t/#unicode
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/