[comp.windows.x] font problems

carroll@s.cs.uiuc.edu (07/15/89)

Suppose a standard font directories has fonts A,B,C in it. I have an program
Q that I want to run that uses A,B and C. However, I don't like the way
certain characters in C look, so I make a copy and fix it. How do I now get
Q to use my copy of C and not the default? I played around with xset fp for
a long time and could never get it to work. Solutions attempted -
xset fp <my-C directory> : xlsfonts lists C as a font, but A and B are not
available.
xset +fp <my-C directory> : xlsfonts lists A,B,C, but requesting font C gives
the default one.
xset fp+ <my-C directory> : same as previous.

Before you ask, I used xset fp rehash after all of these, and did mkfontdir
(otherwise the first one wouldn't have worked). I assumed that the server
would find them in order, but apparently not.

System : X11R3 on SunOS4.0, Sun 3/60 color station.

Alan M. Carroll                "Oh goody, the Illudium Q-36 Explosive
carroll@s.cs.uiuc.edu           Space Modulator!"
CS Grad / U of Ill @ Urbana    ...{ucbvax,pur-ee,convex}!s.cs.uiuc.edu!carroll

rws@EXPO.LCS.MIT.EDU (07/17/89)

    xset +fp <my-C directory>

This should work, but you'll still get the old C if someone already has
the old C font open.  If you're sure no one has C open at the time you
reset the path, then something's wrong somewhere; submit a bug report.

ISSLCK@NUSVM.BITNET (Law Chee Keong) (11/08/89)

This is a question about fonts.

Given a variable of type XFontStruct *, I must determine what kind of font
it is, (eg. its name, whether it is italic, bold or normal, and also
its point size).

Now, I am able to tell its point size through the XFontProp stucture, but
how am I suppose to know its name (in char* format) and whether it is bold,
normal or italic?

A related question to this problem has to do with the Font id (fid) field in
the XFontStruct variable. My guess is that the font id is a unique identifier
to identify the font structure and *NOT* the type of the font right?

So let's say I do this:

XFontStruct *font1, *font2;

font1 = XLoadQueryFont( dpy, "Fixed" );
font2 = XLoadQueryFont( dpy, "Fixed" );

Okay, what I get is font1->fid != font2->fid.

In other words, although font1 and font2 are actually identical fonts, their
fid is different. What I need is some kind of mechanism  which tells me that
font1 and font2 are one and the same. (ie. they are the same font type)

Can anyone give me help and suggestions?? I am at a lost as to how to get
around this font identification problem.

-- C.K. Law
   Institute of Systems Science, NUS
   Singapore

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (11/08/89)

    Given a variable of type XFontStruct *, I must determine what kind of font
    it is, (eg. its name, whether it is italic, bold or normal, and also
    its point size).

If it's an XLFD-conforming font, then it will typically have properties you can
use to determine these kinds of things, but they aren't required.  If you have
the name used to open the font, and it's an XLFD-conforming name, then you can
parse it to obtain information.

    My guess is that the font id is a unique identifier
    to identify the font structure and *NOT* the type of the font right?

It identifies a server resource.  It does not identify font characteristics.

    What I need is some kind of mechanism  which tells me that
    font1 and font2 are one and the same.

There's no way to determine this, except by comparing the names used to
open the fonts (which in some sense it still not precise due to aliases),
or by doing some extremely horrible data comparisons you don't what to
think about.

hansen@madis.af.MIL (John Hansen) (08/16/90)

Help, Help!

I recently installed X11R4 on my Vaxstation 3200 with little or no problems...
However, I received yesterday a copy of ALIS by Applix for my machine and it
of course is not expecting X11R4, it's expecting DecWindows (and its 
corresponding "different" font format).  If I run the MIT R4 server I need snf
fonts and it I run the Dec R3 server I need "pcf" fonts.  ALIS comes with pcf
fonts (as expected) so unless I'm mistaken, my new MIT R4 server won't like
these ALIS fonts.  Am I right or am I right?  My question is:  Is there any
way I could convert the pcf fonts directly into snf fonts without passing go
and collecting 200 dollars?  In other words, Does anyone know of a program
that would eat a pcf font and spit out the same font in snf format?  Or perhaps
I could try der Mouse's getbdf program which is supposed to load a font and
create the bdf file from it.  Alas, I would have to go through a number of 
gyrations to resetup the Dec R3 server to load the ALIS pcf fonts.  And I'm 
not even sure if ALIS would consider that legal.  I can't imagine that 
writing a pcftosnf converter program would be all that difficult, would it?
Probably beyond me, but someone from DEC could surely perform the deed.  Are
there any other suggestions for a solution to my dilemma?  I could always
abandon my efforts to run R4 but I really would rather not take that course.
Any and all help is greatly appreciated.  Thanks in advance. Hope someone
can help me.

John Hansen
madis!hansen@lognet2.af.mil

ricks@EE.MsState.Edu (Rick Schumeyer) (09/19/90)

I'm having problems converting a bdf font to snf.  If I xfd the font
on a black&white sparcstation, it look fine.  But on a color station,
several of the characters are incorrect.  Any suggestions?

BTW, I'm running X11R4 with SUN OS4.1.

Rick Schumeyer
ricks@ee.msstate.edu
Drawer EE, Mississippi State, MS, 39762.	(601)325-3660