POV-Ray : Newsgroups : povray.binaries.scene-files : Character Map display Server Time
2 Sep 2024 12:16:10 EDT (-0400)
  Character Map display (Message 1 to 3 of 3)  
From: Lutz Kretzschmar
Subject: Character Map display
Date: 4 May 2001 14:46:44
Message: <d8u5ftg93dui5cvrf4bnq43l94n9jp81al@4ax.com>
/*
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] stmuccom
  Web   : http://www.stmuc.com/moray


Post a reply to this message

From: Tek
Subject: Re: Character Map display
Date: 4 May 2001 23:45:42
Message: <3af37766$1@news.povray.org>
> Hi all,
>
> this is a little file I use to look at what characters a font
> contains.

That's pretty useful. Cheers!

--
Tek
http://www.evilsuperbrain.com


Post a reply to this message

From: David Wilkinson
Subject: Re: Character Map display
Date: 5 May 2001 15:00:50
Message: <udi8ftg9tn3eblklii17pouli5epfk5f33@4ax.com>
On Fri, 04 May 2001 20:46:44 +0200, Lutz Kretzschmar <lut### [at] stmuccom> 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] hamiltonitecom
http://hamiltonite.com/


Post a reply to this message

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