POV-Ray : Newsgroups : povray.newusers : Problem with certain text {fonts} Server Time
29 Jul 2024 10:25:27 EDT (-0400)
  Problem with certain text {fonts} (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Patrick Hagerty
Subject: Re: Problem with certain text {fonts}
Date: 1 Jul 2006 12:23:15
Message: <44a6a173$1@news.povray.org>
Thanks, Stephen, than helped a bit.  Now at least the characters that render 
are the ones I expect to see.  Mostly...

Some of the characters still don't render, though.  For example, if I try to 
render the string "abcdefg" for one font I get the 'a' through 'f', but the 
'g' comes out as one of those little empty boxes.  (For different fonts the 
missing letter is something different. This is just an example.  And this 
problem does NOT happen for MOST fonts types.)  Using the same font in 
another tool shows the 'g' to be there as normally as all the other 
characters.  Also, in the Windows Font folder, if you double-click the 
font's ttf file, you can see all the characters that are defined for the 
font, and the 'g' is certainly one of them.

Some of the fonts I have only have definitions for the letters, some of them 
only for the upper case or only the lower case letters.  I'm not trying to 
render in POV-Ray letters that are not defined in the font.

It still seems that there's a text/font rendering problem in POV-Ray.

- Patrick

"StephenS" <stephen@nospam> wrote in message 
news:44a65900$1@news.povray.org...
> ...
>> I used a standard (ie. from the "Insert" menu) text object, plug in my 
>> text, then type in the font I want to try and render away.  However, 
>> certain font don't render correctly.
> ...
> Look into, "Insert/Statements/charset", this needs to be in a global 
> setting statement.
>
> Stephen
>


Post a reply to this message

From: StephenS
Subject: Re: Problem with certain text {fonts}
Date: 1 Jul 2006 19:17:38
Message: <44a70292$1@news.povray.org>
...
> Some of the characters still don't render, though.
...
At this point some additional information would be needed.

What version of POV-Ray are you using?
Are any of the fonts you are having problems with publicly available?
Can you post a short code that illustrates the problem(in the appropriate 
group).

Stephen


Post a reply to this message

From: Patrick Hagerty
Subject: Re: Problem with certain text {fonts}
Date: 1 Jul 2006 21:30:48
Message: <44a721c8$1@news.povray.org>
POV-Ray version 3.6.1c.id8.win32 according to the popup window.

I believe at least some of the fonts are freely available publicly, if you 
go to the right web site.  I can include by attachment one or two with the 
posted code, if that would help.  (After, of course, I verify that I got the 
font from a "free font" web site.)

Finally, what would be the appropriate group for this code posting?

- Patrick

"StephenS" <stephen@nospam> wrote in message 
news:44a70292$1@news.povray.org...
> ...
>> Some of the characters still don't render, though.
> ...
> At this point some additional information would be needed.
>
> What version of POV-Ray are you using?
> Are any of the fonts you are having problems with publicly available?
> Can you post a short code that illustrates the problem(in the appropriate 
> group).
>
> Stephen
>


Post a reply to this message

From: StephenS
Subject: Re: Problem with certain text {fonts}
Date: 2 Jul 2006 19:44:33
Message: <44a85a61$1@news.povray.org>
...
> Finally, what would be the appropriate group for this code posting?
...
If you can point us to the correct place for the font, and the code is 
short(under 20 lines), this group is fine.

If you want to attach files(font, code, picture) a binaries group would be 
best, perhaps povray.binaries.scene-files.

Stephen


Post a reply to this message

From: Patrick Hagerty
Subject: Re: Problem with certain text {fonts}
Date: 6 Jul 2006 18:14:03
Message: <44ad8b2b$1@news.povray.org>
Sorry for not replying for a while.  Holiday and vacation activities keeping 
me otherwise occupied.

Well, I've seen this problem with several fonts.  But one that's available 
free from multiple web sites is "01-01-00.ttr".  I did a Google search and 
it showed up all over the place.

So, I'll post below the code that shows the problem.
start code...
//----------------------------------------------------------------------------------------------------------------
#version 3.6;

global_settings
{
    assumed_gamma 1.0
    //charset ascii       // standard ascii (only 0 to 127 are valid)
    charset utf8      // unicode
    //charset sys       // system specific charset
}

// ----------------------------------------

camera
{
    location  <0.0, 1.0, -6.0>
    direction 1.5*z
    right     4/3*x
    look_at   <0.0, 0.0,  6.0>
}

sky_sphere {pigment{ gradient y color_map { [0.0 color blue 0.6] [1.0 color 
rgb 1] }}}

light_source
{
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

// ----------------------------------------

#declare Text_Tex = texture
{
    pigment{ color rgb <0.98, 0.83, 0.58> }
    normal{ dents 1.2 scale 0.01 }
    finish{ phong 0 brilliance 0.7 }
}

#declare TextDepth = 0.22;
#declare CharSeparation = <0.06, 0, 0>;

#declare FontName = "01-01-00.TTF";
#declare xPos = -3.4;
#declare yPos = 0.4;
#declare zPos = 4.2;

#declare testString1 = "`1234567890-=";
#declare testString2 = "~!@#$%^&*()_+";
#declare testString3 = "qwertyuiop[]\\";
#declare testString4 = "QWERTYUIOP{}|";
#declare testString5 = "asdfghjkl;'";
#declare testString6 = "ASDFGHJKL:\"";
#declare testString7 = "zxcvbnm,./";
#declare testString8 = "ZXCVBNM<>?";

text
{
    ttf             // font type (only TrueType format for now)
    FontName,  // Microsoft Windows-format TrueType font file name
    testString5,    // Change string number (1-8) to try different 
characters.
    TextDepth,              // the extrusion depth
    CharSeparation               // inter-character spacing

    texture { Text_Tex }
    rotate <0, -2, 0>
    translate <xPos, yPos, zPos>
}

plane { y, 0 pigment { color rgb <0.7,0.5,0.3> } }

//----------------------------------------------------------------------------------------------------------------
... end code

- Patrick

"StephenS" <stephen@nospam> wrote in message 
news:44a85a61$1@news.povray.org...
> ...
>> Finally, what would be the appropriate group for this code posting?
> ...
> If you can point us to the correct place for the font, and the code is 
> short(under 20 lines), this group is fine.
>
> If you want to attach files(font, code, picture) a binaries group would be 
> best, perhaps povray.binaries.scene-files.
>
> Stephen
>


Post a reply to this message

From: Mutley2003
Subject: Re: Problem with certain text {fonts}
Date: 6 Jul 2006 21:40:00
Message: <web.44adba50ab1d1e6e2362b6c20@news.povray.org>
fwiw, I tried it with the suggested font and got similar problems (windows
XP)


with a test string of

#declare testStringJA = "abcdefghijklmnopqrstuvwxyz1234567890";

with charset UTF-8 I got warning messages of
File: E:!dsPOVlibjaTestFontRenderingProblem.pov  Line: 67
Parse Warning: Character 103 (0x67) not found in C:WINDOWSFonts1-01-00.TTF
File: E:!dsPOVlibjaTestFontRenderingProblem.pov  Line: 67
Parse Warning: Character 108 (0x6C) not found in C:WINDOWSFonts1-01-00.TTF
File: E:!dsPOVlibjaTestFontRenderingProblem.pov  Line: 67
Parse Warning: Character 112 (0x70) not found in C:WINDOWSFonts1-01-00.TTF
File: E:!dsPOVlibjaTestFontRenderingProblem.pov  Line: 67
Parse Warning: Character 113 (0x71) not found in C:WINDOWSFonts1-01-00.TTF
File: E:!dsPOVlibjaTestFontRenderingProblem.pov  Line: 67
Parse Warning: Character 115 (0x73) not found in C:WINDOWSFonts1-01-00.TTF

if you change the charset to ascii, you get a crash. Fair enough.


Maybe Povray does not support all possible valid TTFs or maybe some of them
are invalid.. maybe you just have to do a test render of the full alphabet
to find out .. perhaps the experts can tell us.


Post a reply to this message

From: Mutley2003
Subject: Re: Problem with certain text {fonts}
Date: 6 Jul 2006 21:50:00
Message: <web.44adbda1ab1d1e6e2362b6c20@news.povray.org>
Fontviewer from Mike Lischke at
http://www.lischke-online.de/FontViewer.php
displays that unicode font just fine, but very slowly.. also the windows
applet that displays the font is also very slow to render it.

Maybe there is something arcane about it .. some excess hinting?


Post a reply to this message

From: Patrick Hagerty
Subject: Re: Problem with certain text {fonts}
Date: 6 Jul 2006 23:40:45
Message: <44add7bd$1@news.povray.org>
Well, just to test exactly that theory, I used it in several applications to 
make sure it behaved appropriately before I ever posted anything here. 
I've not seen anything slow about it or the other fonts I've had the problem 
with, but then I'm running a 3GHz dual core processor.  The slow-down might 
not be enough to notice at that speed.

- Patrick

"Mutley2003" <nomail@nomail> wrote in message 
news:web.44adbda1ab1d1e6e2362b6c20@news.povray.org...
>
> Fontviewer from Mike Lischke at
> http://www.lischke-online.de/FontViewer.php
> displays that unicode font just fine, but very slowly.. also the windows
> applet that displays the font is also very slow to render it.
>
> Maybe there is something arcane about it .. some excess hinting?
>
>
>
>
>
>


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Problem with certain text {fonts}
Date: 7 Jul 2006 04:46:03
Message: <44ae1f4b$1@news.povray.org>
Patrick Hagerty wrote:
> Well, just to test exactly that theory, I used it in several applications to 
> make sure it behaved appropriately before I ever posted anything here. 

This "testing" is in essence meaningless as most applications use the
operating system provided means to display all their text. Hence, they have
no control over the rendering of any font.

However, as POV-Ray needs to ray-trace fonts, it cannot use any font drawing
any operating system supplies. Consequently, it needs to read the font file,
and then extract all the information contained therein that "regular"
applications never even see because they just the the operating system to
draw the text.

> I've not seen anything slow about it or the other fonts I've had the problem 
> with,

The problem with the one specific font mentioned in this thread
(01-01-00.ttf) is rather simple. It contains a total of three tables
mapping* the characters' geometry (aka glyphs) to actual character numbers
(ASCII/Unicode). Two for Unicode, of which one is defective and does indeed
lack the characters as reported. Most likely (this is a guess) your
operating system deals with the problem by searching through all other
tables to find something usable - which not only is slow, but also should
*never* be necessary for a valid font file.

Due to these problems (the font file actually has other problems, such as
incorrect size specifications for some glyphs), POV-Ray cannot render your
font. The recommended solution would be to find a font repair/editing
program and have it read the font and then output it again. Most programs
for editing font should generate the missing data, or more likely actually
remove the unnecessary and broken first Unicode character mapping table.

	Thorsten, POV-Team

* For TrueType fonts, this table is commonly known as "cmap".


Post a reply to this message

From: Patrick Hagerty
Subject: Re: Problem with certain text {fonts}
Date: 9 Jul 2006 12:13:09
Message: <44b12b15$1@news.povray.org>
> .... The recommended solution would be to find a font repair/editing
> program and have it read the font and then output it again. Most programs
> for editing font should generate the missing data, or more likely actually
> remove the unnecessary and broken first Unicode character mapping table.

What tool would you recomment for this repair process.  I've always been 
interested in messing around with font files, but have never had the time 
nor the need to do so.  I guess I will "make" the time, under the 
circumstances.

I'm not really too concerned with the specific font I've mentioined for this 
example.  It was a free download and didn't cost me anything.  There are 
other fonts with similar problems, for which I've actually paid money, that 
I might want to use for a project in POV-Ray.  Those I will take the time 
and effort to try to repair, if I can get the right tools.

Your helpful recommendations are greatly appreciated.

- Patrick


"Thorsten Froehlich" <tho### [at] trfde> wrote in message 
news:44ae1f4b$1@news.povray.org...
> Patrick Hagerty wrote:
>> Well, just to test exactly that theory, I used it in several applications 
>> to
>> make sure it behaved appropriately before I ever posted anything here.
>
> This "testing" is in essence meaningless as most applications use the
> operating system provided means to display all their text. Hence, they 
> have
> no control over the rendering of any font.
>
> However, as POV-Ray needs to ray-trace fonts, it cannot use any font 
> drawing
> any operating system supplies. Consequently, it needs to read the font 
> file,
> and then extract all the information contained therein that "regular"
> applications never even see because they just the the operating system to
> draw the text.
>
>> I've not seen anything slow about it or the other fonts I've had the 
>> problem
>> with,
>
> The problem with the one specific font mentioned in this thread
> (01-01-00.ttf) is rather simple. It contains a total of three tables
> mapping* the characters' geometry (aka glyphs) to actual character numbers
> (ASCII/Unicode). Two for Unicode, of which one is defective and does 
> indeed
> lack the characters as reported. Most likely (this is a guess) your
> operating system deals with the problem by searching through all other
> tables to find something usable - which not only is slow, but also should
> *never* be necessary for a valid font file.
>
> Due to these problems (the font file actually has other problems, such as
> incorrect size specifications for some glyphs), POV-Ray cannot render your
> font. The recommended solution would be to find a font repair/editing
> program and have it read the font and then output it again. Most programs
> for editing font should generate the missing data, or more likely actually
> remove the unnecessary and broken first Unicode character mapping table.
>
> Thorsten, POV-Team
>
> * For TrueType fonts, this table is commonly known as "cmap".


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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