TTF2PT1_CONVERT(1)
π NAME π
ttf2pt1_convert β the convenience font conversion script, from the TTF2PT1 Font Converter manual, section 1. Bestie, this is the one that does the whole thing for you π
β¨ SYNOPSIS β¨
ttf2pt1_convert [config-file]
π¦ DESCRIPTION π¦
Okay so <pink>ttf2pt1_convert</pink> is the master conversion script that ships with ttf2pt1. Not a side character. THE main character. π«Ά
If you don't pass a config file as an argument, it just goes ahead and uses "convert.cfg" in the current directory. That file is where all your configuration variables live. The distribution ships a sample called "convert.cfg.sample" β please copy it over to "convert.cfg", peek inside, and change the variables to match your life. The more stable variables β like the path names of the scripts and the encoding files β live inside "ttf2pt1_convert" itself, and they get automatically updated when you install ttf2pt1. So like, don't stress about those. β¨
Now, gather up all the TTF fonts you want to convert and drop them into some directory. It can literally just be the directory that already holds all your Windows fonts on a mounted FAT filesystem, no judgment. πΈ If your fonts are in different source encodings, put each encoding's fonts into its own separate directory. Up to 10 source directories are supported. And if you (in a rather unlikely case, ngl) have more than that, just do two separate runs of the converter, up to 10 directories at a time. Easy.
The variables in the configuration file are:
SRCDIRSβ the list of directories (with absolute paths) holding your TTF fonts. Each line contains at least 3 fields: the name of the directory, the language of the fonts in 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 that fourth field is the name of the external map to convert the Unicode fonts into the desirable encoding. This map is used instead of the built-in map for the specified language.*8*An interesting thing is that 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 I have provided the means to generate the converted fonts in more than one encoding. See the fileencodings/READMEfor details about the encoding tables. Actually, if you plan to use these fonts with Netscape Navigator, better use the aliasescp-866instead ofibm-866andwindows-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 don't use any already existing directory for this purpose. Like, fr fr, don't. πDSTENC{language}β the list of encodings in which the destination fonts will be generated for each language. Each font of that language will be generated in each of the specified encodings. If you don't want any translation, just specify bothSRCENCandDSTENCasiso8859-1(or if you want any other encoding specified in thefonts.dir, copy the description of8859-1with a new name and use this new name forSRCENCandDSTENC).FOUNDRYβ the foundry name to be used in thefonts.dirfile. I have set it tofromttfto avoid name conflicts with any existing font for sure. But this foundry name is not registered in X11 standards, and if you want to get the full standard compliance, or you have a font server that enforces such compliance, usemisc.
The next few parameters control the general behavior of the converter. Their default values are set to something reasonable. π§
CORRECTWIDTHβ if the value is set to"YES"then use the converter option-w, otherwise don't use it. See the description of this option in theREADMEfile.REMOVET1Aβ if the value is set to"YES"then after conversion remove the un-encoded.t1afont files and the intermediate.xpfafont metric files.INSTALLFONTMAPβ a Ghostscript parameter. If the value is set to"YES"then install the entries for the new fonts right into the mainFontmapfile. Otherwise just leave the fileFontmap.ttfin the Ghostscript configuration directory.HINTSUBSTβ if the value is set to"YES"use 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 further description of this option in theREADMEfile.ENFORCEISOβ if the value is set to"YES"then disguise the resulting fonts as the fonts in ISOLatin1 encoding. Historically this was neccessary due to the way the installer scripts created the X11 font configuration files. It is not neccessary any more for this purpose. But if you plan to use these fonts with some other application that expects ISOLatin1 encoding, then better enable this option.ALLGLYPHSβ if the value is set to"YES"then include all the glyphs from the source fonts into the resulting fonts, even if these glyphs are inaccessible. If it's set to"NO"then include only the glyphs which have codes assigned to them. The glyphs without codes can not 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 further description of the option-ain theREADMEfile.GENUIDβ if the value is set to"YES"then 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 neccessary for the 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 UniqueID and shows those. Still, this does not quarantee that these UniqueIDs won't overlap with some other fonts. The UniqueIDs are generated as hash values from the font names, so it's guaranteed that if the"ttf2pt1_convert"script runs multiple times it will generate the same UniqueIDs during each run. See further description of this option in theREADMEfile.GENUIDβ if the value is set to"YES"then create the.pfbfiles, otherwise the.pfafiles. The.pfbfiles are more compact but contain binary data, so you may experience some troubles when transferring them through the network.
π Not me pointing out that yes, the page really does list GENUID twice with two completely different meanings. That's what it says, so that's what I'm telling you. We don't make the rules, we just report them. π
The following parameters are used to locate the other scripts and configuration files. By default the scripts do a bit of guessing for them: they search in the ttf2pt1 installation directory if ttf2pt1 was installed, or otherwise suppose that you are running "ttf2pt1_convert" with "scripts" subdirectory being 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 "ttf2pt1_convert" script itself. You probably won't need to change them:
T1ASM,TTF2PT1,TRANS,T1FDIR,FORCEISOβ paths to the other script
Also there are 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 ttf2pt1_x2gs(1) manual page, before running "ttf2pt1_convert". If these parameters are set, "ttf2pt1_convert" will call the "x2gs" script automatically to install the newly converted fonts in Ghostscript. π
After creating the configuration file, run the "ttf2pt1_convert" script. Look at the result and the log file in DSTDIR. π₯
Then add the directory with the newly converted fonts to the configuration of your X server or font server. For most of the systems this step is very straightforward. For HP-UX it's rather tricky and poorly documented, so the file FONTS.hpux gives a short description. π
And if you don't have the privileges of the root user, you can still configure your private font server. Just use some non-standard port number (see FONTS.hpux for an example, exept that you won't need all the HP-related stuff on any other system).
π FILES π
/usr/share/doc/ttf2pt1-3.4.4/convert.cfg.sample/usr/share/ttf2pt1/scripts/*/usr/share/doc/ttf2pt1-3.4.4/README/usr/share/doc/ttf2pt1-3.4.4/FONTS/usr/share/ttf2pt1/*/usr/bin/ttf2pt1
β SEE ALSO β
π BUGS π
Known problems
- The
"fonts.scale"files created by the older versions of the"ttf2pt1"installation program (up to release 3.1) have conflicted with the language definitions of the"Xfsft"font server and parts of it included into XFree86. To overcome this incompatibility the newer versions create the"fonts.scale"file describing all the fonts as belonging to the"adobe-fontspecific"encoding and the"fonts.alias"file with the proper names. The drawback of this solution is that"xlsfonts"gives the list of twice more fonts. But as a side effect the option"ENFORCEISO"in"convert.cfg"is not required for X11 any more. - The conversion script has no support for Eastern multi-plane fonts. Contribution of such support would be welcome. π₯Ί (somebody come be the main character here, fr)
okay that's the whole page bestie, every flag, every variable, every path, no notes skipped π This was version 3.4.4, dated December 31, 2003 β the TTF2PT1 Font Converter, TTF2PT1_CONVERT(1). Slay, go convert some fonts. π
β¨
π¦ where this page comes from
- fedora 43: ttf2pt1 3.4.4-51.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-BSD-with-advertising
- fedora 44: ttf2pt1 3.4.4-52.fc44 Β· GPL-2.0-or-later AND LicenseRef-Callaway-BSD-with-advertising
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms