Article View: comp.sys.mac
Article #28998Re: Problem with italics on screen (bounding box miscalculation)
From: Nik Bhatt
Date: Fri, 10 Jun 1988 17:42
Date: Fri, 10 Jun 1988 17:42
26 lines
1915 bytes
1915 bytes
In article <3338@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
>
> We've (how shall I say it), ah, noticed, that italic text comes out
>looking terrible on the Mac screen when using MacDraft. What seems to be
>happening is that the text bounding box is computed based on the vertical
>letterforms and the last letter in a bit of italic text has its top-right
>corner cut off. This problem is exacerbated when using right-justified text.
>
> Is this a bug in MacDraft? A bug in QuickDraw? Or simply a poorly
>defined (or designed) font? Is there anything a typical user can do to avoid
>the problem (other than not using italics)?
When QuickDraw is asked to measure text (via TextWidth, StringWidth,
StdTxMeas, etc.), it measures the distance the pen moves on the baseline.
It does not return a bounding rectangle. You can ONLY create a bounding
rectangle from that length and the ascent+descent of the FONT for plain (and
probably bold) text. The other stylistic variations cause the text to
exceed that rectangle. In the case of italic text, the top lines of the text
image fall outside the rectangle. However, PostScript italic fonts are true
italic fonts, and tend not to lie outside the plain text bounding box, so
the text looks okay on a LaserWriter.
So to answer your question, MacDraft is incorrectly calculating the
bounding rectangle, but unfortunately QuickDraw provides no facility for
getting the bounding rectangle.
--NB
Apple Computer
Technical Details
Message-ID:
<11965@apple.Apple.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!claris!apple!bhattReferences:
<3338@phri.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!claris!apple!bhatt From: bhatt@Apple.COM (Nik Bhatt) Newsgroups: comp.sys.mac Subject: Re: Problem with italics on screen (bounding box miscalculation) Message-ID: <11965@apple.Apple.COM> Date: 10 Jun 88 17:42:30 GMT References: <3338@phri.UUCP> Reply-To: bhatt@apple.apple.com.UUCP (Nik Bhatt) Organization: Apple Computer Inc, Cupertino, CA Lines: 25