TTF2UFM_CONVERT(1)
π NAME π
ttf2ufm_convert β the convenience font conversion script. yes bestie, she's the whole vibe. this page lives in section 1 of the TTF2UFM Font Converter manual. π«Ά
π¦ SYNOPSIS π¦
ttf2ufm_convert [config-file]
πΈ DESCRIPTION πΈ
okay so Convert is the master conversion script that ships with ttf2ufm β main character energy, fr. when it gets installed into a public directory it goes by the name ttf2ufm_convert instead, purely so it doesn't collide with the names of the other programs. π
if you don't hand it a configuration file as an argument, then it just uses the file convert.cfg sitting in the current directory. that file is where all the configuration variables live. the distribution gives you a sample called convert.cfg.sample β please copy it over to convert.cfg, actually look inside it, and change the configuration variables to match your setup. the more stable config variables, like the path names of the scripts and the encoding files, live in convert itself, and they get updated automatically when you install ttf2ufm. β¨
drop all the TTF fonts you want to convert into some directory. (this can literally just be the directory that already holds all your Windows fonts on a mounted FAT filesystem, no biggie.) but if you've got fonts in different source encodings, then you need to put the fonts for each encoding into its own separate directory. up to 10 source directories are supported. and if β in a rather unlikely case β you have more source directories than that, just do two separate runs of the converter, converting up to 10 directories at a time. π
the variables in the configuration file are:
SRCDIRSβ the list of directories (with absolute paths) that hold your TTF fonts. each line contains at least 3 fields: the name of the directory, the language of the fonts inside it (if you have fonts for different languages you have to put them into separate directories), and the encoding of the fonts. again, if you have some of the TTF typefaces in one encoding and some in another (say, CP-1251 and KOI-8), you have to put them into separate source directories. some lines may contain 4 fields β then the fourth field is the name of the external map used to convert the Unicode fonts into the encoding you want. that map gets used instead of the built-in map for that specified language.*8*an interesting thing (iykyk): some languages have more than one widely used character encoding. for example, the widely used encodings for Russian are IBM CP-866 (MS-DOS and Unix), KOI-8 (Unix and VAX, also the standard Internet encoding), and IBM CP-1251 (MS Windows). that's why the means are provided to generate the converted fonts in more than one encoding. see the fileencodings/READMEfor the details about the encoding tables. actually, if you plan to use these fonts with Netscape Navigator, better use the aliasescp-866instead ofibm-866, andwindows-1251instead ofibm-1251, because that's what Netscape wants. π
DSTDIRβ the directory for the resulting Type1 fonts. be careful! β οΈ this directory gets completely wiped out before conversion, so do not use any already existing directory for this purpose. like, don't. seriously.DSTENC{language}β the list of encodings in which the destination fonts will be generated for each language. every font of that language will be generated in each of the specified encodings. if you don't want any translation at all, just specify bothSRCENCandDSTENCasiso8859-1(or, if you want any other encoding that's specified in thefonts.dir, copy the description of8859-1under a new name and use that new name forSRCENCandDSTENC).FOUNDRYβ the foundry name to be used in thefonts.dirfile. it's set tofromttfso it avoids name conflicts with any existing font, for sure. but heads up: this foundry name is not registered in the X11 standards, and if you want full standard compliance, or you have a font server that enforces such compliance, usemiscinstead. π
the next few parameters control the general behavior of the converter. their default values are set to something reasonable, so don't stress. π§
CORRECTWIDTHβ if the value is set toYESthen use the converter option-w; otherwise don't use it. see the description of this option in the README file.REMOVET1Aβ if the value is set toYESthen, after conversion, remove the un-encoded.t1afont files and the intermediate.xpfafont metric files.INSTALLFONTMAPβ a Ghostscript parameter. if the value is set toYESthen install the entries for the new fonts right into the mainFontmapfile. otherwise just leave the fileFontmap.ttfsitting in the Ghostscript configuration directory.HINTSUBSTβ if the value is set toYESuse the option-H; otherwise don't use it. this option enables the hint substitution technique. if you have not installed the X11 patch described above, use this option with great caution. π see the further description of this option in the README file.ENFORCEISOβ if the value is set toYESthen disguise the resulting fonts as fonts in the ISOLatin1 encoding. historically this was necessary because of the way the installer scripts created the X11 font configuration files. it is not necessary any more for this purpose. but if you plan to use these fonts with some other application that expects ISOLatin1 encoding, then you'd better enable this option. πALLGLYPHSβ if the value is set toYESthen include all the glyphs from the source fonts in the resulting fonts, even if those glyphs are inaccessible. if it's set toNOthen include only the glyphs that have codes assigned to them. glyphs without codes can't be used directly. but some clever programs β such as the Type 1 library from XFree86 3.9 and higher β can change the encoding on the fly and use another set of glyphs. if you have not installed the X11 patch described above, use this option with great caution. see the further description of the option-ain the README file.GENUIDβ if the value is set toYESthen use the option-uAof the converter to generate UniqueIDs for the converted fonts. the standard X11 Type 1 library does not use this ID, so it may only be necessary for other applications. the script is clever enough to generate a different UniqueID for the same font converted to multiple encodings. also, after conversion it checks all the fonts generated during the session for duplicated UniqueIDs and shows you those. still, this does not guarantee that these UniqueIDs won't overlap with some other fonts. the UniqueIDs are generated as hash values from the font names, so it is guaranteed that if theconvertscript runs multiple times it'll generate the same UniqueIDs during each run. see the further description of this option in the README file. π₯GENUIDβ π ok bestie yes it really is written asGENUIDa second time in here, i don't make the rules. if the value is set toYESthen create the.pfbfiles, otherwise the.pfafiles. the.pfbfiles are more compact but they contain binary data, so you may run into some troubles when transferring them through the network.
the following parameters are used to locate the other scripts and configuration files. by default the scripts do a little bit of guessing for them: they search in the ttf2ufm installation directory if ttf2ufm was installed, or otherwise they suppose that you're running convert with scripts as a subdirectory of the current directory. π
ENCDIRβ directory containing the descriptions of encodingsMAPDIRβ directory containing the external map files
besides that, a few parameters are built into the convert script itself. you probably won't need to change them:
T1ASM,TTF2UFM,TRANS,T1FDIR,FORCEISOβ paths to the other script
there are also a few parameters controlling the installation of fonts for Ghostscript. please look at their description in the Ghostscript section of the documentation, or in the ttf2ufm_x2gs(1) manual page, before running convert. if these parameters are set, convert will call the x2gs script automatically to install the newly converted fonts in Ghostscript. π«Ά
after you've created the configuration file, run the convert script. look at the result and at the log file in DSTDIR.
then add the directory with the newly converted fonts to the configuration of the X server or the font server. for most systems this step is super straightforward. for HP-UX it's rather tricky and poorly documented, so the file FONTS.hpux gives a short description.
if you don't have root user privileges, you can still configure your own private font server β just use some non-standard port number. (see FONTS.hpux for an example, except that you won't need all the HP-related stuff on any other system.) β
π FILES π
TTF2UFM_SHAREDIR/scripts/convert.cfg.sampleTTF2UFM_SHAREDIR/scripts/*TTF2UFM_SHAREDIR/READMETTF2UFM_SHAREDIR/FONTSTTF2UFM_SHAREDIR/*TTF2UFM_BINDIR/ttf2ufm
π SEE ALSO π
π BUGS π
Known problems π
- okay so first catch, bestie: the X11 Type 1 font library has a rather low limit on font size. That means fonts with more complicated outlines and enabled hint substitution might not fit into that limit. Same vibe for fonts with very complicated outlines or very many glyphs (especially fonts with over 256 glyphs). So if you're planning to use these fonts with X11, you'll need to excercise caution with these options. Some vendors, like HP, ship the Type 1 implementation licensed from Adobe, and that one should have no such problem.
But bestie, there's a solution even for generic X11. A patch in the subdirectory app/X11 fixes this problem plus some other minor problems. The description lives in app/X11/README.
Fixing the X11 font library means you've gotta get the X11 sources. I can recommend the ftp sites of the XFree86 project ftp://ftp.xfree86.org or of the Open Group ftp://ftp.x.org. This patch was made on the sources of XFree86, so applying it to the XFree86 distribution may go better. After you get the sources, make sure you can compile them. Then apply the patch as described. Make sure it was applied properly. Compile the sources again (actually, you only need the fonts library, the fonts server, and possibly the X server). It would be prudent now to save your old font library, font server and, possibly, X server. Then install the new recently compiled versions of these files. Of course, if you know someone who already compiled these files for the same OS as yours, you can just copy the binary fles from him.
Alas, building the X11 system from the source code is not the easiest thing in the world, and if you have no experience it can be quite difficult. In this case just avoid the aforementioned features or check each converted font to make sure it works properly.
- HP-UX tea, no cap: The Type1 font library from the standard X11 distribution does not work on HP-UX (at least, up to 10.01). The font server supplied with HP-UX up to 10.01 is also broken. Starting from HP-UX 10.20 (I don't know about 10.10) they supply a proprietary font library, and the converted fonts work fine with it, provided that they are configured properly (see the file
FONTS.hpux). - the
fonts.scaledrama: Thefonts.scalefiles created by the older versions of thettf2ufminstallation program (up to release 3.1) have conflicted with the language definitions of theXfsftfont server and parts of it included into XFree86. To overcome this incompatibility the never versions creats (typo and all, bestie) thefonts.scalefile describing all the fonts as belonging to theadobe-fontspecificencoding and thefonts.aliasfile with the proper names. The drawback of this solution is thatxlsfontsgives the list of twice more fonts. But as a side effect the optionENFORCEISOinconvert.cfgis not required for X11 any more. - Eastern multi-plane fonts? The conversion script has no support for Eastern multi-plane fonts. Contribution of such a support would be welcome.
And that's the whole tea, bestie. This page is from version 3.4.4, dated December 31, 2003, and it's the TTF2UFM_CONVERT(1) man page. slay π
β¨
π¦ where this page comes from
- debian trixie: ttf2ufm 3.4.4~r2+gbp-2 Β· BSD-3-Clause
- ubuntu questing: ttf2ufm 3.4.4~r2+gbp-2
- ubuntu resolute: ttf2ufm 3.4.4~r2+gbp-2build1 Β· BSD-3-Clause
- ubuntu stonking: ttf2ufm 3.4.4~r2+gbp-2build1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms