[comp.sys.amiga] newcon, setfont questions

tlm@pur-phy (Timothy Lee Meisenheimer) (04/06/89)

	Someone mentioned that it was easy to use the conman handler for
NewCon: by just editing the mountlist file. Well I must be doing something wrong
because I did ( I used the example posted too!) and it doesn't work! If I say
"newshell Con:00/200/200/SHELL" it works just fine (I'm running Conman) but
just "newshell" comes back with an error saying it couldn't open a window. If
I use the original handler for NewCon: everything works great. But I don't
need to drag 2 handlers for windows around, anyone with similar experience?

	I've been using Xoper (great job!!!) to look at font usage and I've
noticed something strange. I use courier 13 (font) all the time so I have
a "setfont courier 13" in my startup file. When I take a look at the font usage
usiong Xoper it shows the two rom fonts and the courier font but the courier
font is listed THREE times, at seperate ram locations!! Is setfont loading
it in three times?? I don't need this waste of memory? Anyone know what is
happening? If I run setfont on another font and then back to courier 13
it shows three additional entries for each font, even if it was already in
mmemory!

thanks for any help.

tlm.

mp1u+@andrew.cmu.edu (Michael Portuesi) (04/08/89)

tlm@pur-phy (Timothy Lee Meisenheimer) writes:

>         Someone mentioned that it was easy to use the conman handler
> for NewCon: by just editing the mountlist file. Well I must be doing
> something wrong because I did ( I used the example posted too!) and it
> doesn't work! If I say "newshell Con:00/200/200/SHELL" it works just
> fine (I'm running Conman) but just "newshell" comes back with an error
> saying it couldn't open a window. If I use the original handler for
> NewCon: everything works great. But I don't need to drag 2 handlers
> for windows around, anyone with similar experience?

Check the documentation that came with ConMan v1.3 -- it has the
complete instructions for how to use ConMan with AmigaShell.

Basically, what you do is delete Commodore's Mountlist entry for
NEWCON:.  You then place a new entry for NEWCON: in the mountlist that
uses L:Conman-Handler instead of the Commodore supplied handler.  The
docs for ConMan give you the exact stuff to place in your Mountlist;
I'm not at my Amiga right now so I don't have access to the
documentation.

After you do this, doing something like

NewShell "NEWCON:0/0/640/200/AmigaDOS Shell"

should bring up AmigaShell inside a ConMan window.

--
Michael Portuesi * Information Technology Center * Carnegie Mellon University
INET: mp1u+@andrew.cmu.edu * BITNET: mp1u+@andrew
UUCP: ...harvard!andrew.cmu.edu!mp1u+

"Some say that knowledge is something that you never have" -- K. Bush

daveh@cbmvax.UUCP (Dave Haynie) (04/11/89)

in article <2111@pur-phy>, tlm@pur-phy (Timothy Lee Meisenheimer) says:

> I use courier 13 (font) all the time so I have a "setfont courier 13" in my
> startup file. When I take a look at the font usage usiong Xoper it shows the
> two rom fonts and the courier font but the courier font is listed THREE 
> times, at seperate ram locations!! Is setfont loading it in three times?? 

I certainly hope not, at least if it's my SetFont V2.5 program in question.
SetFont just calls the system OpenDiskFont() routine to load the font.  And
I just checked; it only opens it once in the program.  Depending on where
the font is used, it may be left open.  And the OS will probably open it a
few more times.  But far as I know, the actual font image is only supposed
to be loaded once, no matter how many times it's actually opened.  SetFont 
V2.5 may be overcautious about closing old fonts when you select a new one,
but there's nothing I know if it could be doing to get multiple copies of
a font.

> tlm.
-- 
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

cmcmanis%pepper@Sun.COM (Chuck McManis) (04/12/89)

In article <2111@pur-phy>, (Timothy Lee Meisenheimer) writes:
> I use courier 13 (font) all the time ... Xoper ... shows the
> courier font ... listed THREE times...

In article <6561@cbmvax.UUCP> daveh@cbmvax.UUCP (Dave Haynie) remarks:
	[Essentially that he uses fonts correctly in SetFont 2.5 so
	 that shouldn't be the cause. ]

Here is a word of warning for folks that use fonts in their programs other
than the ROM fonts. How you open a font is _very_ important. You should
always use the sequence :

	tf = OpenFont(&font_i_want);
	if (! tf) {
		tf = OpenDiskFont(&font_i_want);
		if (! tf) {
			WarnTheUser("Can't get your font.");
			optional_exit();
		}
	}

Many programs simply call OpenDiskFont() first which does not check the
in memory font lists and instead does just what it's name implies, opens
the font from disk. This is arguably a bug, however since using it in the 
above manner will cause it to work correctly, if you are using non-ROM 
fonts you should note this behaviour.


--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.
"A most excellent barbarian ... Genghis Kahn!"

daveh@cbmvax.UUCP (Dave Haynie) (04/18/89)

in article <98492@sun.Eng.Sun.COM>, cmcmanis%pepper@Sun.COM (Chuck McManis) says:
> Summary: Keep for your notes file

> In article <2111@pur-phy>, (Timothy Lee Meisenheimer) writes:
>> I use courier 13 (font) all the time ... Xoper ... shows the
>> courier font ... listed THREE times...

> In article <6561@cbmvax.UUCP> daveh@cbmvax.UUCP (Dave Haynie) remarks:
> 	[Essentially that he uses fonts correctly in SetFont 2.5 so
> 	 that shouldn't be the cause. ]

> Many programs simply call OpenDiskFont() first which does not check the
> in memory font lists and instead does just what it's name implies, opens
> the font from disk. 

Whoops!  When I went to SetFont V2.5, I managed to reverse the opening
order.  So SetFont may actually account for one additional copy of a RAM
font each time it's run, it would appear.  By the time I finish typing
this, V2.6 could have finished compiling.  I can't account for the other
copies, I don't believe, but you'll certainly want the new version.  I
don't know how fast amiga.binaries is working these days -- anyone who
wants this new one send me mail and I'll mail you out one directly until
the posting comes through.

> --Chuck McManis
> "A most excellent barbarian ... Genghis Kahn!"

Thanks for making me look, Chuck.


-- 
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

page%rishathra@Sun.COM (Bob Page) (04/18/89)

daveh@cbmvax.UUCP (Dave Haynie) wrote:
>I don't know how fast amiga.binaries is working these days

Try it and see.

..bob
Bob Page    page@sun.com    sun!page    415/336-2745