Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!apple.com!cep From: cep@apple.com (Christopher Pettus) Newsgroups: comp.sys.mac.programmer Subject: Re: Font Menus Message-ID: <2452@internal.Apple.COM> Date: 22 Jun 89 18:23:03 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 24 References:<19728@cup.portal.com> <14032@dartvax.Dartmouth.EDU> In article <14032@dartvax.Dartmouth.EDU> isle@eleazar.dartmouth.edu (Ken Hancock) writes: > Quick question, probably not so quick answer: > How does one have a Font menu show the fonts in their > own typeface? Claris' MacWrite II does it without > any noticable delay. Suitcase II does it, but > takes quite a long time to build it. The basic algorithm is to write a replacement MDEF which "knows" that the names of the items in it are font names. The MDEF then goes through drawing the font name in the font to which the name corresponds. The problem is that this is very, very slow, since the font manager has to suck in and handle each individual font; in a system with a large number of fonts, this can take forever. Therefore, it makes sense to build a bitmap which contains the screen image for the menu, and just blit that onto the screen when it's time to draw. I assume that's what MacWrite II does. -- Christopher Pettus | "Ganesha Said: 'Done! The very Network Systems Development | day I was born I made my first Apple Computer, Inc. | mistake, and by that path have cep@apple.com {nsc, sun}!apple!cep | I sought wisdom ever since.'" AppleLink: PETTUS.C | - The Mahabharata (408) 974-0004 | I: A Mine of Jewels and Gems