[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using fonts > 255 points



In article <9212052139.AA20956@chasm.scar.utoronto.ca>,
90taobri@chasm.scar.utoronto.ca (Brian Tao) wrote:

>      I've discussed this briefly with Unknown, but I can't seem to get him
> to understand what I'm saying, so I'll try again here.  ;-)

Can we start a club for this?  :)  (Matt:  Don't bother replying if it
would
contain the words "jerk", "dweeb", "dork", "oh shut up" or "go to hell")

>      Let's assume I have an all caps font with long, deep swashes and
> serifs.  Is it possible for the *physical* height (i.e., the font bounds
> rectangle) of the font to exceed 255 pixels?  I seem to remember (and I
> don't have my Apple IIGS Technical Reference handy) that the height of the
> font rectangle is a word value.  Even if this is a signed integer, that
> allows for a 32767-pixel tall font.

According to the Font data structure, yes.  The real question is whether
or not any part of QuickDraw or the Font Manager (or Pointless) _assumes_
sizes will be less than 255 points because the Font Manager imposes that
restriction through Font IDs.  That's much harder to answer.

> 
>     Secondly, am I correct in assuming there is no constant relationship
> between "point size" and actual pixel height from font to font?  That is,
> one font at 72 points may actually only be 65 pixels tall, but another at
> the same point size (like that all caps font I mentioned) is really 90
> pixels tall.
> 
This is definitely true.

>     If both assumptions are true, then it shouldn't be difficult to get
> around the 255-point limit with Pointless.  It does *not* entail re-writing
> portions of the system software, as long as the assumptions are valid for
> the Font Manager and Print Manager.
> 

Well, yes and no.  The real problem is the four-byte Font ID data
structure, which has one byte for the font size.  This is how you request
fonts from
the system, so that's where the limitation comes from at a top level.

You might be able to use this technique to make, for example, BigShaston
where size "1" is really "256" and size "255" is really "510", but that
assumes the first question is true, and we don't know that at this point.

============================================================================
Matt Deatherage, Developer Support Center, Apple Computer, Inc.
Personal mail only -- please POST technical questions, questions about
Apple and its policies, where to find documents and related inquiries.
The opinions I express don't represent Apple, which makes us both happy.
============================================================================