[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

3317.0. "<< XServer Font Loading Questions >>" by BEATLE::COMMO (&quot;I&#039;ll find no bug before its time!&quot;) Thu Sep 06 1990 23:10

How do the DEC Xservers handle multiple XLOADQUERY calls for the same font
from within a given client?

If you have previously loaded, say 12 point Courier, and another part of
the client loads it again (but may have wanted another face or size)
does the Xserver say "Oh, I've got that already, I'll just pass back a
new reference to it and bump the reference count"; or does it really go
out and load in another copy of that font?

The question is asked because my application uses different font sizes
(typically Courier) in different modules of the application.  To keep the
initial prototyping of the applicaiton simple each module does its own
XLOADQUERY and keeps it own font reference.  Several of the module presently
use the same font. 

Good sense says that if the loading a font drains a lot of server resources
then my application will need to to it's own maintenance of things like
reusing font resources.  On the other hand I'm lazy!

- norm
T.RTitleUserPersonal
Name
DateLines
3317.1You ask for it, you got it...LEOVAX::TREGGIARIFri Sep 07 1990 13:0315
> If you have previously loaded, say 12 point Courier, and another part of
> the client loads it again (but may have wanted another face or size)
> does the Xserver say "Oh, I've got that already, I'll just pass back a
> new reference to it and bump the reference count"; or does it really go
> out and load in another copy of that font?

If you ask for a different face or size, you MUST get a new font loaded.  The
information is not the same (per character metrics, etc...).

But, if you ask for *exactly* the same font twice, you will get it twice.
And they ain't cheap.  It's ~3K bytes of data that get fetched over the wire
and stored in your virtual memory.

Leo
3317.2<< When the right answer's the wrong answer! >>WONDER::COMMOI&#039;ll find no bug before its time!Fri Sep 07 1990 16:176
Thanks again Leo.  That's what I wanted to know.  Your input is certainly
impetus to "do the right" thing.  Looks like I'll need a font module
now.  Oh well... 

Cheers,
- norm
3317.3DECWIN::FISHERLocutus: Fact or Fraud?Mon Sep 10 1990 13:499
Just to make sure this is all clear, I believe Leo was answering from the
toolkit perspective.  I'm assuming he means that a new font info structure
etc is allocated on the client side.

On the server, however, we know that you have asked for the same font and
will just set up another pointer from the font id to the same data in the
server.  We have enough info to do that; Leo does not.

Burns
3317.4My answer was from the Xlib perspectiveLEOVAX::TREGGIARIMon Sep 10 1990 18:1814
> Just to make sure this is all clear, I believe Leo was answering from the
> toolkit perspective.

Actually, I was answering from the Xlib perspective.

> I'm assuming he means that a new font info structure
> etc is allocated on the client side.

Yes.

Toolkit applications generally use the "string-to-font" converters which
ARE smart enough to only load a font once.

Leo