POV-Ray : Newsgroups : povray.binaries.utilities : TrueType patch! Server Time
25 Dec 2024 09:40:09 EST (-0500)
  TrueType patch! (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Jamis Buck
Subject: TrueType patch!
Date: 9 Dec 1997 22:11:47
Message: <348E0873.C5A421B1@cs.byu.edu>
Attached is a simple hack of the truetype.c file that makes text objects
be centered about the x-origin.  Could be useful for those tricky text
manipulations? :)  Perhaps if someone has time they could add a pov
"built-in" function to find the length of a string, so the users can
play with these things more...who knows...if i can find the time i may
do it myself! :)

Comments, criticisms, etc. are always welcome.  Just be nice... :)

- Jamis Buck
buc### [at] csbyuedu
http://students.cs.byu.edu/~buck


Post a reply to this message


Attachments:
Download 'truetype.c.txt' (97 KB)

From: Ken Cecka
Subject: Re: TrueType patch!
Date: 9 Dec 1997 23:18:09
Message: <348e2604.0@news.povray.org>
Wonderful!  I have one suggestion.  It seems like pov doesn't generally
return information about an object, rather it gives you an object you know
information about.  For example, when you use height fields, pov maps the
height field to a 1x1x1 unit cube, from which it can be rotated, scaled, or
whatever.  It doesn't create a height field which is 640 units across and
480 units deep, and who knows how high, and then supply vectors giving the
dimensions.  The text object is the only one (to my knowledge) which does
not come prefit to a 1x1x1 cube, or require vectors to specify a size.  I
haven't looked at the code, so I don't know how difficult it would be, but
it seems to me that the text object would best be kept in the tradition of
other pov objects and automatically created in a 1x1x1 cube.  Unfortunately,
this kind of a change would violate backwards compatiblity.  My
recommendation is to add optional bounding vectors to the syntax of the text
object.  Similar to the syntax of a box, but optional.  That would allow for
backwards compatibility.  I'd be curious to hear any feedback about this
idea, both from a usability standpoint and programmability.

Ken

Jamis Buck wrote in message <348E0873.C5A421B1@cs.byu.edu>...
>Attached is a simple hack of the truetype.c file that makes text objects
>be centered about the x-origin.  Could be useful for those tricky text
>manipulations? :)  Perhaps if someone has time they could add a pov
>"built-in" function to find the length of a string, so the users can
>play with these things more...who knows...if i can find the time i may
>do it myself! :)
>
>Comments, criticisms, etc. are always welcome.  Just be nice... :)
>
>- Jamis Buck
>buc### [at] csbyuedu
>http://students.cs.byu.edu/~buck


Post a reply to this message

From: Tarasine Short
Subject: Re: TrueType patch!
Date: 10 Dec 1997 10:57:23
Message: <348EBBE3.6008@cougarnet.byu.edu>
I've thought about your suggestion, however, I think, at least from a
usability standpoint, there may be a better way to do it than to map
a text object to a 1x1x1 cube.  If the text was mapped to such a cube,
how would you know how much to scale it to make it look right?  You're
just back to trial and error, much like manipulating text right now.

Rather, I'm working on two new "built-in" functions, getlength and
getheight.  Both take a text string, a font name, and an offset (same
as a text object) and return (respectively) the length and height of
a text object of the given specs.  Doing this would allow users to
more easily manipulate a text object by doing simple math to center it,
resize it, etc.  With this information, one could even scale the text
to fit into a 1x1x1 cube, if one wanted.

So, that's what's happening right now.  I've almost got it...give me
another
week or so. :)  If anyone is interested in this, let me know and I'll
post
the altered source files to this group.

Ciao!

- Jamis Buck
buc### [at] csbyuedu
http://students.cs.byu.edu/~buck

Ken Cecka wrote:
> 
> Wonderful!  I have one suggestion.  It seems like pov doesn't generally
> return information about an object, rather it gives you an object you know
> information about.  For example, when you use height fields, pov maps the
> height field to a 1x1x1 unit cube, from which it can be rotated, scaled, or
> whatever.  It doesn't create a height field which is 640 units across and
> 480 units deep, and who knows how high, and then supply vectors giving the
> dimensions.  The text object is the only one (to my knowledge) which does
> not come prefit to a 1x1x1 cube, or require vectors to specify a size.  I
> haven't looked at the code, so I don't know how difficult it would be, but
> it seems to me that the text object would best be kept in the tradition of
> other pov objects and automatically created in a 1x1x1 cube.  Unfortunately,
> this kind of a change would violate backwards compatiblity.  My
> recommendation is to add optional bounding vectors to the syntax of the text
> object.  Similar to the syntax of a box, but optional.  That would allow for
> backwards compatibility.  I'd be curious to hear any feedback about this
> idea, both from a usability standpoint and programmability.
> 
> Ken
> 
> Jamis Buck wrote in message <348E0873.C5A421B1@cs.byu.edu>...
> >Attached is a simple hack of the truetype.c file that makes text objects
> >be centered about the x-origin.  Could be useful for those tricky text
> >manipulations? :)  Perhaps if someone has time they could add a pov
> >"built-in" function to find the length of a string, so the users can
> >play with these things more...who knows...if i can find the time i may
> >do it myself! :)
> >
> >Comments, criticisms, etc. are always welcome.  Just be nice... :)
> >
> >- Jamis Buck
> >buc### [at] csbyuedu
> >http://students.cs.byu.edu/~buck


Post a reply to this message

From: Alain CULOS
Subject: Re: TrueType patch!
Date: 10 Dec 1997 18:42:14
Message: <348F28D6.61CDA910@bigfoot.com>
<HTML>
Tarasine Short wrote:
<BLOCKQUOTE TYPE=CITE>So, that's what's happening right now.  I've
almost got it...give me
<BR>another
<BR>week or so. :)  If anyone is interested in this, let me know and
I'll
<BR>post
<BR>the altered source files to this group.</BLOCKQUOTE>
Yes please, that would be more than just usefull,
<BR>Cheers,
<BR>Al.

<P>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
<BR>=-=-=-=-= ANTI SPAM / ANTI ARROSAGE COMMERCIAL :
<BR>Pour me répondre, veuillez enlever les deux moins de mon adresse.
<BR>To answer me, please take out both minus signs from my address.
<BR> </HTML>


Post a reply to this message

From: Denis Olivier
Subject: Re: TrueType patch!
Date: 16 Dec 1997 09:01:39
Message: <349689C3.45B3@cyberstation.fr>
Ken Cecka wrote:
> 
>  The text object is the only one (to my knowledge) which does
> not come prefit to a 1x1x1 cube, or require vectors to specify a size.  I
> haven't looked at the code, so I don't know how difficult it would be, but
> it seems to me that the text object would best be kept in the tradition of
> other pov objects and automatically created in a 1x1x1 cube.  

I totally agree.

-- 
Denis Olivier,
http://www.povlab.org, 3D modeller for POV-Ray 3.0
__________________________________________________________________

Image ?   http://www.povlab.org/cyber.asp?url=download/cuisine.jpg
Photo portfolio    http://www.povlab.org/cyber.asp?url=photos.html


Post a reply to this message

From: Twyst
Subject: Re: TrueType patch!
Date: 16 Dec 1997 19:06:16
Message: <3497188a.0@news.povray.org>
Denis Olivier wrote in message <349### [at] cyberstationfr>...
>Ken Cecka wrote:
>>
>>  The text object is the only one (to my knowledge) which does
>> not come prefit to a 1x1x1 cube, or require vectors to specify a size.  I
>> haven't looked at the code, so I don't know how difficult it would be,
but
>> it seems to me that the text object would best be kept in the tradition
of
>> other pov objects and automatically created in a 1x1x1 cube.
>
>I totally agree.
>
>--

Well.. You will then either be faced with "squashed" text, or really tiny
text, for longer strings.

Twyst================================
EFnet and NewNet #povray Channel Operator
Website: http://twyst.home.ml.org
E-Mail: twy### [at] v-wavecom
=====================================


Post a reply to this message

From: Ken Cecka
Subject: Re: TrueType patch!
Date: 4 Jan 1998 15:15:29
Message: <34affcad.0@news.povray.org>
That's the same thing that happens with a height field in pov, but one you
get your squished object, you know exactly how it is squished, and can scale
it.

Ken

Twyst wrote in message <3497188a.0@news.povray.org>...
>
>Denis Olivier wrote in message <349### [at] cyberstationfr>...
>>Ken Cecka wrote:
>>>
>>>  The text object is the only one (to my knowledge) which does
>>> not come prefit to a 1x1x1 cube, or require vectors to specify a size.
I
>>> haven't looked at the code, so I don't know how difficult it would be,
>but
>>> it seems to me that the text object would best be kept in the tradition
>of
>>> other pov objects and automatically created in a 1x1x1 cube.
>>
>>I totally agree.
>>
>>--
>
>Well.. You will then either be faced with "squashed" text, or really tiny
>text, for longer strings.
>
>Twyst================================
>EFnet and NewNet #povray Channel Operator
>Website: http://twyst.home.ml.org
>E-Mail: twy### [at] v-wavecom
>=====================================
>
>
>


Post a reply to this message

From: Dylan Beattie
Subject: Re: TrueType patch!
Date: 18 Dec 1997 12:56:12
Message: <349963BC.E19802C2@ecs.soton.ac.uk-NOSPAM>
Denis Olivier wrote:
> 
> Ken Cecka wrote:
> >
> >  The text object is the only one (to my knowledge) which does
> > not come prefit to a 1x1x1 cube, or require vectors to specify a size.  I
> > haven't looked at the code, so I don't know how difficult it would be, but
> > it seems to me that the text object would best be kept in the tradition of
> > other pov objects and automatically created in a 1x1x1 cube.
> 
> I totally agree.

Nice idea, but it be just as awkward scaling it from a 1 cube to 'true'
proportions as it is to take the current text and squash it into a cube.
What would be useful would be a function to return the extremes of a
given object, allowing you to scale/translate it accurately according to
the actual dimensions of the object, rather than by trial and error.

Dylan


Post a reply to this message

From: Ronald L  Parker
Subject: Re: TrueType patch!
Date: 23 Dec 1997 23:12:30
Message: <34a28b0f.180308021@news.povray.org>
On Thu, 18 Dec 1997 17:56:12 +0000, Dylan Beattie
<dmb### [at] ecssotonacuk-NOSPAM> wrote:

>Denis Olivier wrote:
>> 
>> Ken Cecka wrote:
>> >
>> >  The text object is the only one (to my knowledge) which does
>> > not come prefit to a 1x1x1 cube, or require vectors to specify a size.  I
>> > haven't looked at the code, so I don't know how difficult it would be, but
>> > it seems to me that the text object would best be kept in the tradition of
>> > other pov objects and automatically created in a 1x1x1 cube.
>> 
>> I totally agree.
>
>Nice idea, but it be just as awkward scaling it from a 1 cube to 'true'
>proportions as it is to take the current text and squash it into a cube.
>What would be useful would be a function to return the extremes of a
>given object, allowing you to scale/translate it accurately according to
>the actual dimensions of the object, rather than by trial and error.

I knew I had seen this posted somewhere; that's why I went and wrote
it.  I just couldn't find it back when I needed it.  

Ahem.  For all those who agree with Mr. Beattie, your prayers are
answered.  You can find just the patch you need over in
povray.binaries.utilities or on my web page at
http://www2.fwi.com/~parkerr/traces.html  

A C compiler and POV sources are required. I'll make a Win32 compiled
version available if there's enough interest (in email, please.)


Post a reply to this message

From: Ronald L  Parker
Subject: Re: TrueType patch!
Date: 23 Dec 1997 23:14:49
Message: <34a38bee.180531021@news.povray.org>
On Wed, 24 Dec 1997 04:12:30 GMT, par### [at] mailfwicom (Ronald L.
Parker) wrote:

>You can find just the patch you need over in
>povray.binaries.utilities or on my web page at
>http://www2.fwi.com/~parkerr/traces.html  

D'oh!  This _is_ povray.binaries.utilities.  Must get sleep.  Or
caffeine.  

Mmmm... Caffeine....


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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