MCS UI Plugin: Font Selection

Ric fhj52ads at yahoo.com
Thu Aug 14 11:07:46 CEST 2003


Hey botsie:

Why don't you do the easy way first? : add the MS core fonts directory
to the XftConfig file and see if that resolves the problem.  It should.
You can do that by editing the  XftConfig  file in /etc/X11/...  or by
adding it to ~/.xftconfig  (probably the better way since $HOME tends
to stay around). 
E.g., to add Sun fonts for the SDK, I just placed 

# Sun SDK fonts
dir "/usr/java/j2sdk1.4.2/jre/lib/fonts"

into the $HOME/.xftconfig  file for my user.  
Since _all_ the dirs in /etc/X11/XftConfig are scanned by every ap, you
might want to keep it simple and adjust  ~/.xftconfig  on a per user
basis to keep the scan time adjustable per user.


Otherwise, you might want to see if  fslsfonts (or RPM's chkfontpath)
lists all the correct paths.  However, AFAIK, that is only for the X
server or if you have  xfs  running.  GTK+2 cannot depend upon that
and, I think,  uses XFT which has the fonts directories defined via  
/etc/X11/XftConfig  or wherever XftConfig might be on your system(e.g.,
~/.xftconfig).

You might also check the outline fonts' directories to make sure that a
fonts.dir and/or a fonts.scale are in each.  Here, fonts.dir is 
created by using mkfontdir;  fonts.scale is needed for it to create the
fonts.dir for scalable fonts...

Of course, if you are using fontconfig, it is supposed to do that(find
fonts) for you.  
I have terrible experiences with fontconfig and do not use it.  I also
do not run  xfs  as I do not serve-up fonts to external clients.  Yet,
all the fonts are listed/used correctly ...


As to your question about how  xfs  fits into it, the X server can get
fonts by reading the directories directly or a font server such as  xfs
 can deliver fonts to it, or _both_.   GTK2 uses the library Xft. Xft
has a XftPattern et al to describe the fonts Xft uses & :. GTK can use.
 XftFontSet  contains a list of XftPatterns that, simply put,  is the
list of fonts.  If Xft is not configured correctly ( XftFontSet is
incomplete ) then even though the X sever has a/the fonts list, GTK
will not be able to use them.  As long as Xft is configured correctly
and X has the correct font.dirs, GTK will work correctly without  xfs 
or  fontconfig  (or with them).  Of course that(for Xft) is only for TT
and T1 ("outline") fonts.  That's how I understand it at this time. 
(and hopefully, that's all I will ever have to understand, :), ...
Linux & fonts, grrrr...)

Unfortunately, Keith Packard, the Xft "author", is now an 'ex-member'
of the XFree86 Project so I do not know what is going to happen on the
Xft front...

Hope that is not all as clear as mud. :)

--- Biju Chacko <biju_chacko at vsnl.net> wrote:
> On Wed, 13 Aug 2003 18:51:57 +0200, Olivier Fourdan wrote:
> 
> > This is really your install, not xfce4. The MCS UI plugin simply
> calls
> > the stock font dialog from gtk2.
> > 
> > Depending on your install, you may want to check that your fonts
> are
> > listed in /etc/fonts/fonts.conf if you have fontconfig installed or
> > /etc/X11/XftConfig if your install still use the old Xft 1.x font
> system
> > that shipped with stock XFree86 4.2.0
> 
> Hmmm ... this is very confusing.
> 
> Where does XFS come into this? I have all my font directories listed
> in /etc/X11/fs/config.
> 
> Doesn't gtk2 see all the fonts served by the font server that X is
> querying?
> 
> -- b
> 
> -- 
>
-----------------------------------------------------------------------
> Biju 'botsie' Chacko                        biju_chacko at vsnl dot



=====
Have A Great Day!

Ric
***
Mondale knew this was gonna be a bad day when he called 
Dial-a-Prayer and the taped message answered him by name.
 -- Bob Hope, 1903-2003

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the Xfce4-dev mailing list