|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | I have a scene concept involving centred text, and I want to try it with 
many different fonts (using a Python program to write the .pov files). 
Is there a way to center text without measuring its width by eye, every 
time?  Perhaps a function that returns the dimensions of a bounding box?
-- 
*\\* Anton Sherwood *\\* www.bendwavy.org
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Am 23.01.2014 00:43, schrieb Anton Sherwood:
> I have a scene concept involving centred text, and I want to try it with
> many different fonts (using a Python program to write the .pov files).
> Is there a way to center text without measuring its width by eye, every
> time?  Perhaps a function that returns the dimensions of a bounding box?
Not exactly, but the functions min_extent(MyObj) and max_extent(MyObj) 
do indeed return the "lowest" and "highest" corner, respectively, of the 
bounding box, so the following line should do the job:
#local Width = (max_extent(MyTextObj)-min_extent(MyTextObj)).x;
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | On 2014-1-22 16:25, clipka wrote:
> #local Width = (max_extent(MyTextObj)-min_extent(MyTextObj)).x;
Thank you, that works perfectly.
-- 
*\\* Anton Sherwood *\\* www.bendwavy.org
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | On 23.01.2014 0:43, Anton Sherwood wrote:
> I have a scene concept involving centred text, and I want to try it with
> many different fonts (using a Python program to write the .pov files).
Note you can also just write out an array of font names you want to
try and setup a pov script to render all images as an animation. Might
be more convenient, especially when changing the pov code later.
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  |