Re: Freetype Font Path
- From: Lars Clausen <lrclause cs uiuc edu>
- To: dia-list gnome org
- Subject: Re: Freetype Font Path
- Date: 06 Mar 2002 22:03:14 -0600
On Thu, 7 Mar 2002, Robert Young wrote:
Lars Clausen wrote
On Thu, 7 Mar 2002, Robert Young wrote:
G'Day,
The recent --enable-freetype CVS build has been segfaulting
on me and I
have traced it down to two distinct problems:
<snip>
Secondly, XGetFontPath returns the string "unix:/7100" in
font_init_freetype() which is the XFS 'path'. It appears
that the current
code is unable to find any fonts on this path and as a
result there are
NULL pointers all over the place which eventually get
referenced when
font_getfont_with_style gets called. I looked at a couple of other
programs which used Freetype and couldn't find a consistent
method for
determining the path to the fonts (some seem to hard code
it as a last
resort).
Unopenable font paths are not a problem, they are simply skipped. The
problem appears if there are no local fonts. Are you getting all your
fonts from a server?
It appears that all fonts are obtained from the font server (which is the
same machine). The only path returned from XGetFontPath is "unix:/7100".
Locally there are heaps of fonts installed and the X font server is aware
of all of them - does X need to know about them as well (using xset
+fp=<path> for instance)??
Yes, you will need to tell X about them. To do freetype, we need to get
the actual font files, not just what X font servers give us. You should
add lines to your /etc/X11/XF86Config-4 to look something like this:
Section "Files"
FontPath "unix/:7100" # local font server
# if the local font server has problems, we can fall back on these
FontPath "/usr/lib/X11/fonts/misc"
FontPath "/usr/lib/X11/fonts/cyrillic"
FontPath "/usr/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/Type1"
FontPath "/usr/lib/X11/fonts/Speedo"
FontPath "/usr/lib/X11/fonts/100dpi"
FontPath "/usr/lib/X11/fonts/75dpi"
EndSection
(modified for you being on RedHat of course.) Yes, I know it sucks that we
can't use the X font server stuff, but it just doesn't give enough info.
I looked a tiny bit at Pango but couldn't find how it obtains it's font
paths as this would be good to copy. Some programs are already using
Pango, but it may be too bleeding edge.
We will eventually move to Pango. Not yet, though.
Any other ideas? If I get time I'll look into the message_error problem
further.
That would be rather interesting. Can you get any message_* to show?
-Lars
--
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| Hårdgrim of Numenor
"I do not agree with a word that you say, but I |----------------------------
will defend to the death your right to say it." | Where are we going, and
--Evelyn Beatrice Hall paraphrasing Voltaire | what's with the handbasket?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]