|
|
Hello all,
Non unix folk beware.... if you've never heard of bash, leave now.
I got mad with rendering scenes again and again to get the text
alignment right. This got more maddening when I tried to set up scripts
to generate pov scenes involving text, right aligning text is a real
arse. I saw a patch for the 'ol 3.02 windoze version. So I stopped
getting mad and got even.
I wrote a bash script which uses Povray, ImageMagick, sed & tr to render
a string, in a specified font, at a specified kerning offset, find the
edges, and the offsets from origin. The output can be sieved for
relevant info.
Example session:
$ ./povttfsize "Howdy" arial.ttf
totalsize=2.970,.930
positive from origin=2.410,.720
negative from origin=.560,.210
this admittedly takes ages to run, but if you're gonna use a load of
font stuff in a scene it could be scripted for all the strings and run
overnight!
If anyone wants a copy, please mail me qua### [at] netcomukcouk, if there's
sufficient interest I'll post it to the group. It does what I wanted
(vaguely) and if you want to improve on it you'll be making my life
easier.
Post a reply to this message
|
|