[comp.windows.x] Is it possible to find out font height and width without XLoadQueryFont

emuleomo@paul.rutgers.edu (Emuleomo) (06/27/91)

I have a form that uses a bold font and another that uses a medium font.

I need to find out the Width and Height of a "typical" character (in PIXELS)
in the font for each form.
I specified the font for each form in my XAPPLRESDIR resource file.

I think there should be a way in the Intrinsics to find out the xteristics
of a font without resorting to Xlib!
Any ideas?

Pls E-mail.

Thanx

--Emuleomo O.O. (emuleomo@yes.rutgers.edu)
-- 
Remember! It doesn't matter if you win or lose, as long as you win!

mouse@thunder.mcrcim.mcgill.edu (der Mouse) (06/28/91)

In article <Jun.27.08.32.21.1991.16139@paul.rutgers.edu>, emuleomo@paul.rutgers.edu (Emuleomo) writes:

> I need to find out the Width and Height of a "typical" character (in
> PIXELS) in the font for each form.

First, define what you mean by `a "typical" character'!

More seriously, I think you're probably trying to solve the wrong
problem here.  Regardless of the width of a typical character (whatever
that means), someday you'll have to display something unusually wide or
unusually narrow, so you have to be prepared for both extremes anyway.
(And note that `unusually narrow' can be rather extreme; consider a
font that contains both Arabic and Latin characters, for example.)

That said, if you still believe you want such a thing, try to define
precisely what it is you want, and then perhaps a solution will be
easier to find.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu