POV-Ray : Newsgroups : povray.beta-test : Problem with TTF object, danish characters Server Time
2 May 2024 02:48:36 EDT (-0400)
  Problem with TTF object, danish characters (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
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

From: Adrien Beau
Subject: Re: Problem with TTF object, danish characters
Date: 24 Sep 2001 02:32:47
Message: <3BAED3E5.7E9D36EA@sycomore.fr>
UTF-8 editor
------------

The POV-Team seems to say you need to be sure to write UTF-8
files, because POV cannot read UTF-16 files.

I know of one such program: Vim. Yes, it's a Vi clone, so you
might not like the way it works. But you don't need to do much
work there, and gvim has a graphical interface. Open the file
with it, type
	:set fileencoding=utf-8
and then
	:wq
to write it and quit the editor.

Vim 6.0 is still in beta (for only a few more days) and is
available from Vim FTP mirrors in the unreleased/pc directory.
Take the gvim60ax.exe file.

-- 
Adrien Beau - adr### [at] freefr - http://adrien.beau.free.fr
 Mes propos n'engagent que moi et en aucun cas mes employeurs


Post a reply to this message

From: Nils Olav Kilen
Subject: Re: Problem with TTF object, danish characters
Date: 24 Sep 2001 16:57:05
Message: <3BAF9E54.A52F66DD@post8.tele.dk>
> > 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?
>
> ____________________________________________________
> Thorsten Froehlich, Duisburg, Germany
> e-mail: tho### [at] trfde
>
> Visit POV-Ray on the web: http://mac.povray.org

At last - a useable hint! I tried the raw character code with "\uXXXX" and a
little help from Character Map, and it worked! I must admit that I still have
very limited knowledge of UTF8 coding, but I have noticed the 'unicode'
markings in Character Map. I could never have guessed the \u-part by myself.

Thank you very much for this information. You have been very helpful.

Best Regards

Nils Olav Kilen, nok### [at] post8teledk.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Problem with TTF object, danish characters
Date: 25 Sep 2001 10:29:01
Message: <3bb094ad@news.povray.org>
In article <3BAF9E54.A52F66DD@post8.tele.dk> , Nils Olav Kilen 
<nok### [at] post8teledk>  wrote:

> At last - a useable hint! I tried the raw character code with "\uXXXX" and a
> little help from Character Map, and it worked! I must admit that I still have
> very limited knowledge of UTF8 coding, but I have noticed the 'unicode'
> markings in Character Map. I could never have guessed the \u-part by myself.

Hmm, while it is good that this works (so at least the TrueType rendering
works), I am still worried because of the UTF-8 problem.  If notepad indeed
claims it writes UTF-8, could you ZIP a (small) sample file with lots of
non-ASCII characters and post it in beta-test.binaries, please?  It would
help to find out what is wrong if the file is UTF-8.

    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: Ron Parker
Subject: Re: Problem with TTF object, danish characters
Date: 25 Sep 2001 10:46:17
Message: <slrn9r165r.4cj.ron.parker@fwi.com>
On Tue, 25 Sep 2001 10:28:55 -0400, Thorsten Froehlich wrote:
>In article <3BAF9E54.A52F66DD@post8.tele.dk> , Nils Olav Kilen 
><nok### [at] post8teledk>  wrote:
>
>> At last - a useable hint! I tried the raw character code with "\uXXXX" and a
>> little help from Character Map, and it worked! I must admit that I still have
>> very limited knowledge of UTF8 coding, but I have noticed the 'unicode'
>> markings in Character Map. I could never have guessed the \u-part by myself.
>
>Hmm, while it is good that this works (so at least the TrueType rendering
>works), I am still worried because of the UTF-8 problem.  If notepad indeed
>claims it writes UTF-8, could you ZIP a (small) sample file with lots of
>non-ASCII characters and post it in beta-test.binaries, please?  It would
>help to find out what is wrong if the file is UTF-8.

It is UTF-8, but it starts with EF BB BF, the UTF-8 encoding of the FFFE 
endianness indicator (as written on an Intel machine, obviously.  A Motorola
machine would use EF BF BE)  We could easily interpret the presence of those
three bytes as an implicit UTF-8 charmap, and infer the endianness of the
other UTF-8 characters in the file at the same time.

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Problem with TTF object, danish characters
Date: 25 Sep 2001 11:05:10
Message: <3bb09d26@news.povray.org>
In article <slr### [at] fwicom> , ron### [at] povrayorg (Ron
Parker) wrote:

> It is UTF-8, but it starts with EF BB BF, the UTF-8 encoding of the FFFE
> endianness indicator (as written on an Intel machine, obviously.  A Motorola
> machine would use EF BF BE)  We could easily interpret the presence of those
> three bytes as an implicit UTF-8 charmap, and infer the endianness of the
> other UTF-8 characters in the file at the same time.

Ah, of course, if it is a whole UTF-8 file.  I will fix it in the next few
weeks.


    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: 25 Sep 2001 21:21:34
Message: <3BB12D12.E18CB523@geocities.com>
Ron Parker wrote:

> It is UTF-8, but it starts with EF BB BF, the UTF-8 encoding of the FFFE
> endianness indicator (as written on an Intel machine, obviously.  A Motorola
> machine would use EF BF BE)

Actually, UTF-8 is byte-order independent. So the UTF-8 BOM will always be EF BB
BF.


> We could easily interpret the presence of those
> three bytes as an implicit UTF-8 charmap, and infer the endianness of the
> other UTF-8 characters in the file at the same time.

http://www.unicode.org/unicode/faq/utf_bom.html

I had just run into this on some Java related issues.
Basically, the BOM is a special use of a standard "ZERO WIDTH NON-BREAKING SPACE"
character. Sometimes it might be treated as a BOM (or UTF-8 flag) and stripped out,
but it doesn't have to be. At the begining of a file it's probably a good idea,
though.



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


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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