? written instead of characters in font "KacstOne"

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
manit
Posts: 123
Joined: 2009-01-30T22:31:26-07:00

? written instead of characters in font "KacstOne"

Post by manit »

I ran
convert -size 1024x30 xc:white -gravity south -font KacstOne -pointsize 25 -annotate 0 good good.jpg
The above font appears in list generated by "convert -list font" .
Why do I get just ? instead of letters . Numerals are fine .
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ? written instead of characters in font "KacstOne"

Post by fmw42 »

manit wrote:I ran
convert -size 1024x30 xc:white -gravity south -font KacstOne -pointsize 25 -annotate 0 good good.jpg
The above font appears in list generated by "convert -list font" .
Why do I get just ? instead of letters . Numerals are fine .

remove good from your command

convert -size 1024x30 xc:white -gravity south -font KacstOne -pointsize 25 -annotate 0 good good.jpg

is KacstOne a ttf font? if not, it probably won't work

add -fill black or some color for the font
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: ? written instead of characters in font "KacstOne"

Post by anthony »

A ? in a font ouput usually means that that specific charcater is not defined in the font. Typically this happens with undefined unicode symbols, or a symbol font that has not defined all characters.

For examples of this see the Unicode DingBat example in this section of IM Examples...
http://www.imagemagick.org/Usage/text/#unicode
Dingbat font was incorperated into unicode but a couple of symbols need to be mapped to different unicode characters. As such 3 question marks appear for those symbols.

As Fwm42 (fred) specified, you have not defined where "KacstOne" comes from. TTF font?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
manit
Posts: 123
Joined: 2009-01-30T22:31:26-07:00

Re: ? written instead of characters in font "KacstOne"

Post by manit »

to fmw42 , Still question marks prevail. Font is ttf because
/usr/share/fonts/truetype/ttf-kacst-one/KacstOne.ttf
It is installed by default in most linux OS.
I just got curious that why it happened .
Let us say , this means I should use some other font .
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: ? written instead of characters in font "KacstOne"

Post by anthony »

You are right it is installed. My "imagick_type_gen" script automatically picked it up, and it is listed by

Code: Select all

convert -list font
Another script "show_fonts" with a -3 flag to display the normal ascii-meta character range shows that while all ascii charcaters are defined, only some of the meta characters are defined.

Code: Select all

show_fonts -3 KacstOne
Using the '-U' flag (and the script "graphics_utf" also installed) I found only a few 'punct' unicode symbols included ( EG try "show_fonts -U punct KacstOne" ), but no others (dingbats, math, numbers, etc)

It is really a very minimal basic font.

The font also does not vary much. All these looked pretty much the same to me...
KacstArt KacstBook KacstDigital KacstDecorative KacstLetter KacstOffice KacstPoster
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
manit
Posts: 123
Joined: 2009-01-30T22:31:26-07:00

Re: ? written instead of characters in font "KacstOne"

Post by manit »

I get it
you referred to scripts 'graphics_utf' and 'show_fonts' which I copied to /usr/bin . Then we can run the commands you mentioned. Also
ANOTHER QUESTION
I saw the file U2600.pdf (http://www.unicode.org/charts/PDF/U2600.pdf) containing miscellaneous unicode characters . I found interesting symbols which I tried to write

Running the command
env LC_CTYPE=en_AU.utf8 printf "\u2620=death \u265e=horse "
worked as desired .

When I ran
env LC_CTYPE=en_AU.utf8 printf "\u2620=death \u265e=horse " | convert -font AksharUnicode -background lightblue -fill blue -pointsize 36 label:@- label_quotes.gif

I got question marks at those symbols.
Is there a font which includes all unicode characters ?

This is strange even my firefox cannot show 26d5 which is "left way traffic"
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: ? written instead of characters in font "KacstOne"

Post by anthony »

You were lucky your Mac terminal font had the symbols! You could try using that!

Mincho the Microsoft unicode symbols font has them.

I have not found another font containing the symbols, though I have not tried a lot of them.


Update: another strike... DejaVu-Sans-* (*= Book, Bold, Mono-Bold ) But not the DejaVu-Serif-* fonts
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
manit
Posts: 123
Joined: 2009-01-30T22:31:26-07:00

Re: ? written instead of characters in font "KacstOne"

Post by manit »

In my windows XP I have arial unicode MS which is 22MB ttf file with around 50,000 characters from unicode's over 1 lakh symbols

Actually I am thinking of making a ttf file containing all unicode symbols . I find a heap of fonts on net each containing ASCII and few more with designer's liking.
Is it possible to extract all character images a ttf file contains ?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: ? written instead of characters in font "KacstOne"

Post by anthony »

The images in a TTF font are vector images. IM is not the tool for that. You will need to look at the various TTF file format handling programs.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply