POV-Ray : Newsgroups : povray.programming : The math of circular truetype fonts : Re: Font metrics function Server Time
28 Jul 2024 22:30:08 EDT (-0400)
  Re: Font metrics function  
From: Lummox JR
Date: 27 Feb 2000 13:46:16
Message: <38B97211.694F@aol.com>
Ron Parker wrote:
> >maximum height above baseline (all glyphs)
> >maximum descender size
> >maximum width
> 
> What use are these, exactly?  Why do we care if the maximum height is
> two X-heights if we don't plan to use the character that attains that
> height?  If we do plan to use that character, we can derive all this
> information with min_extent and max_extent.

Well, knowing the font's maximum height helps for a max height of all
characters. My reasoning behind this is that in some of what I'd be
doing with this, I'd be using more than one arc of circular text, and
it's possible that the height of one string might not match the height
of the other, yet it would be necessary to match their proportions.
I suppose I could just use a macro to figure out the maximum height of
the font, though.

> >An advantage of this approach is that the text object for each character
> >needn't be #declared until it's ready to be rotated. This saves all
> >kinds of trouble, and all kinds of memory as well.
> 
> Doesn't save any memory at all.  You can #local the objects you need
> to use and the memory will be freed when the macro returns.  Believe
> it or not, I did think about all this stuff when I came up with
> min_extent and max_extent.

Doh! Serves me right for not having done more with macros.

> Here are the macros I made to find the letter spacing and kerning.
> None of them allocate any memory that isn't freed before they return.
> Try them.  They DO work.

Many thanks; I'll use those. They should save me no end of grief.

Lummox JR


Post a reply to this message

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