|
|
"Kima" <nomail@nomail> wrote:
> I cannot combine the texts, as they are separate with different fonts.
Ah. Righto.
So if you use min_extent and max_extent, you can use those to align things.
http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips
So,
you have:
#local t1=text{ ttf "font.ttf", "First", 1, 0 texture{ pigment{ rgb <1,1,1> }}
#local t2=text{ ttf "font.ttf", "Second", 1, 0 texture{ pigment{ rgb <1,1,1> }}
#local t3=text{ ttf "font.ttf", "Third", 1, 0 texture{ pigment{ rgb <1,1,1> }}
Try:
#declare spacing = 1.0;
#local t1=text{ ttf "font.ttf", "First", 1, 0 texture{ pigment{ rgb <1,1,1> }}
#local t1x = max_extent (t1).x;
#local t2=text{ ttf "font.ttf", "Second", 1, 0 texture{ pigment{ rgb <1,1,1> }
translate x*(t1x+spacing)}
#local t2x = max_extent (t2).x;
#local t3=text{ ttf "font.ttf", "Third", 1, 0 texture{ pigment{ rgb <1,1,1> }
translate x*(t2x+spacing)}
Not that by appending ".x" to max_extent, I'm selecting only the x component of
the <x, y, z> vector that the function returns. That way I'm only translating
along x.
Then you can
union {
object {t1}
object {t2}
object {t3}
}
Post a reply to this message
|
|