GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ttfm.sh(1) FreeBSD General Commands Manual ttfm.sh(1)

ttfm.sh - TrueType Font Manager

ttfm.sh command [ module ] [ font1 font2 ... ]

TTFM (TrueType Font Manager) consists of a TrueType font parser, and several modules that help managing TrueType fonts in various applications. Users can then use ttfm.sh (which will call those modules), to execute simple commands like font adding, removing, list, and so on.

command can be one of the followings:

Add fonts. The command accepts multiple fonts specied by the font's filename.
Initial selected modules. (Deprecated)
List installed fonts. No font arguments are needed.
List all avaiable modules. No font arguments are needed.
Remove installed fonts. Accepts multiple fonts.
Set the following font as the default font(Ming). Only one font argument is allowed.
Set the following font as default font(Kai). Only one font argument is allowed.

Currently these modules are available:

For AbiWord 0.7.12 and above. It depends on modules of both XFree86 and Ghostscript.
For ChiTeX, a TeX/LaTeX environment that can handle both BIG5 and GB encodings. Broken in FreeBSD.
For Aladdin Ghostscript 6.50. It can manage TrueType fonts and CID fonts(limited functionalities). Ghostscript must be patched to use TrueType fonts. See the following for more details.
Generate pk (packed raster) and tfm (TeX font metrics) files from TrueType fonts. These files can then be used in the CJK LaTeX environment. Broken under FreeBSD.
For XFree86's freetype backend, which is Xfsft in 3.x, and freetype module in 4.x.
For XFree86 3.3.x X-TrueType server. Written in TCL.
For XFree86 X-TrueType server, both 3.3.x or 4.x. Bourne shell script.

List all available modules in system.
Install all TrueType fonts in <path>, using xttfm module.
Set <path>/good_ming.ttf as xttfm module's default font(Ming).
Set <path>/good_kai.ttf as xttfm module's default font(Kai).
List all fonts installed by xttfm.ttfm module.
Remove bkai00mp.ttf(from the above list), installed by xttfm.ttfm.
Install /somewhere/bsmi00lp.ttf in Ghostscript, using ghostscript6 module.
Remove bsmi00lp.ttf, using ghostscript6 module.
Remove ArphicMingB5-Regular(which is equivalent to bsmi00lp.ttf above, obtained from "ttfm.sh --list ghostscript6"), using ghostscript6 module.
Install Windows 98's MINGLIU.TTC high quality font for AbiWord. This has the chain effect that MINGLIU.TTC will be also installed by xttfm and ghostscript6 modules, since a fully CJK functioning AbiWord needs both XFree86 and Ghostscript support. See the following for additional details.
Set MINGLIU.TTC as AbiWord's default font(Ming). This also has the chain effect that MINGLIU.TTC will be also set as xttfm and ghostscript6 modules' default fonts(Ming). See the following for additional details.
Install <path>/*.ttf, using every module. However, usages like "--add *.ttf" and "--remove *.ttf" are reserved only for backward compatibility. Since the dependency between modules will become more complex, whether "--add *.ttf" has chain effects totally depends on individual applications. It's strongly suggested that users specify which module to invoke explicitly, rather than doing a global installation/removal.

It's straightforward to make a new TTFM module. A TTFM module can be in any format, ie. it could be a shell or Perl or Python script, a C program, or even an Assembly if you like. Any program is a TTFM module as long as it accepts the following arguments:

--add [font ...]
--list
--remove [font ...]
--setdefault [font]
--setdefault_kai [font]

The meanings should be clear by their names, and the above "DESCRIPTION" section. The ttfm.sh will call a TTFM module in only one of these forms.

Note that there's no font format involved in this requirement, meaning that a TTFM module can have nothing to do with TrueType at all. For example, an independent VFGhostscript's bdf manager can be used as a TTFM module, once it accepts the above arguments(maybe as it own arguments' subset).

If a TTFM module tries to get information from a TrueType font, then ttfinfo(1) should be used. Although it lacks some advanced features, like CJK entries, it's far better than most programs.

http://www.hj.webprovider.com/develope/index.html, and
http://www.abisource.com/mailinglists/abiword-dev/00/October/0398.html
http://partners.adobe.com/asn/developer/technotes.html.
This page contains many excellent technical notes, specifications, supplements, and errata for Adobe's font technology.
http://www.math.ncu.edu.tw/yih/
http://ceiba.cc.ntu.edu.tw/tmwu/index.htm
http://www.aihara.co.jp/~taiji/tops/
http://TypeHack.aial.hiroshima-u.ac.jp/VFlib/
http://X-TT.dsl.gr.jp
http://www.netlab.is.tsukuba.ac.jp/~yokota/izumi/Xatm/xatm_e.html
See xc/programs/Xserver/hw/xfree86/doc/README.fonts.
It contains comprehensive instructions on how to install TrueType fonts for X-TT & X-FreeType backend, and CID fonts under XFree86 4.x.

About modules(in the order of precedence):

For VFlib + Ghostscript 5.5.
It means making a FreeBSD port of ChiTeX, and modifying existing CJK port. It's also possible that ChiTeX, CJK, cwTeX can all co-exist.
For cwTeX, a BIG5 TeX/LaTeX system of ultra-high quality.
Handling CID fonts under XFree86, which is Xatm in 3.3.x, built-in in 4.x.
With more and more modules, dependencies between modules will become a problem. For example, which actions have chain effects (like AbiWord) should be clarified.

About ttfinfo(also in the order of precedence):

It supports more font types like OpenType or CID.
Although TrueType fonts can have CJK fontname entries, like in MS Windows, TTFM cannot use this feature currently. Since many individual CJK TrueType fonts have bogus English vendor and face entries(like -misc-unknown- in XLFD), users can be easily confused with which font to use, if proper CJK font names are not given.
It's simple to write a X client to have basic functions, since all the dirty work are done by ttfm.sh or modules. However, it would not be trivial to manage CJK fonts simultaneously in a single session.
When TTFM supports FreeType 2, support for CID fonts would be trivial. However, all CID fonts available now as free are released by Adobe, so this functionality probably won't be widely tested.
Currently, TTFM sets both Ming and Kai regardless the encoding of TrueType fonts. But usually each country has its own face name convention, eg. "Ming" in Taiwan, "Song" in China, "Mincho" in Japan, and "Munhwa" in Korea. TTFM's "--setdefault" and "--setdefault_kai" should be localized to suite users' needs.

TODOs or BUGs that are not related to TTFM.

Many applications can only handle modern Unicode-encoded TrueType fonts, eg. XFree86 (both 3.x and 4.x) has problems with certain types of BIG5 TTFs, and Alladdin Ghostscript 6 can't read them at all. Sometimes the problem may be just a wrong encoding ID, and others are due to the lack of BIG5 tables.

The same may happen to other legacy fonts, but the author has only BIG5 TTFs at hand. If users encounter the same problem, either switch to newer TTFs, or contact the author would be fine.

XLFD (X Logical Font Description) is the standard X Window uses to identify fonts, eg. -adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1. The standard says that each field allows ISO 8859-1 characters(except the '-' character, which is used as field separater), so it's possible to use CJK characters in the face field, just like in MS Windows. But it seems that X protocol converts byte orders, maybe using the htonl() family, when handling fonts. It will be a great challenge to modify X libraries to support multibyte XLFD.

Main program, ttf2pk.ttfm, and xttfm-tcl.ttfm.
ttfm.sh, chitex.ttfm, ttf2pk.ttfm, and xttfm-tcl.ttfm. CLE maintainer.
abiword.ttfm, ghostscript6.ttfm, xfreetype.ttfm, and xttfm.ttfm. FreeBSD maintainer.

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.