POV-Ray : Newsgroups : povray.binaries.images : Other things the text object can do. Server Time
9 May 2025 09:35:17 EDT (-0400)
  Other things the text object can do. (Message 14 to 23 of 37)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Thomas de Groot
Subject: Re: Other things the text object can do.
Date: 6 Mar 2025 08:02:56
Message: <67c99d00$1@news.povray.org>
Op 06/03/2025 om 13:46 schreef Thomas de Groot:
> Strangely enough, My search did not show the relevant message(s) in 
> p.programming. I used "Ron Parker + kerning" In the Search bar of the 
> povray.org newsgroups...
> 

...but this seems to be the message:

https://news.povray.org/povray.programming/thread/%3C38B18153.72BE%40aol.com%3E/?ttop=445029&toff=800&mtop=84879&moff=20

Go to about the end of the thread.

-- 
Thomas


Post a reply to this message

From: ingo
Subject: Re: Other things the text object can do.
Date: 6 Mar 2025 08:40:00
Message: <web.67c9a4e59216b80b17bac71e8ffb8ce3@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

>
> ...but this seems to be the message:
>
>
https://news.povray.org/povray.programming/thread/%3C38B18153.72BE%40aol.com%3E/?ttop=445029&toff=800&mtop=84879&moff
=20
>
> Go to about the end of the thread.

Thank you, it appears I hallucinated there to be more and Google hates me.
Couldn't find it searching several ways.

ingo


Post a reply to this message

From: Bald Eagle
Subject: Re: Other things the text object can do.
Date: 6 Mar 2025 09:10:00
Message: <web.67c9abed9216b80bd97b426e25979125@news.povray.org>
"ingo" <nomail@nomail> wrote:

> Thank you, it appears I hallucinated there to be more and Google hates me.
> Couldn't find it searching several ways.

Me neither.
Google sucks the big suck.
I even tried searching specifically for "font metric function" and got nothing.

Useless is being generous.  Search engines today are worse than useless.

However, persistence wins the day!  :)


Welcome back, Thomas.

- BW


Post a reply to this message

From: jr
Subject: Re: Other things the text object can do.
Date: 6 Mar 2025 10:05:00
Message: <web.67c9b8ec9216b80bc342f2ec6cde94f1@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> "ingo" <nomail@nomail> wrote:
> > Thank you, it appears I hallucinated there to be more and Google hates me.
> > Couldn't find it searching several ways.
> Me neither.
> Google sucks the big suck.
> I even tried searching specifically for "font metric function" and got nothing.
>
> Useless is being generous.  Search engines today are worse than useless.

sort of agree, but perhaps your combined activity has caused Google "to wake up"
:-), typing "ron parker font" in the above 'Search' shows the relevant result,
top of list.

> Welcome back, Thomas.


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: Other things the text object can do.
Date: 6 Mar 2025 10:30:00
Message: <web.67c9bf169216b80bd97b426e25979125@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> > Useless is being generous.  Search engines today are worse than useless.
>
> sort of agree, but perhaps your combined activity has caused Google "to wake up"
> :-), typing "ron parker font" in the above 'Search' shows the relevant result,
> top of list.

I just did exactly that, and that thread isn't on my list at all.
3 pages of results, and not one of them is the proper thread.

It has to do with cookies and all of this "tailored search results" BS
Wish I could use Yandex or some of the other ones from this computer.

We need a private search engine for the newsgroups!

- BW


Post a reply to this message

From: Bald Eagle
Subject: Re: Other things the text object can do.
Date: 6 Mar 2025 12:00:00
Message: <web.67c9d3769216b80bd97b426e25979125@news.povray.org>
I did find these though, which may be of related interest.

https://news.povray.org/povray.text.scene-files/thread/%3C4004808c%241%40news.povray.org%3E/?ttop=441451&toff=350

https://news.povray.org/povray.beta-test/thread/%3C3bd48bf6%40news.povray.org%3E/?ttop=441402&toff=1900

https://news.povray.org/povray.programming/thread/%3C38B18153.72BE%40aol.com%3E/?ttop=445029&toff=800&mtop=84879&moff=2
0


Post a reply to this message

From: ingo
Subject: Re: Other things the text object can do.
Date: 6 Mar 2025 13:50:00
Message: <web.67c9ed999216b80b17bac71e8ffb8ce3@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote

>
https://news.povray.org/povray.beta-test/thread/%3C3bd48bf6%40news.povray.org%3E/?ttop=441402&toff=1900

The explanation in the last post of this thread is the interesting bit. Last
post:
https://news.povray.org/povray.beta-test/message/%3Cslrn9tdjuv.32q.ron.parker%40fwi.com%3E/#%3Cslrn9tdjuv.32q.ron.parke
r%40fwi.com%3E

ingo


Post a reply to this message

From: Chris R
Subject: Re: Other things the text object can do.
Date: 6 Mar 2025 14:55:00
Message: <web.67c9fcb19216b80b33dbb0635cc1b6e@news.povray.org>
"Leroy" <whe### [at] gmailcom> wrote:
> "Chris R" <car### [at] comcastnet> wrote:
> > William F Pokorny <ano### [at] anonymousorg> wrote:
> > >
> > > Only tricky part is figuring out the base character size and spacing.
> > > I've not found an easy and reliable way to do that as yet. I got to the
> > > above values by trial and error.
> > >
> > > Used box characters for the rectangular frame using the strings:
> > > "┌─────────┐",
"└───&#9
47
> 2;
> > ─────┘" and
"│││││││││&#9
47
> 4;
> > │││││",
> > >
> > > Bill P.
> >
> > If you are using a mono-type font, this worked for me:
> >
> > #local _t1 = text { ttf "fontname.ttf" "A" 1.0, 0 }
> > #local _t2 = text { ttf "fontname.ttf" "AA" 1.0, 0 }
> > #local _t1sz = max_extent(_t1) - min_extent(_t1);
> > #local _t2sz = max_extent(_t2) - min_extent(_t2);
> > #local _unit_width = (_t2sz - _t1sz).x;
> >
> > text { ttf "fontname.ttf" "What the heck?" 1.0, -2*unit_width*x }
> > text { ttf "fontname.ttf" "What the heck?" 1.0, <-unit_width, -1, 0> translate
> > <0, 14, 0> }
> >
> > -- Chris R
>
> I remember this little trick. But I didn't want to be limited to  mono-type
> fonts so I wrote a macro that cut a string into pieces and place each letter
> separately. And promptly forgot about it.

Aah!  In the meantime, I went down a rabbit hole and essentially did the same
thing...

See: https://github.com/carath63/povlibrary
library/libtext.inc
Examples/text_test.pov

Here is an example of using that technique to lay out text around a cylinder, up
a helix, and following a spline.  The spline relies on how close your the
distance between letters lines up with the distance between spline points.  As
you can see, it didn't work very well once the letters moved around the front
curve of the spline.  Still trying to figure out how to fix that.

-- Chris R


Post a reply to this message


Attachments:
Download 'text_test.png' (98 KB)

Preview of image 'text_test.png'
text_test.png


 

From: Chris R
Subject: Re: Other things the text object can do.
Date: 6 Mar 2025 15:35:00
Message: <web.67ca06699216b80b33dbb0635cc1b6e@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:
> "Leroy" <whe### [at] gmailcom> wrote:
> > "Chris R" <car### [at] comcastnet> wrote:
> > > William F Pokorny <ano### [at] anonymousorg> wrote:
> > > >
> > > > Only tricky part is figuring out the base character size and spacing.
> > > > I've not found an easy and reliable way to do that as yet. I got to the
> > > > above values by trial and error.
> > > >
> > > > Used box characters for the rectangular frame using the strings:
> > > >
"┌─────────┐",
"└───&
#9
> 47
> > 2;
> > > ─────┘" and
"│││││││││&
#9
> 47
> > 4;
> > > │││││",
> > > >
> > > > Bill P.
> > >
> > > If you are using a mono-type font, this worked for me:
> > >
> > > #local _t1 = text { ttf "fontname.ttf" "A" 1.0, 0 }
> > > #local _t2 = text { ttf "fontname.ttf" "AA" 1.0, 0 }
> > > #local _t1sz = max_extent(_t1) - min_extent(_t1);
> > > #local _t2sz = max_extent(_t2) - min_extent(_t2);
> > > #local _unit_width = (_t2sz - _t1sz).x;
> > >
> > > text { ttf "fontname.ttf" "What the heck?" 1.0, -2*unit_width*x }
> > > text { ttf "fontname.ttf" "What the heck?" 1.0, <-unit_width, -1, 0> translate
> > > <0, 14, 0> }
> > >
> > > -- Chris R
> >
> > I remember this little trick. But I didn't want to be limited to  mono-type
> > fonts so I wrote a macro that cut a string into pieces and place each letter
> > separately. And promptly forgot about it.
>
> Aah!  In the meantime, I went down a rabbit hole and essentially did the same
> thing...
>
> See: https://github.com/carath63/povlibrary
> library/libtext.inc
> Examples/text_test.pov
>
> Here is an example of using that technique to lay out text around a cylinder, up
> a helix, and following a spline.  The spline relies on how close your the
> distance between letters lines up with the distance between spline points.  As
> you can see, it didn't work very well once the letters moved around the front
> curve of the spline.  Still trying to figure out how to fix that.
>
> -- Chris R

To prove my spline layout code is correct, I created some tools for converting a
spline whose values have an arbitrary range into a spline whose values go from
0.0 to the computed length of the spline over the given range of values.  Using
a spline that has been tuned this way gave a much better result in laying out
the text.

-- Chris R


Post a reply to this message


Attachments:
Download 'text_test.png' (85 KB)

Preview of image 'text_test.png'
text_test.png


 

From: Bald Eagle
Subject: Re: Other things the text object can do.
Date: 6 Mar 2025 16:00:00
Message: <web.67ca0bc19216b80bd97b426e25979125@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:

> To prove my spline layout code is correct, I created some tools for converting a
> spline whose values have an arbitrary range into a spline whose values go from
> 0.0 to the computed length of the spline over the given range of values.  Using
> a spline that has been tuned this way gave a much better result in laying out
> the text.

are you aware that there are spline macros to do this sort of thing?
IIRC, they are in transforms.inc

- BW


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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