|
![](/i/fill.gif) |
/*
Hi all,
this is a little file I use to look at what characters a font
contains.
Thought I'd share since it comes in handy to look at a font and figure
out if there's a problem with the character mapping.
You need to adapt the sLabelFont variable for your system.
For a quick preview, you can render at 640x480, but you need to render
this at least at 1024x768 for a good look at the characters.
Enjoy,
- Lutz
*/
// This file was generated for POV-Ray V3.1 by
// Moray V3.3 For Windows
default {
texture {
pigment { rgb <1,0.7,0> }
}
}
background { color <0.000,0.000,0.000> }
camera { // Camera Camera01
location < 1.800, -0.700, 10.00>
sky < 0.00000, 0.00000, 1.00000>
up < 0.0, 0.0, 1.0>
right < 1.49828, 0.0, 0.0>
angle 99.33909 // Vertical 67.754
look_at < 1.80, -0.5, 0.705>
}
// ******* L I G H T S *******
light_source { // Light001
<0.0, 0.0, 0.0>
color rgb <1.000, 1.000, 1.000>
translate <2.4, 0.0, 14.3>
}
// ******** OBJECTS *******
#declare sFontToMap = "../Users/frozen.ttf"
#declare sLabelFont = "D:/WINNT/Fonts/Arial.ttf"
#declare BaseChar=32;
#declare CountY=0;
#while (CountY < 14)
#if ( BaseChar+CountY*16<=240)
text { // TText017
ttf sLabelFont,
str(BaseChar+CountY*16,3,0),
0.1, // Depth
<0.0, 0.0, 0.0> // Offset
scale 0.8
translate <-7, 6-CountY, 0.0>
}
#declare CountX=0;
#while (CountX < 16)
text { // TText017
ttf sFontToMap,
chr(BaseChar+CountX+CountY*16),
0.1, // Depth
<0.0, 0.0, 0.0> // Offset
translate <CountX-5, 6-CountY, 0.0>
}
text { // TText017
ttf sLabelFont,
str(BaseChar+CountX+CountY*16,3,0),
0.1, // Depth
<0.0, 0.0, 0.0> // Offset
scale 0.2
translate <CountX-5.2, 5.8-CountY, 0.1>
texture { pigment { rgb <1,1,0> } }
}
#declare CountX=CountX+1;
#end
#end
#declare CountY=CountY+1;
#end
- Lutz
email : lut### [at] stmuc com
Web : http://www.stmuc.com/moray
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Fri, 04 May 2001 20:46:44 +0200, Lutz Kretzschmar <lut### [at] stmuc com> wrote:
>
>this is a little file I use to look at what characters a font
>contains.
>
Hi Lutz,
Just for info, your program works fine with POVray 3.1, but Megapov 6 & 7 both have
problems.
Some fonts, e.g. Centurion Old, in Megapov results in "Error reading TrueType font
file at
line 1648 ......TRUETYPE.C"
Other fonts just display chars up to index 127 and nothing thereafter. Seems like a
bug in
Megapov.
David
----------------------
dav### [at] hamiltonite com
http://hamiltonite.com/
Post a reply to this message
|
![](/i/fill.gif) |