ピアス エリック
Under 2.4.2.1 of M. Fabian's 'suse-cjk Support' HOW-TO, the following: ttmkfdir > fonts.scale works just fine with my *.ttf fonts, but none of the *.ttc fonts show up in the 'fonts.scale' file. All my *.ttc fonts are Japanese, so I figured some manual editing might be in order (like my other Japanese *.ttf needed). But at least with the Japanese *.ttf, 'ttmkfdir' gave me a few entries to work off of (in 'fonts.scale'). Not the case with *.ttc. There's not a sign of any of them (hence they don't work in GIMP, etc.).
You can get a few initial entries to refine with manual editing after copying the *.ttc files to *.ttf. ttmkfdir seems to ignore the file ending *.ttc. This is probably easy to fix, but as ttmkfdir doesn't output anything for the face numbers > 0 in these files and omits some encodings, manual editing of the created fonts.scale files is necessary anyway (.ttc means TrueType-Collection, i.e. one .ttc file may contain several TrueType fonts, all but the first are ignored by ttmkfdir). Just make a temporary copy with the ending *.ttf, run ttmkfdir, delete the temporary copy and replace '.ttf' with '.ttc' in the output of ttmkfdir. Also I recommend to make the file names lowercase only mv MSGOTHIC.TTC msgothic.ttc mv MSMINCHO.TTC msmincho.ttc because ttf2tfm seems to be unable to deal with uppercase filenames, i.e. uppercase filenames will cause a problem when you try to use these fonts with CJK-LaTeX. For X11 the case in the fontnames doesn't matter. To find out which faces are contained in the .ttc files, copy the .ttc files to /usr/X11R6/lib/X11/fonts/truetype, check that this directory is listed in /usr/X11R6/lib/X11/XftConfig dir "/usr/X11R6/lib/X11/fonts/truetype" and run /usr/X11R6/bin/xftcache. Then have a look into the newly created /usr/X11R6/lib/X11/fonts/truetype/XftCache file and you will find: "msgothic.ttc" 0 "MS Gothic:style=Regular:slant=0:weight=100:encoding=apple-roman,iso10646-1,iso8859-1,glyphs-fontspecific:core=False:index=0:outline=True:scalable=True" "msgothic.ttc" 1 "MS PGothic:style=Regular:slant=0:weight=100:encoding=apple-roman,iso10646-1,iso8859-1,glyphs-fontspecific:core=False:index=1:outline=True:scalable=True" "msgothic.ttc" 2 "MS UI Gothic:style=Regular:slant=0:weight=100:encoding=apple-roman,iso10646-1,iso8859-1,glyphs-fontspecific:core=False:index=2:outline=True:scalable=True" "msmincho.ttc" 0 "MS Mincho:style=Regular:slant=0:weight=100:encoding=apple-roman,iso10646-1,iso8859-1,glyphs-fontspecific:core=False:index=0:outline=True:scalable=True" "msmincho.ttc" 1 "MS PMincho:style=Regular:slant=0:weight=100:encoding=apple-roman,iso10646-1,iso8859-1,glyphs-fontspecific:core=False:index=1:outline=True:scalable=True" I.e. the file 'msmincho.ttc' contains the faces 'MS Mincho' and 'MS PMincho', which have the face index '0' and '1' respectively. 'MS Mincho' has monospaced kanji and kana, 'MS PMincho' has proportional kana, i.e. the 'P' probably means 'proportional'. The file 'msgothic.ttc' also contains a monospaced font and a 'MS PGothic' font with proportional kana and a third font 'MS UI Gothic'. 'MS UI Gothic' has proportional kana as well, which are a little bit narrower than the kana in 'MS PGothic'. The kanji seem to be identical in the monospaced and proportional versions. To select a face with index > 0 create entries like this :1:msmincho.ttc -Ricoh-MS PMincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1983-0 for fonts.scale, i.e. :1: selects the face with index 1. ':1:' is the syntax for the 'freetype' module of XFree86. To use the freetype module you must load it in the module section of your /etc/X11/XF86Config: Section "Module" Load "type1" Load "speedo" Load "extmod" Load "freetype" # Load "xtt" <- alternative TrueType font render module Load "v4l" EndSection This is already the default in SuSE Linux. There is another TrueType render module called 'xtt', if you want to use this, just load it instead of the 'freetype' module. Unfortunately the syntax to select a face with index > 0 is different when using 'xtt': fn=1:msmincho.ttc -Ricoh-MS PMincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1983-0 recent versions of 'xtt' also understand ':1:', i.e. it is better to use ':1:' instead of 'fn=1:' because this is compatible to both modules. 'xtt' has some additional features not supported 'freetype', for example it is possible to create 'fake' italic and bold fonts by slanting and overstriking: ds=y:ai=0.15:msmincho.ttc -Ricoh-MS Mincho-bold-i-normal--0-0-0-0-c-0-jisx0208.1983-0 * ai=REAL_NUMBER -- This option specifies how the glyph is slanted. (ai : Automatic Italic) * ds=[yn] -- Set this option y if you want double striking of the face. In the earlier version of X-TT, this effect was called "Pseudo Bold", but because this name is inappropriate, it has been changed. The old option "ab" can still be used, but I recommend to use "ds". (ds : Double Strike) If you don't want to use these extra features of 'xtt', it doesn't matter much whether you use 'freetype' or 'xtt', just stay with 'freetype' then. If you write special options of 'xtt' in fonts.scale, 'freetype' won't be able to handle these entries.
Has anyone had any luck getting *.ttc (particulary Asian) fonts to work in GIMP?
an example fonts.scale file for the msmincho.ttc and msgothic.ttc is attached. You can just copy this and the fonts to /usr/X11R6/lib/X11/fonts/truetype, run SuSEconfig --module fonts xset fp rehash and it will work in Gimp. But, Attention: Please make sure you to check the license of the fonts and use them only if you are allowed to do so.
On a side note, my Japanese *.ttc work fine in KDE (but isn't that a different font renderer? - Xft?)
Yes. Xft doesn't care for fonts.dir/fonts.scale files. It reads the
*.ttf/*.ttc files directly. To save some time by not having to open
all these files all the time, the above mentioned 'xftcache' program
writes information about the available fonts into the XftCache files,
which come handy if you want to find out which faces are contained in a
font.
--
Mike Fabian