Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!decwrl!sun-barr!apple!oliveb!amiga!cbmvax!daveh From: daveh@cbmvax.UUCP (Dave Haynie) Newsgroups: comp.sys.amiga Subject: Re: SetFont Message-ID: <7021@cbmvax.UUCP> Date: 31 May 89 17:24:43 GMT References: <1275@psueea.UUCP> Organization: Commodore Technology, West Chester, PA Lines: 38 in article <1275@psueea.UUCP>, bartonr@psu-cs.cs.pdx.edu (Robert Barton) says: > =>SetFont does, however, hack some thing it's really not supposed to touch. So > =>it is possible for it to confuse system things, like the WorkBench, that don't > =>adjust to font changes. > How does SetFont notify other programs that it has just changed a font? > Does it call the SetPrefs() function or use some other mechanism? > Many programs (including some commercial ones) apparently don't check for > NEWPREFS IntuiMessages. Workbench and AmigaBasic do, and then adjust their > menus accordingly. It doesn't. In fact, calling up preferences can reset the font. While you can use SetFont at any point, I really intended it as something that's used once, like in your Startup-Sequence. Actually, that's almost true. If you're setting the font of the CLI you're in ("SetFont..." or "SetFont ... WINDOW" does this), I do actually in effect notify the console device of the window's font change by sending the init sequence (ESC-c as I recall), which causes the console handler to rebuild it's ConUnit. Which tells me that consoles currently do the Right Thing. A ConUnit gets built when that console starts up, and it reads the window font (which is inherited from the screen font descriptor) and uses that font from then on, unless the unit gets rebuilt. Thus, I can change the window font all I like, and not trip up the console using that window, since it's using it's own idea of the proper font. Workbench seems to do the wrong thing. It uses statically created menus, but updates the font used based on the action of SetFont. So if you go to a font larger than the 8 point topaz fonts, WB will get in trouble. Now, as I mentioned, SetFont is really mucking with stuff that WorkBench never intended it to muck with, but it is possible to build programs, today, that adjust properly to different system fonts. Hopefully the system stuff will handle this right, at least, in 1.4... -- Dave Haynie "The 32 Bit Guy" Commodore-Amiga "The Crew That Never Rests" {uunet|pyramid|rutgers}!cbmvax!daveh PLINK: D-DAVE H BIX: hazy Amiga -- It's not just a job, it's an obsession