XFontStruct

XFontStruct

Post by Dag Henriksso » Wed, 08 Apr 1998 04:00:00



Hi!
Does anybody now how to convert a font file to a C-file containing
structs?

What I want is the  XFontStruct, the XCharStruct and the CharData
arrays.

Thanks for your help!

/ Dag Henriksson

 
 
 

XFontStruct

Post by Craig Knudse » Mon, 13 Apr 1998 04:00:00


Dag,

I don't think there's a way to do that with standard X functions.  There
are various font conversion programs out there.

Also, I wrote an image library that will allow you read in X BDF fonts
and use them to write to an image.  (It's best used for non-GUI programs
such as CGIs.)  Anyway, feel free to downlaod the code and examine the
BDF parsing code:

http://www.radix.net/~cknudsen/Ilib/

Craig


> Hi!
> Does anybody now how to convert a font file to a C-file containing
> structs?

> What I want is the  XFontStruct, the XCharStruct and the CharData
> arrays.

> Thanks for your help!

> / Dag Henriksson

--
                 ------------------------------------
"Uh, so, uh, anything you can do to, uh, to help, would be... very...
helpful..."

 
 
 

1. XFontStruct

I've got a trouble compiling Hp Interface Architect runtime library :
all goes fine under Aix 3.1 but after upgrading to 3.2 I cannot find
declaration of XmFontList structure ( found in previous version of X11 in
/usr/unclude/Xm/Xm.h ).
I'd like to know if this difference depends on different version of Motif
( Motif 1.0 vs Motif 1.1) or if exists a patch to correct the problem.
Code fragment follows :
XmFontList      *xdata;
 .
 .
 .
font_struct = (*xdata)->font;

The compiler's command line is :
cc -O   -D_PTY_DRIVER   -DRUNTIME -DMOTIF_WIDGETS -DSAFE_MALLOC  -I../in
clude  -I/usr/include -I/usr/include/X11 -I/usr/include/sys
-I/usr/X11/include/Xm -I/usr/X11/include/   -c utype.c

The error found is :

"utype.c", line 3625.19: 1506-122 (S) Expecting pointer to struct or union.

Thanks in advance for the help ..

2. initial console will not open