POV-Ray : Newsgroups : povray.bugreports : TrueType "char not found" errors in POV-Ray 3.x : Re: TrueType "char not found" errors in POV-Ray 3.x Server Time
26 Jun 2024 05:36:15 EDT (-0400)
  Re: TrueType "char not found" errors in POV-Ray 3.x  
From: Ron Parker
Date: 4 Feb 1999 09:26:54
Message: <36b9ae2e.0@news.povray.org>
On Wed, 03 Feb 1999 14:10:14 -0500, Lummox JR <Lum### [at] aolcom> wrote:
>Using Windows 95, POV-Ray version 3.0 as well as 3.1, I get error
>messages when trying to use a particular TrueType font:
>
>"Character XX not found" (XX being the ASCII number of the character)
>All the characters in each line of text are defined in this font, and no
>other programs have trouble using the font except for POV-Ray. They are
>not high-ASCII characters; most of them are uppercase or lowercase
>letters.
>Now here's the stinger: This font is homemade. It was made with a tool
>called Softy, which doesn't allow some additional data (offset/size for
>superscripts, subscripts, etc., etc.) to be defined. Other fonts that
>*do* work have additional table entries that I suspect are expected by
>POV-Ray to be there.

...

>My guess about this bug is that POV-Ray is looking for a part of the
>font file that doesn't need to exist in order to have a working font.
>(However, if anyone can tell me what's still missing, and what I can do
>to add that information to the font, I'd be most grateful.) It should be
>able to check the character map without trouble, but something is
>throwing it off.

The character map is in fact the problem:

; TrueType v1.0 Dump Program - v1.60, Jul 10 1995, rrt, dra, gch, ddb, lcp
; Copyright (C) 1991 ZSoft Corporation. All rights reserved.
; Portions Copyright (C) 1991-1995 Microsoft Corporation. All rights reserved.

; Dumping file 'lummox.ttf'

.
.
.

'cmap' Table - Character To Index Map
-------------------------------------
Size = 408 bytes
  'cmap' version:  0
  numTables:       2
  
Subtable  1.   Platform ID:   1
               Specific ID:   0
               'cmap' Offset: 0x00000014
	      ->Format:	0 : Byte encoding table
		Length:		0
		Version:	0
.
.
.

This is the charmap POV wants to read (it looks for a platform ID of 
1 or 3, apparently, using the first one it finds.) However, this charmap 
is useless: it doesn't have any entries, so by default maps every character 
to glyph zero, though I have some doubts as to whether POV even properly 
reads "short" tables.  

If you can, make sure your software creates a proper cmap for platform 1, 
specific 0, format 0.  If your software can't export a proper cmap, you 
might have a problem.  A little hex editing to change the platform ID on 
this bad cmap would do the trick with POV, but I don't know at what offset 
within the file that information is stored.


Post a reply to this message

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