POV-Ray : Newsgroups : povray.binaries.images : Other things the text object can do. : Re: Other things the text object can do. Server Time
14 Mar 2025 08:03:57 EDT (-0400)
  Re: Other things the text object can do.  
From: William F Pokorny
Date: 5 Mar 2025 11:31:07
Message: <67c87c4b$1@news.povray.org>
On 3/5/25 09:11, Chris R wrote:

> If you are using a mono-type font, this worked for me:
> 
> #local _t1 = text { ttf "fontname.ttf" "A" 1.0, 0 }
> #local _t2 = text { ttf "fontname.ttf" "AA" 1.0, 0 }
> #local _t1sz = max_extent(_t1) - min_extent(_t1);
> #local _t2sz = max_extent(_t2) - min_extent(_t2);
> #local _unit_width = (_t2sz - _t1sz).x;

Thank you Chris!

This approach is working for me with the couple of mono-space fonts just 
tried.

Along with using the height of the vertical box character for the unit 
height.

Bill P.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.