guido@boring.UUCP (10/16/85)
Use the QuickDraw routines to set the font and size of the current GrafPort (make sure you have done a SetPort): TextFont(font_id); TextSize(point_size); The "point size" is unrelated to the number of pixels the font is high, except that larger point sizes give larger characters; it is up to the font designer how large 12 point letters really are (a "point" is 1/72 inch but different output devices may give different results!) Now the QuickDraw routine GetFontInfo tells you all about the current font: it fills a struct FontInfo with fields ascent, descent, widMax and leading, all in pixels. The line height is ascent+descent+leading; I believe you must fill TextEdit's FirstBL (first base line) with ascent+leading to get a nice looking display. (Leading is the number of blank pixels between lines; widMax is the maximum width of any character in the font.) (PS: TextSize(0) will give you the real font that's closest to 12 points.) -- Guido van Rossum, CWI, Amsterdam (guido@mcvax.UUCP)