mdbFontEncoding(5)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– mdbFontEncoding(5) πŸ’–

okay bestie, pull up a chair, because we're talking about mdbFontEncoding β€” the section 5 page all about, you guessed it, font encodings ✨


🌸 NAME 🌸

mdbFontEncoding β€” Font Encoding. that's the whole vibe. the m17n library's whole thing for knowing which characters a font can actually, like, do. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: the m17n library pulls info about the encoding of every font from the m17n database, and it grabs it using the tags <font, encoding>. that data comes back as a plist, and the format is exactly this, no cap:

FONT-ENCODING ::= PER-FONT *

PER-FONT ::= '(' FONT-SPEC ENCODING [ REPERTORY ] ')'

FONT-SPEC ::=
    '(' [ FOUNDRY FAMILY
          [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
    REGISTRY ')'

ENCODING ::= SYMBOL

so FONT-SPEC is there to describe the properties of a font, periodt. FOUNDRY all the way through REGISTRY are symbols that line up with the #Mfoundry to #Mregistry properties of a font. if you wanna know what each property actually means, go look at m17nFont, she explains it all. πŸ‘‘

for example, this FONT-SPEC:

(nil alice0 lao iso8859-1)

should get applied to literally every font whose family name is 'alice0 lao' and whose registry is 'iso8859-1'. iconic.

now, ENCODING is a symbol that represents a charset. a font that matches the FONT-SPEC supports all the characters in that charset, and a character code gets mapped to the matching glyph code of the font through this charset. it's giving matchmaker, honestly. πŸ’–

REPERTORY is a symbol representing a charset, or it's 'nil'. if you just... don't include it? that's the same as specifying ENCODING as the REPERTORY. if it's not 'nil', then the charset spells out the repertory of the font β€” like, which characters she actually supports. otherwise, whether a specific character is supported or not is a question you gotta ask each font driver directly. no shortcuts. πŸ™ˆ

and for the so-called Unicode fonts (you know the ones, registry is 'iso10646-1'), it is recommended to specify 'nil' as REPERTORY, because those fonts usually only support a subset of Unicode characters. like, a subset. don't get it twisted. πŸ’€

Copyright (C) 2001 Information-technology Promotion Agency (IPA)

Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.


and that's the whole page, bestie 🫢 this was Version 1.8.4, dated Mon Sep 25 2023 β€” go forth and encode your fonts responsibly, mwah πŸ’‹πŸŒˆβ­

πŸ“¦ where this page comes from