| 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 |
Hi,
I am developing a DecWindows application for a customer and need some
help with fonts. I want to determine the length of a text string to be
displayed in a Simple Text Widget. To do this I am using the Xlib function
"XTextWidth" which requires a font pointer as a parameter. This is a pointer
to a font data structure. The documentation I have says this pointer can be
obtained by calling the Xlib function "XQueryFont". This however requires the
font identification as a parameter. This font_id can be obtained from the
Graphics Context data values struct so the documentation tells me. However
when I use this value "XQueryFont" returns zero which causes "XTextWidth" to
acvio. When I looked at the font id in the graphics context values data structure
it appears to contain a nonsensical value, which also appears as the value
for other fields in the same data structure.
Can anyone help me with this problem?
P.S. A list of available fonts is supposed to be in a file named
DECW$FONT.100DPI according to "Guide to Xlib Programming", I don't
appear to have this file on my system. Can you tell me where I can
find the names of the fonts available for use.
Thanks in anticipation,
Pete Francis
U.K. Manufactuting Applications Centre.
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 2121.1 | Answer to your second question | STAR::VATNE | Peter Vatne, VMS Development | Wed Jan 24 1990 13:26 | 10 |
The reference in section 8.2 of the VMS DECwindows Guide to Xlib Programming is wrong. The DEC-supplied font files are located in the directory: SYS$SYSROOT:[SYSFONT.DECW.75DPI] or SYS$SYSROOT:[SYSFONT.DECW.100DPI] However, this will only give you the file names of the font files, not the name of the font itself. To find the names of the fonts available for use, see Appendix D of the VMS DECwindows Guide to Xlib Programming. | |||||