Path: utzoo!utgpu!attcan!uunet!husc6!linus!gatech!bloom-beacon!apple!casseres From: casseres@Apple.COM (David Casseres) Newsgroups: comp.sys.mac.programmer Subject: Re: Finding the height of a character Message-ID: <15215@apple.Apple.COM> Date: 5 Aug 88 22:13:19 GMT References: Reply-To: casseres@apple.apple.com.UUCP (David Casseres) Organization: Apple Computer Inc, Cupertino, CA Lines: 12 In article lipa@POLYA.STANFORD.EDU (William Lipa) writes: >I am writing a plotting program and I would like to find the height of an >arbitrary character in an arbitrary font so that I can center it vertically on >a line. That means I need a different height for the letter "o" than the >letter "O", even if they are in the same font and size. Macintosh fonts contain no information on the dimensions of the glyphs (i.e. the black-pixel sets) of individual characters. I think about the best you can do is draw the character into a little offscreen bitmap, then find the first and last rows in the bitmap that contain non-0 bits. David Casseres