POV-Ray : Newsgroups : povray.beta-test : Problem with TTF object, danish characters Server Time
18 Apr 2024 23:20:51 EDT (-0400)
  Problem with TTF object, danish characters (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: Nils Olav Kilen
Subject: Problem with TTF object, danish characters
Date: 23 Sep 2001 07:31:40
Message: <3BADC84E.1AB6A6C0@post8.tele.dk>
I noticed a problem in the latest 3.5 beta 2 release of Pov-Ray.

I've always had difficulties using TrueType fonts (any fonts) with the

OE, AA, ae, oe and aa, if your browser does not support these), but in
the old 3.1 release i found a (very, very quirky) workaround for this,
using a character mapping scheme for each. It worked, but barely.

Thsi facility is unsupported in vers. 3.5 beta. When reading the docs, i
thought: Aha! The global 'charmap' keyword eliminates the need for this!
Alas, not, i'm afraid. The following errors are present:

When using ASCII character mapping, the danish letters are not
supported.

When using UDF8 character mapping (with unicode formatting of the
.pov-file, using notepad), the parser cannot parse the document
successfully, rendering only garbage.

When using SYS character mapping (assuming support for Windows NT4
mapping), Pov-Ray 3.5 crashes every time a render is initiated.

Conclusion: Rendering danish characters (and a lot of other 'foreign'
characters, for that matter) is not possible in Pov-Ray 3.5 at its
present state, and the TTF capability of the program is virtually
unusable to me if this feature persists to be unavailable. Preferably, I
would like the SYS character mapping support to be better,
alternatively, to upgrade the editor and parser to be able to use
unisys-coded TrueType fonts.

Pease let me know if (and when) this matter will be attended to, or if
there is another workaround I haven't been imagining to try out yet. (I
feel I've thought of every possible way to get this to work, but I'm
only so smart...*BG*)

Thank you for keeping up the work with improving and expanding Pov-Ray.

Best Regards

Nils Olav Kilen

nok### [at] post8teledk


Post a reply to this message

From: Jon A  Cruz
Subject: Re: Problem with TTF object, danish characters
Date: 23 Sep 2001 12:32:40
Message: <3BAE0E2B.9609E395@geocities.com>
Nils Olav Kilen wrote:

> I noticed a problem in the latest 3.5 beta 2 release of Pov-Ray.
>
> I've always had difficulties using TrueType fonts (any fonts) with the

> OE, AA, ae, oe and aa, if your browser does not support these), but in
> the old 3.1 release i found a (very, very quirky) workaround for this,
> using a character mapping scheme for each. It worked, but barely.

Yeah. It was always a bit flakey. And some fonts are quite strange.


> Thsi facility is unsupported in vers. 3.5 beta. When reading the docs, i
> thought: Aha! The global 'charmap' keyword eliminates the need for this!
> Alas, not, i'm afraid. The following errors are present:

Oh no!

> When using ASCII character mapping, the danish letters are not
> supported.

Of course. ASCII only supports characters from 0-127. Those characters are
above that.


> When using UDF8 character mapping (with unicode formatting of the
> .pov-file, using notepad), the parser cannot parse the document
> successfully, rendering only garbage.

I hope you mean UTF-8. I haven't checked lately, but when I did before, NT
couldn't save a file as UTF-8. Only as UTF-16/UCS-2. Is that the case? Does
it only say "Unicode" when you save?



> Pease let me know if (and when) this matter will be attended to, or if
> there is another workaround I haven't been imagining to try out yet. (I
> feel I've thought of every possible way to get this to work, but I'm
> only so smart...*BG*)

Well, I still haven't run it (the Linux version is not out yet), but since
I coded the original patch that gave 3.1 support for Unicode and other
encodings, I'll be sure to take a look as soon as the source is released.
Unfortunately, I have gotten a little too familiar with the internals of
TTF fonts, so I'm sure I'll be able to help then.  :-)



On the other hand, once either the Linux beta gets released (which is
targed to accur before final release) I'll be able to run things through a
good set of tests and give the team some more feedback. Or I might have
time to go into Windows for a while.


--
Jon A. Cruz
http://www.geocities.com/joncruz/action.html


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Problem with TTF object, danish characters
Date: 23 Sep 2001 12:55:38
Message: <3bae140a@news.povray.org>
In article <3BADC84E.1AB6A6C0@post8.tele.dk> , Nils Olav Kilen 
<nok### [at] post8teledk>  wrote:

> When using ASCII character mapping, the danish letters are not
> supported.

This is correct.

> When using UDF8 character mapping (with unicode formatting of the
> .pov-file, using notepad), the parser cannot parse the document
> successfully, rendering only garbage.

Are you sure the text output is really UTF8?  Does it work if you use the
raw character code with "\uXXXX" (where XXXX is the hexadecimal character
code) instead of encoding the characters in UTF8 directly?

> When using SYS character mapping (assuming support for Windows NT4
> mapping), Pov-Ray 3.5 crashes every time a render is initiated.

Of course it should not do that...

> Conclusion: Rendering danish characters (and a lot of other 'foreign'
> characters, for that matter) is not possible in Pov-Ray 3.5 at its
> present state, and the TTF capability of the program is virtually
> unusable to me if this feature persists to be unavailable.

It is working and has been tested.  Unfortunately there are so many
variations and formats of TTF fonts that only the operating system can
really know what to do with them.  Please don't jump to conclusions - this
is a *beta* version and the point is to find bugs (if this is one) so they
can be fixed!!!


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Jon A  Cruz
Subject: Re: Problem with TTF object, danish characters
Date: 23 Sep 2001 16:35:47
Message: <3BAE4726.DAF9FBEA@geocities.com>
Thorsten Froehlich wrote:

> > Conclusion: Rendering danish characters (and a lot of other 'foreign'
> > characters, for that matter) is not possible in Pov-Ray 3.5 at its
> > present state, and the TTF capability of the program is virtually
> > unusable to me if this feature persists to be unavailable.
>
> It is working and has been tested.  Unfortunately there are so many
> variations and formats of TTF fonts that only the operating system can
> really know what to do with them.  Please don't jump to conclusions - this
> is a *beta* version and the point is to find bugs (if this is one) so they
> can be fixed!!!

The specific-to-a-single-TTF-file problem is probably important.


If anyone needs it, I have an old Java program I started that will let you
look into a ttf and check it's structure. It will also flag fonts that are
broken for 3.1.


--
Jon A. Cruz
http://www.geocities.com/joncruz/action.html


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Problem with TTF object, danish characters
Date: 23 Sep 2001 17:06:01
Message: <3bae4eb9$1@news.povray.org>
In article <3BAE4726.DAF9FBEA@geocities.com> , "Jon A. Cruz" 
<jon### [at] geocitiescom> wrote:

> The specific-to-a-single-TTF-file problem is probably important.
>
>
> If anyone needs it, I have an old Java program I started that will let you
> look into a ttf and check it's structure. It will also flag fonts that are
> broken for 3.1.

(Warning: Technical description ahead!  Users who don't know details about
the inner workings of TrueType fonts should not jump to any conclusions
based on this description!)

There have been many changes in 3.5 as to how fonts and text strings are
handled.  In particular POV-Ray is now able to search more than one cmap
table.  What the charset selection does (apart from some parser enforced
limits for ASCII characters) is basically change the search order of cmap
tables.  The "ascii" charset first looks into the MacRoman (1/0), then the
Windows Unicode cmap (3/1), and finally in the common symbol cmap (3/0).
The "utf8" and "sys" search order is 3/1, 1/0 and 3/0.

In theory this should cover all available fonts and allow access to all
characters of (Windows) Unicode fonts provided the charset is "utf8" and the
input really is utf8.  I did some testing when I originally implemented the
change and it worked very well for all special German and Japanese
characters I tested.  Of course, it requires a text editor that supports
UTF-8 text files.  I know the POV-Ray Mac text editor does _not_ support
UTF-8 text files, and AFAIK the POV-Ray Win text editor does not support
UTF-8 either.  As for" notepad", I would really be surprised if it supports
UTF-8, but I haven't used it in anything newer than Win 98...


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Nils Olav Kilen
Subject: Re: Problem with TTF object, danish characters
Date: 23 Sep 2001 18:15:24
Message: <3BAE5F2E.C4D3B1A8@post8.tele.dk>
Thorsten Froehlich wrote:

> In article <3BADC84E.1AB6A6C0@post8.tele.dk> , Nils Olav Kilen
> <nok### [at] post8teledk>  wrote:
>
> > When using ASCII character mapping, the danish letters are not
> > supported.
>
> This is correct.
>
> > When using UDF8 character mapping (with unicode formatting of the
> > .pov-file, using notepad), the parser cannot parse the document
> > successfully, rendering only garbage.
>
> Are you sure the text output is really UTF8?  Does it work if you use the
> raw character code with "\uXXXX" (where XXXX is the hexadecimal character
> code) instead of encoding the characters in UTF8 directly?
>
> > When using SYS character mapping (assuming support for Windows NT4
> > mapping), Pov-Ray 3.5 crashes every time a render is initiated.
>
> Of course it should not do that...
>
> > Conclusion: Rendering danish characters (and a lot of other 'foreign'
> > characters, for that matter) is not possible in Pov-Ray 3.5 at its
> > present state, and the TTF capability of the program is virtually
> > unusable to me if this feature persists to be unavailable.
>
> It is working and has been tested.  Unfortunately there are so many
> variations and formats of TTF fonts that only the operating system can
> really know what to do with them.  Please don't jump to conclusions - this
> is a *beta* version and the point is to find bugs (if this is one) so they
> can be fixed!!!
>
>     Thorsten
>
> ____________________________________________________
> Thorsten Froehlich, Duisburg, Germany
> e-mail: tho### [at] trfde
>
> Visit POV-Ray on the web: http://mac.povray.org

I am aware of the fact that this is beta software, and as such not bug free. I
was'nt just seeking help or advice in my posting, but also maybe some feedback
from other betatesters out there who were able to confirm my findings.

I know I made a couple of typo's and other errors (like the UDF/UTF thing),
but I just wanted to report my findings, and maybe get some comment on how to
deal with them (do this-or-that-thing-to-fix-problem, wait for new beta
version, forget the matter), something of that sort...

Thanks for the response, anyway.

Best Regards

Nils Olav Kilen.


Post a reply to this message

From: Nils Olav Kilen
Subject: Re: Problem with TTF object, danish characters
Date: 23 Sep 2001 18:18:24
Message: <3BAE5FE4.59E53CE6@post8.tele.dk>
"Jon A. Cruz" wrote:

> Thorsten Froehlich wrote:
>
> > > Conclusion: Rendering danish characters (and a lot of other 'foreign'
> > > characters, for that matter) is not possible in Pov-Ray 3.5 at its
> > > present state, and the TTF capability of the program is virtually
> > > unusable to me if this feature persists to be unavailable.
> >
> > It is working and has been tested.  Unfortunately there are so many
> > variations and formats of TTF fonts that only the operating system can
> > really know what to do with them.  Please don't jump to conclusions - this
> > is a *beta* version and the point is to find bugs (if this is one) so they
> > can be fixed!!!
>
> The specific-to-a-single-TTF-file problem is probably important.
>
> If anyone needs it, I have an old Java program I started that will let you
> look into a ttf and check it's structure. It will also flag fonts that are
> broken for 3.1.
>
> --
> Jon A. Cruz
> http://www.geocities.com/joncruz/action.html

I tested with the Microsoft 'Verdana' font, which I know to work very reliably
in any other case. If the TTF handling is OS-specific, shoulden't it be handled
in this way, then?

Best Regards,

Nils Olav Kilen.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Problem with TTF object, danish characters
Date: 23 Sep 2001 18:27:47
Message: <3bae61e3$1@news.povray.org>
In article <3BAE5FE4.59E53CE6@post8.tele.dk> , Nils Olav Kilen 
<nok### [at] post8teledk>  wrote:

> If the TTF handling is OS-specific, shoulden't it be handled
> in this way, then?

How could the OS ray-trace a TrueType font character?  If it could, POV-Ray
would not be needed.  The OS can draw the text on screen for itself and
other application correctly because it knows all the users settings, but
POV-Ray has to take the raw TrueType font file, read it, analyze it and make
a 3D object out of it.

In any case, did you try my suggestion?  Did you check Jon's suggestion if
"notepad" really write a UTF-8 text file?

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Josh Seagoe
Subject: Re: Problem with TTF object, danish characters
Date: 23 Sep 2001 20:53:05
Message: <3BAE8469.3070903@smileyface.com>
Thorsten Froehlich wrote:

> UTF-8 either.  As for" notepad", I would really be surprised if it supports
> UTF-8, but I haven't used it in anything newer than Win 98...


Notepad supports UTF-8 in the Windows NT series only.  (There's an extra 
"Encoding" drop-down box under the "Save as file type" one.)

-josh


Post a reply to this message

From: Jon A  Cruz
Subject: Re: Problem with TTF object, danish characters
Date: 23 Sep 2001 23:08:45
Message: <3BAEA33E.BE5C06C@geocities.com>
Josh Seagoe wrote:

> Notepad supports UTF-8 in the Windows NT series only.  (There's an extra
> "Encoding" drop-down box under the "Save as file type" one.)

Which NT?

When I was using NT4 at work a while back, it only did 16-bit, not UTF-8.

Could have been a SP thing.


--
Jon A. Cruz
http://www.geocities.com/joncruz/action.html


Post a reply to this message

Goto Latest 10 Messages Next 6 Messages >>>

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