discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System fonts


From: Kazunobu Kuriyama
Subject: Re: System fonts
Date: Fri, 27 Aug 2004 00:06:12 +0900
User-agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1

Yen-Ju Chen wrote:

> <snip>
> I am aware of fontconfig, but I don't know how to use it with GNUstep.
> GNUstep has its own defaults system.
> Once GNUstep get one font, this font is used everywhere. No font
> substitute.
> And as far as I know, it seems that only CJK need a second font.
> I never see a choice of second font for any other language in most of
> applications.
> But maybe it is due to my lack of knowledge. 

I'd like you to try fontconfig. It at least works for Japanese. Since I
myself
don't know everything about fontconfig, I can't guarantee that it also
works for
you. Nonetheless, let me show you some hints for the usage.

First, you need to edit a configuration file for fontconfig, fonts.conf,
to let it
know which fonts you want to use and where they are.

Attached is the patch which was made against the original
/etc/X11/fonts/fonts.conf
of XFree86 4.3.0 (it also works for 4.4.0). Comparing it with yours (I mean,
the original fonts.conf), you might find how to modify it for you. In
particular,
the 'mincho' (the Ming Dynasty, you got it?) and 'gothic' sections would
be helpful.

Note that, since I don't know both fontconfig and your environment
completely,
it is highly possible that some part of the patch doesn't make sense at all.
So don't follow it blindly, please.

If you do 'man fontconfig', you'll find near the end of the man page
the description of the format of fonts.conf (Basically, it's an XML file).

Secondly, you definitely need to read the man pages of the ft-cache and
ft-list
utilitiy programs to notify fontconfig of changes you made. (Sorry for
ambiguity.
But I can't remember what I did with them.)

I wish this would help you.

Regards,
- Kazunobu Kuriyama
--- fonts.conf.orig     2004-08-26 23:53:18.000000000 +0900
+++ fonts.conf  2004-08-26 23:53:37.000000000 +0900
@@ -18,20 +18,28 @@
        Keith Packard
 -->
 
-<!-- Font directory list configured on Wed Mar  3 01:49:50 JST 2004 -->
+<!-- Font directory list -->
 
-       <dir>/usr/X11R6/lib/X11/fonts</dir>
+       <dir>/usr/X11R6/lib/X11/fonts/MS</dir>
+       <dir>/usr/X11R6/lib/X11/fonts/TTF</dir>
+       <dir>/usr/X11R6/lib/X11/fonts/TrueType</dir>
+       <dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
+       <dir>/usr/X11R6/lib/X11/fonts/freefont</dir>
+       <dir>/usr/share/fonts/default/cmpsfont/pfb</dir>
+       <dir>/usr/share/fonts/default/amspsfnt/pfb</dir>
        <dir>~/.fonts</dir>
 
-<!--
-  Enable sub-pixel rendering
+<!-- 
+    Use rgb sub-pixel ordering to improve glyph appearance on LCD screens.
+    Changes affection rendering, but not matching should always use
+    target="font".
+-->
        <match target="font">
                <test qual="all" name="rgba">
                        <const>unknown</const>
                </test>
                <edit name="rgba" mode="assign"><const>rgb</const></edit>
        </match>
--->
 
 <!--
   Accept deprecated 'mono' alias, replacing it with 'monospace'
@@ -78,6 +86,8 @@
   Serif faces
  -->
        <alias>
+               <family>MS Gothic</family>
+               <family>MS Mincho</family>
                <family>Times</family>
                <family>Times New Roman</family>
                <family>Nimbus Roman No9 L</family>
@@ -92,6 +102,8 @@
   Sans-serif faces
  -->
        <alias>
+               <family>MS PGothic</family>
+               <family>MS PMincho</family>
                <family>Helvetica</family>
                <family>Arial</family>
                <family>Verdana</family>
@@ -108,6 +120,8 @@
   Monospace faces
  -->
        <alias>
+               <family>MS Gothic</family>
+               <family>MS Mincho</family>
                <family>Courier</family>
                <family>Courier New</family>
                <family>Andale Mono</family>
@@ -117,6 +131,26 @@
                <default><family>monospace</family></default>
        </alias>
 <!--
+  gothic
+-->
+       <alias>
+               <family>MS Gothic</family>
+               <family>MS PGothic</family>
+               <family>MS PR Gothic</family>
+               <family>MS\-PRGothic</family>
+               <family>MS UI Gothic</family>
+               <default><family>gothic</family></default>
+       </alias>
+<!--
+    mincho
+-->
+
+       <alias>
+               <family>MS Mincho</family>
+               <family>MS PMincho</family>
+               <default><family>mincho</family></default>
+       </alias>
+<!--
   If the font still has no generic name, add sans-serif
  -->
        <match target="pattern">
@@ -170,6 +204,7 @@
        <alias>
                <family>serif</family>
                <prefer>
+                       <family>MS Gothic</family>
                        <family>Times New Roman</family>
                        <family>Nimbus Roman No9 L</family>
                        <family>Luxi Serif</family>
@@ -183,6 +218,7 @@
        <alias>
                <family>sans-serif</family>
                <prefer>
+                       <family>MS PGothic</family>
                        <family>Verdana</family>
                        <family>Nimbus Sans L</family>
                        <family>Luxi Sans</family>
@@ -198,6 +234,7 @@
        <alias>
                <family>monospace</family>
                <prefer>
+                       <family>MS Gothic</family>
                        <family>Andale Mono</family>
                        <family>Courier New</family>
                        <family>Luxi Mono</family>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]