wml::des::gfont(3)
๐ wml::des::gfont โ Graphical Font Tag ๐
okay bestie, sit down, hydrate, because this one is genuinely iconic. this is the manual page for wml::des::gfont from the EN Tools crew, and it's about a tag that makes your text look expensive.
โจ NAME โจ
wml::des::gfont โ the Graphical Font Tag, aka the glow-up your typography has been waiting for ๐
๐ธ SYNOPSIS ๐ธ
#use wml::des::gfont
<gfont [attributes]>One Single Line Of Text</gfont>
note the "One Single Line Of Text" thing, bestie. that's not a suggestion. that's the whole vibe. โ
๐ฆ DESCRIPTION ๐ฆ
so this is a nice interface to the gFONT program, which lives at http://www.engelschall.com/sw/gfont/. it gives you a <gfont> tag you can use kinda like the standard HTML <font> tag โ except instead of your webbrowser rendering it live, the text gets rendered offline through gfont into a GIF image. no cap.
and the perks?? the perks are everything:
- All TeX-available fonts can be used. โ you get to use any TeX-available font instead of the tiny sad set that typical browsers support. and these fonts actually look how you want them to. like, Helvetica is Helvetica with
<gfont>, whereas with the<font>tag it could be Arial or some totally different substituted font. the disrespect. ๐ - Fonts with much greater size can be used. โ with
<gfont>you can crank thesizeattribute all the way up to+9, which is literally 200pt in size, while the HTML font tag usually taps out at+4. so yeah,<gfont>is the one for big headlines. main character energy fr. ๐ - You can create banners with colored backgrounds. โ the standard
<font>tag can't do a different background color in HTML 3.2.<gfont>can. because it renders directly into a GIF image, and that background doesn't have to be transparent. slay. ๐
and here's the little smart-girl detail: when an image is generated, a text file containing the command that was run gets created too, named after the image file with a .cmd suffix. so when WML gets re-run, it searches for that file and only executes gFONT if the command line has changed. efficiency queen. โจ
๐ ATTRIBUTES ๐
base=filenameโ normally the images created for a source filepage.wmlare namedpage.gfontXXX.gif, whereXXXis a number starting at000. if you use abase=fooattribute, the files come out asfoo.gfontXXX.gif. and you can go full send and use a complete filename with a directory prefix โ likebase=../../common/fooโ and then the GIFs get created as../../common/foo.gfontXXX.gif. use this to send your images to a specific directory. bonus:base=""gives you images that are so-called hidden Unix files, aka dot-files. sneaky. ๐
and for max flexibility: when no base is specified but the variable GFONT_BASE is defined (usually from inside a .wmlrc file via -DGFONT_BASE~path/to/gfont/dir/base), that gets used instead. use it to redirect your created images into a particular directory.
you can also use the variable IMAGE_BASE, which defines in a single line all the base names for images generated by WML.
file=filenameโ use this to explicitly set the output filename for the GIF image. usually you don't touch this, because you don't need to know the actual filename. but sometimes it's handy to set it explicitly. lowkey niche, highkey useful.notagโ forces<gfont>to expand to nothing, i.e. no resulting<img>tag. the image itself is still generated though. combined with thefileattribute above, you can generate images into particular files and then use them at other positions โ for instance inside<rollover>tags (seewml::des::rollover(3)). ๐color=#rrggbbโ sets the font (foreground) color. default is#000000, which is black.bgcolor=#rrggbbโ sets the image background color. default is no color at all, i.e. a transparent background.face=fontnameโ sets the type of the used font, where fontname is actually any TeX-available font, or a name alias from the Fontmap file of gFONT. seegfont(1)for more details. default isTimes.size=numberโ sets the relative size of the font, similar to the HTML 3.2<font>tag. default is0. here's the correspondence to pt-sizes:
size: -2 -1 0 1 2 3 4 5 6 7 8 9
pt: 12 16 20 32 40 50 60 80 100 120 140 160
this leads to nearly the same font sizes for <font> and <gfont> tags on typical browser setups. math checks out. ๐งฎ
align=locationโ this directly corresponds to thealignattribute of the<img>tag.cropโ indicates that the image should be cropped, i.e. the edges containing only the background color should get removed. โ๏ธadjust=specโ passes spec through to the-roption of gFONT, which adjusts the size of the final image. use this to expand the image and/or align it.:img:ATTR=STRโ theATTR=STRpairs get passed along to the<img>HTML tag.
๐ EXAMPLE ๐
<gfont face="HelveticaBold" size=+6 color="#3333cc">
A sample Headerline
</gfont>
look at that. a whole headerline. gorgeous. โญ
๐ AUTHOR ๐
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
๐ซถ REQUIRES ๐ซถ
- Internal:
P1,P2,P3,Image::Size(P5M) - External:
gfont(PATH)
๐ฅ SEE ALSO ๐ฅ
HTML <font> tag, gfont(1), http://www.engelschall.com/sw/gfont/
and that's the whole page, bestie!! this beauty came out of EN Tools, dated 2020-11-29, and it's page wml::des::gfont(3) in the manual. go forth and make your text look absolutely unreal ๐โจ๐
๐ฆ where this page comes from
- debian bookworm: wml 2.32.0~ds1-1 ยท GPL-2.0-or-later
- debian trixie: wml 2.32.0~ds1-1 ยท GPL-2.0-or-later
- ubuntu jammy: wml 2.32.0~ds1-1 ยท GPL-2.0-or-later
- ubuntu noble: wml 2.32.0~ds1-1 ยท GPL-2.0-or-later
- ubuntu questing: wml 2.32.0~ds1-1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms