POV-Ray : Newsgroups : povray.general : soft text : Re: soft text Server Time
12 Aug 2024 21:17:08 EDT (-0400)
  Re: soft text  
From: Rudy Velthuis
Date: 12 Feb 1999 07:43:50
Message: <36c42206.0@news.povray.org>
Ronald L. Parker schrieb in Nachricht <36bdd3b7.396621@news.povray.org>...
>On Sat, 6 Feb 1999 13:34:43 +0100, "Rudy Velthuis" <rve### [at] gmxnet>
>wrote:
>
>>
>>Ron Parker schrieb in Nachricht <36bb606c.0@news.povray.org>...
>>>>Remco's program needs Windows to plot the given string onto the bitmap.
>>>>Perhaps the freetype lib could do the same.
>>>
>>>Time to write a macro to do it with the superpatch and no external
>                                 ^^^^^^^^^^^^^^^^^^^
>>>code.  Parse time would probably suffer, though... :)
>>
>>
>>If you can write a #macro to write a ttf to a bitmap and then read the
>>individual pixels, be my guest.
>
>No need for a bitmap.  The superpatch has the trace( ) function and
>the min_extent() and max_extent() functions.  You just loop over x and
>y within the bounds of the text and every time you hit the text you
>make a blob component.  piece o' cake.

No, not really. Remco's program uses different strengths for the edges,
depending on the gray (or in fact, only the red component) values created by
antialiasing as Windows does when plotting text (most users will have this
by now, although it is not a standard setup of Windows). So a lighter value
will result in a less strong blob component. That's how he creates very soft
text.

I'm currently working on a simple ANSI-C program (using DJGPP and the
FreeType 1.2 lib) which will do something similar. As soon as I've got a
working version I'll post it in the appropriate binaries newsgroup
(binaries.utilities), source included. I'm thinking of enhancing it a bit
(transformations, different types of components, etc.). As long as I have a
pixel map of the text, it's very simple to do something interesting with it.
Suggestions are welcome.

I use ANSI-C because I want the program to be as platform independent as
possible. The freetype lib and the gnu compiler are available for many
platforms. I would normally use (Windows only) Delphi, like Remco did.

--
Rudy Velthuis


Post a reply to this message

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