On Tue, 2003-11-18 at 12:16, Jason Stubbs wrote:
> On Tuesday 18 November 2003 10:46, Zarick Lau wrote:
> > On Tue, 2003-11-18 at 06:16, Jason Stubbs wrote:
> > > * What is the recommended way to set up fonts?
> >
> > It depends on what kind of application you are using.
> > For me, I use GTK+2 based apps most of the time.
> > All I need to dig is the fonts.conf
> > It is because pango (which is the main library for text services for
> > GTK2) will use Xft + fontconfig for reading fonts and rendering text,
> > and fonts.conf is the config file for fontconfig.
> > <I believe qt3 do the same too>
> 
> Hmm, my /etc/fonts/local.conf currently contains:
> <?xml version="1.0"?>
> <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
> <fontconfig>
>         <dir>/usr/share/fonts/mplus</dir>
>         <dir>/usr/local/share/fonts</dir>
> </fontconfig>
> 
> However, arialuni.ttf, which is in /usr/local/share/fonts, didn't show up in 
> kde at all until I fell back to adding everything to /etc/X11/XF86Config. In 
> terms of modules, XF86Config contains:
> Section "Module"
>         Load  "dbe"
>         SubSection "extmod"
>                 Option      "omit xfree86-dga"
>         EndSubSection
>         Load  "type1"
>         Load  "freetype"
>         Load  "glx"
>         Load  "record"
>         Load  "xtrap"
>         Load  "speedo"
> EndSection

Well, that's seem that fontconfig is not used in your setup.
What version of qt you're using?

Hmm.. you may want to first check that whether fontconfig has correctly
find the fonts or not by 'fc-list'
It is a tools from fontconfig pkg and used to list out all fonts found
by fc-list (analog to xlsfonts in the xfont world.)

Also, I remember that sometimes ago (about half an year), one version of
fontconfig is a bit of broken in terms of regenerate font cache.
In that case, you can use something like
$ find ${fondDir} -name "fonts.cache*" | xargs rm -f
$ fc-cache

> 
> > For those X baseds apps, the way is mkfontdir, if xf86 is using freetype
> > module (here freetype module refers to the X font server module).
> > And as I know freetype is the default module in xf86 ebuild
> 
> Would fontconfig still be used (once I can get it to work) if I list all fonts 
> in XF86Config as well for any of those non-Xft+ apps?

Most likely not, as I know, apps using client side fonts (Xft +
fontconfig) is different to use xfonts (Xlib's fontset) at the same
time.

I can however, like pango, using different engine, it have multiple 
rendering engine (wrapper libs) for different platform, but it will not
use both at the same time.

Similarly, newer version of xterm does the same thing, you can specify
it to use client side fonts directly (by -fa -fs), OR you can use
traditional way to use fonts, but not both.

> 
> > However, you should know or heard about xtt, that module has make some
> > good progress as well, and it provide good perf. and features for CJK.
> > However, I don't have more in depth info on this, you can goto
> > xfree-fonts if no luck here :)
> 
> I'll have a look into that. I've been aware of it but haven't yet taken the 
> time to find out what it is/does.
> 
> > > * How do I specify which fonts to pull characters from if they're not
> > > available in the selected font?
> >
> > For gtk2, you can customize it in fonts.conf.
> 
> You mean /etc/fonts/fonts.conf or /etc/fonts/local.conf, considering 
> fonts.conf contains:
> <include ignore_missing="yes">local.conf</include>

the 'local.conf' mechanism is just used to seperate per-site
configuration from distribution wide config.

For example, if inside fontconfig ebuild, we want it to have a very nice
tuned config for gentoo users, we can put the config inside
/etc/fonts/fonts.conf,

After installing fontconfig, and I'd like to do some customization, I
can add the config to 'local.conf' or ~/.fonts.conf (per site / per
user)

So both fonts.conf / local.conf / .fonts.conf can be used, depending on
the context.

Also, note that the precedence of those 'matching and edit'

> 
> If that is the file you do mean, then it should apply to qt3 as well, right?

I've no idea that to what extent qt3 is using fontconfig for their font
listing and matching jobs.

btw, I would like to have a look in here !

> 
> To the point, though. I've read that a substitute font can be set up to be 
> used when a selected font is missing a character range. However, what I'm 
> finding is that many fonts are missing characters from the range. This brings 
> causes text that "looks like this" to become " ook   ike thi ". Can this be 
> configured with fontconfig as well?
> 
> > > This seems to change depending on what fonts are installed. I would find
> > > it intuitive if it used the ugly fonts that come with X until something
> > > else is specified, but that doesn't seem to be the case.
> > >
> > > * How can I specify which fonts should be alpha-blended and when?
> >
> > I think you mean anti-alias, right?
> 
> Yep, anti-aliasing. I had just woken up and was quite awake yet. ;-)
> 

somethings before, I use something like
>>>
<match target="font">
   <test name="VeraMoit.ttf"></test>
   <edit name="antialias"><bool>true</bool></edit>
</match
<<<
to explicitly testing the AA for each fonts

I don't know whether I can help ur needs though !

> > It should be abled by default, anyway, check out the gconf key
> >   "/desktop/gnome/font_rendering"
> > or have a look in qtconfig
> 
> Yep, qt is configured to anti-alias fonts.

In GTK 2.0, we need to use 'GDK_USE_XFT=1' to enable using xft for
drawing text, does qt using similar ways?

> 
> > Also, you may need to check fonts.conf, the match and edit stuff can
> > disabled aa for certain, if needed.
> > thought, it shouldn't be the default case.
> 
> I have read that too. But seeing I apparantly can't get fontconfig to work, I 
> haven't experimented with the appropriate options yet.

Yes, I always find those option is hardly to experiment, seems some
options is used by ft2 and some is xft, and I don't know exactly 
how those options is passed through those libs. :)

Right, for me to experience qt font stuff, can you recommend me some qt
based apps which doens't have lots of dep, as my machine has no kde
setup. I hope I can find out an qt apps but no need to built those kde
libs. (as I have a PIII 650 laptop on hand..)

Cheers,
Zarick


--
[EMAIL PROTECTED] mailing list

Reply via email to