Is possible and if yes, how i could make a character sheet using a certain font?
I want to recreate the below image using other typeface.
![Image](https://i.imgur.com/afk53F4.png)
Thanks in advance!
I have a Windows script that creates a character display like what you describe. I modified it a bit and tested it with ImageMagick 6.8.9-9 on a bash shell.
Code: Select all
> chars.txt
for x in 2 3 4 5 6 7 8 9 A B C D E F ;
do for y in 0 1 2 3 4 5 6 7 8 9 A B C D E F ;
do echo X | sed "s/.*/label:\x${x}${y}/g" >> chars.txt ;
done ;
done
Code: Select all
label:
label:!
label:"
label:#
label:$
label:%
...
Code: Select all
imfont=Times-Roman
convert -font ${imfont} -pointsize 24 -size 36x36 -gravity center -background none \
label:"\ " @chars.txt +gravity -compose copy -bordercolor blue -shave 1 -border 1 \
+append +repage -crop 360x36 -append +repage charsheet.png
Thanks a lot! It was very close of what i need.GeeMack wrote: ↑2019-08-12T20:51:25-07:00I have a Windows script that creates a character display like what you describe. I modified it a bit and tested it with ImageMagick 6.8.9-9 on a bash shell.
The first part of it uses a couple "for" loops and "sed" to create a text file containing a list of all the characters.
The lines in that file look like this...Code: Select all
> chars.txt for x in 2 3 4 5 6 7 8 9 A B C D E F ; do for y in 0 1 2 3 4 5 6 7 8 9 A B C D E F ; do echo X | sed "s/.*/label:\x${x}${y}/g" >> chars.txt ; done ; done
The prefix "label:" on each line lets IM read that file as if it's a long list of individual labels. IM reads that file like this "@chars.txt" to get all the images to create the character sheet. Here is the IM command that works on my bash...Code: Select all
label: label:! label:" label:# label:$ label:% ...
You should be able to make the grid from any installed font by setting the variable "imfont" to your choice.Code: Select all
imfont=Times-Roman convert -font ${imfont} -pointsize 24 -size 36x36 -gravity center -background none \ label:"\ " @chars.txt +gravity -compose copy -bordercolor blue -shave 1 -border 1 \ +append +repage -crop 360x36 -append +repage charsheet.png
You can easily change the pointsize and the dimensions of the labels, and set the gravity to west or southwest. Each font has somewhat different dimensions from another, even at a given pointsize, so you might have to adjust for that. And with a little modification to how the blue lines are applied, they can be all just one pixel wide. Here's a command that might get you closer...mrvico wrote: ↑2019-08-14T12:25:09-07:00But the dimensions of each box (counting the 1px border of top and left) are of 20x26px, and each character are graviting West, but with the bottom offset half of the top (eg. 4px to the bottom of the box, and 8px of the top).
I tried to change the values to suit but i got a disarranged charset.
Code: Select all
imfont=Helvetica
convert -font ${imfont} -background none -gravity southwest \
-pointsize 16 -size 19x25 label:"\ " @chars.txt +gravity -delete 220--1 \
-background \#1600f3 -splice 1x1 +append +repage -crop 200x26 -append +repage \
-gravity southeast -splice 1x1 -background \#626b62 -flatten charsheet.png