3 ms·
Using different fonts. A font is just[0] a table that maps numbers to pictures. A typical font will map a number 65 to a picture of what we know as letter 'A'
by TeMPOraL 6y ago
Using different fonts.
A font is just[0] a table that maps numbers to pictures. A typical font will map a number 65 to a picture of what we know as letter 'A' in Latin alphabet. But there's nothing preventing you from making a font that will contain, at index 65, a picture of a dog. Or a "hand washing" symbol. And this is what people did - both to support non-English alphabets in the era where "printable character" meant "7 bits", and to support mixing graphics with text (if you add that missing bit to make a full byte, you get 128 more codes to play with).
Ultimately, screens and printers don't understand letters - they understand arrays of color values (or, occasionally, colors attached to parameters of a curve). Fonts are the intermediary, and you can draw anything with text if you supply the right font. The problem is though, if you had a custom mapping of characters to pictures, you had to ship it with your text, and make sure users know how to configure their software to use your specific font for your text.
Unicode exists to allow every number describing a character to have a fixed, standardized meaning, so that you can send text around independently of the fonts. Instead of fighting for the same 256 codes, there are now over a million possible codes, and fonts declare which code ranges they know how to draw. As a result, you don't have to worry about mixing alphabets and graphics in text anymore - worst that can happen is that something will get rendered as a placeholder. But it won't get rendered as a wrong symbol.
--
[0] - Well, strongly simplifying. In reality, the "picture" can be anything from a bitmap, a set of bitmaps, a vector image, or executable code; the mapping part can also be executable code. A prime example of "code is data" :). Simple devices like thermal printers might accept only a trivial byte-to-bitmap mapping (aka. "bitmap fonts"). More complex ones will work with modern fonts, which are essentially programs that interpret text and produce instructions to draw it. Pushed to extreme, you get things like a videogame inside a font[1], or a font that automatically translates startup marketing copy into plain English[2].
[1] - https://www.coderelay.io/fontemon.html https://www.coderelay.io/fontemon.html
[2] - https://www.sansbullshitsans.com/ https://www.sansbullshitsans.com/