nanogui: Font usage/setup


Previous by date: 11 Jan 2006 00:43:48 +0000 Re: TIMERS & VTSWITCH, Greg Haerr
Next by date: 11 Jan 2006 00:43:48 +0000 Re: Support for clicks on an edit box (label) and multi-line edit box (label) in Microwindows, Greg Haerr
Previous in thread: 11 Jan 2006 00:43:48 +0000 Re: Font usage/setup, Martin Kajdas
Next in thread: 11 Jan 2006 00:43:48 +0000 Re: Font usage/setup, Martin Kajdas

Subject: Re: [nanogui] Font usage/setup
From: "Greg Haerr" ####@####.####
Date: 11 Jan 2006 00:43:48 +0000
Message-Id: <0bfd01c61647$5287fa10$0300a8c0@RDP>

> The nano-X server (actually nxlib in LoadFont.c) searches for:
'-adobe-helvetica-medium-r-normal--12-0-0-0-p-0-iso8859-1'
which my application requires and the truetype font available is described
as:
'-adobe-helvetica-medium-r-normal--0-0-0-0-p-0-iso8859-1'

> They do not match and the server does not find the font correctly.
The only difference is in the font size (the app wants size 12).
However, this being the truetype font, does not specify size (equals to 0).

Looks like the second line above should be changed to:
'-adobe-helvetica-medium-r-normal--*-0-0-0-p-0-iso8859-1'.
The _nxFindX11Font() should match the pattern here, and
at least get the font.  However, code will have to be written to
substitute the requested font size into the GrCreateFont().

A quick thought suggests the way to do this would be:
1. Change the pattern matcher to remember a *-matched field.
2. If the text size matched was originally '0', substitute
the passed value ('12'), instead in GrCreateFont().

It appears we've never supported truetype fonts in NXLIB.
Actually, I think the behaviour changed when I changed
the default height param of GrCreateFont() to be 0,
rather than a hard-coded 12 that used to be there.  Thus,
non-truetype started working properly, and truetype fails,
because we never parsed the requested size (always used 12
instead).

Regards,

Greg



Previous by date: 11 Jan 2006 00:43:48 +0000 Re: TIMERS & VTSWITCH, Greg Haerr
Next by date: 11 Jan 2006 00:43:48 +0000 Re: Support for clicks on an edit box (label) and multi-line edit box (label) in Microwindows, Greg Haerr
Previous in thread: 11 Jan 2006 00:43:48 +0000 Re: Font usage/setup, Martin Kajdas
Next in thread: 11 Jan 2006 00:43:48 +0000 Re: Font usage/setup, Martin Kajdas


Powered by ezmlm-browse 0.20.