OTF2BDF(1)
β¨ OTF2BDF β the OpenType to BDF glow-up π
ok so bestie, this is a General Commands Manual page, section 1, and the whole vibe is: you have a cute lil OpenType font and you want it to be a BDF font instead. Say less. π¦
πΈ NAME πΈ
otf2bdf β OpenType to BDF font converter. that's it, that's the whole job description. no cap.
π SYNOPSIS π
otf2bdf [options] font.{ttf,otf}
yeah so it's otf2bdf, then some options if you're feeling spicy, then the actual font file which is either a .ttf or an .otf. iconic behaviour honestly. π
π DESCRIPTION π
otf2bdf will convert an OpenType font to a BDF font using the Freetype2 renderer (http://www.freetype.org).
like... it takes your fancy-schmancy OpenType file and turns it into a good old-fashioned bitmap distribution format font. the Freetype2 renderer is the one doing the heavy lifting here, we're just the messenger. π§
β¨ OPTIONS β¨
so otf2bdf accepts the following command line arguments, and there are a lot of them, so buckle up bestie:
-vβ print warning messages when the font is converted. like, it'll actually tell you when stuff is giving weird.-nβ disable glyph hinting. bye bye hinting π-p nβ set the desired point size. (peep the default value by running the program with the-hoption, iykyk.)-etβ display a list of the platforms and encodings available in the font. the default values, compiled into the program, are a platform of 3 (Microsoft) and encoding of 1 (ISO10646). if the font does not contain the default platform and encoding, the fallback will be the Apple ISO10646 encoding. so like, plan B but make it Apple π-r nβ set both the horizontal and the vertical resolution (again, see the default by running the program with the-hoption). the minimum is 10dpi and the maximum is 1200dpi. don't try to go outside that range, it's not gonna slay.-rh nβ set the horizontal resolution (default value? you guessed it,-hoption). minimum 10dpi, maximum 1200dpi.-rv nβ set the vertical resolution (same deal,-hoption for the default). minimum 10dpi, maximum 1200dpi.-o outfileβ sets the output filename. and ngl, the default output is to stdout, so if you forget this, the font is just gonna... appear in your terminal. main character energy but messy. π-pid idβ set the platform id for selecting the character map (default value: run the program with the-hoption).-eid idβ set the encoding id for selecting the character map (default value: run the program with the-hoption).-c cβ set the character spacing. this should be one ofPfor proportional,Mfor monospace, orCfor character cell. by default, the spacing of a font will be automatically determined to be eitherMorPaccording to values provided in the font. so it'll vibe-check itself first.-f nameβ set the foundry name used in the XLFD name. the default value isFreetype.-t nameβ set the typeface name used in the XLFD name. by default, otf2bdf will attempt to get a name from the font first and then it will use the name supplied with this command line option, and if all else fails, it will use the nameUnknown. so it's font first, your input second,Unknownas the last resort. it's giving backup plan, backup plan, backup plan. π-w nameβ set the weight name used in the XLFD name. if this value is not supplied, the default value is assumed to beMedium. some common values for this areThin,Delicate,ExtraLight,Light,Normal,Medium,SemiCondensed,Condensed,SemiBold,Bold,Heavy,ExtraBold, andExtraHeavy. pick your fighter. π₯-s nameβ set the slant name used in the XLFD name. if this value is not supplied, the default value is assumed to beR, for Roman. some common values for this areRfor Roman,Ifor Italic,Ofor Oblique,RIfor Reverse Italic, andROfor Reverse Oblique. slay, slant, same thing.-k nameβ set the width name used in the XLFD name. the default isNormal.-d nameβ set the additional style name used in the XLFD name. the default is an empty string. so like... nothing. silence. π€«-u charβ set the character used to replace the dashes/spaces in a font name. the default is the space character.-l subsetβ define a list of character codes which will be used to select a subset of glyphs from the font. the syntax of the subset string is the same as the syntax for selecting subsets in X11 XLFD font names. example time:
% otf2bdf -l '60 70 80_90' font.ttf -o font.bdf
the command above will only generate the glyphs for codes 60, 70, and 80 through 90 inclusive. glyphs that are not in the subset are not generated. we're being selective, periodt. βοΈ
-m mapfileβ specifies a mapping file which will reencode the BDF font when it is generated. any glyphs with codes that do not have a mapping will not be generated. brutal but fair.
the remapping file should begin with two lines, one which starts with REGISTRY followed by the character set registry and one which starts with ENCODING followed by the encoding. an example from the iso8859.2 file:
REGISTRY ISO8859
ENCODING 2
the remapping data should be two columns of hexadecimal numbers, separated by spaces or tabs. the first column should have the code which should be used in the BDF font. the second column should be the hexadecimal code of the glyph in the "cmap" table otf2bdf is using. an example mapping file is provided which will map fonts from Unicode (the default "cmap" table) to ISO8859-2.
Unicode is not the only option. if you choose another platform and encoding ID on the command line, then the remapping is assumed to map from the chosen platform and encoding to some other character set. so many possibilities, we love options. π
ok real talk bestie β when a glyph doesn't have a mapping in your mapfile, or isn't in your subset, it is simply not generated. no glyph, no drama, no fallback. plan accordingly. π
π«Ά SEE ALSO π«Ά
gbdfed(1),xfed(1),bdftopcf(1),bdftosnf(1),bdfresize(1)- Glyph Bitmap Distribution Format (BDF) Specification, Application Note 5005, Adobe System Inc, 1993
- X Logical Font Description Conventions, X Consortium
go read the lore, it's giving required reading. π
π ACKNOWLEDGMENTS π
shoutout to the whole squad, fr fr:
- The FreeType project for providing the renderer!
- Robert Wilhelm <robert@physiol.med.tu-muenchen.de> for pointing out a crucial problem with the pre-1.0 code.
- Lho Li-Da <ollie@ms1.hinet.net> for problem reports.
- Adrian Havill <havill@threeweb.ad.jp> for unintentionally pointing out a missing feature.
- Richard Verhoeven <rcb5@win.tue.nl> for problem reports and patches.
- Choi Jun Ho <junker@jazz.snu.ac.kr> whose implementation provided some nice new features.
- Pavel Kankovsky <peak@kerberos.troja.mff.cuni.cz> for providing some critical metrics fixes and other improvements.
- Matti Koskinen <mjkoskin@sci.fi> for pointing out a problem.
- Eugene Bobin <gene@ftim.ustu.ru> for mapping tables.
- Oleg N. Yakovlev <yashka@optima.dnepropetrovsk.ua> for pointing out a problem.
- Bertrand Petit <elrond@phoe.frmug.org> for additional functionality.
- Roman Czyborra <czyborra@cs.tu-berlin.de> for pointing out some problems.
- Mike Blazer <blazer@mail.nevalink.ru> for some Window's compilation advice.
- Solofo Ramangalahy <solofo@mpi-sb.mpg.de> for contributing some mapping tables.
- Antoine Leca <Antoine.Leca@renault.fr> for mapping table suggestions.
- Patrick Hagglund <patrik.hagglund@bredband.net> for Freetype2 patches.
- Christos Tountas <cvt@sprynet.com> for finding problems.
- Nelson Beebe <beebe@math.utah.edu> for finding problems.
- "Prophet of the Way" <afu@wta.att.ne.jp> for finding a problem.
every single one of y'all ate. no crumbs left. π
π AUTHOR π
Mark Leisher Computing Research Lab New Mexico State University Email: mleisher@crl.nmsu.edu
this page is Freetype Version 2, dated 22 May 2008, and it lives in section 1 of the manual as OTF2BDF(1). that's the whole vibe check. now go convert some fonts bestie, you got this π¦πβ¨
π¦ where this page comes from
- alpine 3.24: otf2bdf-doc 3.1_p1-r0 Β· MIT
- debian bookworm: otf2bdf 3.1-4.1
- debian trixie: otf2bdf 3.1-4.1+b1
- fedora 43: otf2bdf 3.1-31.fc43 Β· MIT
- fedora 44: otf2bdf 3.1-32.fc44 Β· MIT
- nixos 26.05: otf2bdf 3.1
- nixpkgs unstable: otf2bdf 3.1
- ubuntu jammy: otf2bdf 3.1-4.1
- ubuntu noble: otf2bdf 3.1-4.1
- ubuntu resolute: otf2bdf 3.1-5 Β· MIT
- ubuntu stonking: otf2bdf 3.1-5 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms