[comp.sys.mac] Problem with italics on screen

bhatt@Apple.COM (Nik Bhatt) (06/11/88)

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