POV-Ray : Newsgroups : povray.programming : The math of circular truetype fonts : Re: The math of circular truetype fonts Server Time
28 Jul 2024 16:32:01 EDT (-0400)
  Re: The math of circular truetype fonts  
From: Ron Parker
Date: 21 Feb 2000 16:45:47
Message: <38b1b20b@news.povray.org>
On Mon, 21 Feb 2000 15:05:54 -0500, Lummox JR wrote:
>Ron Parker wrote:
>[snip]
>> I'm also not sure this is the right group for this question; he might
>> find better answers in .advanced-users.
>
>So noted. I posted here because I couldn't think of a better group for
>the discussion. Although to be honest, I think the mathematics make this
>more of a programming question than anything else.

Probably, but I'm guessing some of our smarter math guys (For example, Adam 
Coffman, who teaches math at a university a few miles from me) don't hang out 
here.

>Using macros would be nice, but I really can't think of a good way to go
>about that. min_extent and max_extent cover the bounding area just fine,
>but they don't go into issues like character spacing and kerning.

You shouldn't worry about kerning anyway, since it is usually used to make
characters overlap and is really only valid if they're going to be in a 
straight line.  Perhaps character spacing is something best left to the user
to decide.  If not, it is possible to determine the character spacing for
a given character.  Just subtract the width of "|X|" from the width of "||"
where X is the character you want the advance widths for.  A modified version 
of this can give you kerning, too.  Find the advance widths for the two 
characters individually, and for the two characters in one string.  The 
difference is the kern.  Obviously this doesn't work when kerning extends
over multiple characters, but that's rare.  If TrueType fonts handled
ligatures like fi and ffi correctly, you'd also have problems, but fortunately
(or unfortunately) it doesn't.  You'll also have problems if there are kern
pairs using "|" but that doesn't seem likely either.

-- 
These are my opinions.  I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html


Post a reply to this message

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