|
|
> Can someone suggest how to deal with font 'bold' and 'italics' ?
#include "transforms.inc"
// normal text
#declare Ntext = text {ttf "timrom.ttf", "Sample Text", 0.1, <0,0,0>};
object { Ntext
Center_Trans(Ntext,x)
scale <0.5,0.5,1>
translate <0,0,0>
pigment {Gray50}
}
// italic text
#declare Itext = text {ttf "timrom.ttf", "Sample Text", 0.1, <0,0,0>};
object { Itext
Center_Trans(Itext,x)
scale <0.5,0.5,1>
Shear_Trans(x, y+0.25*x, z)
translate <0,-0.5,0>
pigment {Gray50}
}
// bold text
#declare Btext = text {ttf "timrom.ttf", "Sample Text", 0.1, <-0.1,0,0>};
object { Btext
Center_Trans(Btext,x)
#local Nwidth = max_extent(Ntext).x - min_extent(Ntext).x;
#local Bwidth = max_extent(Btext).x - min_extent(Btext).x;
scale <Nwidth/Bwidth,1,1>
scale <0.5,0.5,1>
translate <0,0.5,0>
pigment {Gray50}
}
Post a reply to this message
|
|