Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between character set and font in operating system? [closed]

I am wondering that is there some difference between character set and fonts in operating system? . I know character set maps set of characters to their integer value but when fonts comes in to the scene I get vague feeling.. . I wonder how they are related ?

like image 800
HolyKiller Avatar asked Dec 03 '25 17:12

HolyKiller


1 Answers

A character set is a mapping from unsigned integers to abstract characters. For example, in the Ascii character set, the number 103 (decimal; 67 in hex) is mapped to the Latin small letter g. At the logical level, a character set need not have anything to do with computers (though the concept has obvious practical relevance in information technology)

A font, in the modern sense of the word, is computer code for rendering (displaying) characters in a particular shape, as specific glyphs.

Internally, a font uses glyph indexes but also index numbers based on a character set. When a font is used to render the letter g, it is internally represented by its number in a character set, and this number is used to find out the glyph(s) for it in the font. That is, the character number is mapped to a glyph number. (If the character set of the text is different from the character set used in the coding of the font, an additional conversion between character sets needs to be performed before this.)

This is often simplified by describing a font as an array of glyphs, indexed by character numbers: the index, say 103, is used to pick up the 103rd virtual box, containing a glyph (for the character g). Although useful to get a basic idea, it’s really an oversimplification. In many fonts, there are two or more glyphs for the letter g (such as a one-loop form and a double-loop form, or a normal form an a small capital form), though one of them is the default glyph and other forms need to be selected with special tools.

like image 106
Jukka K. Korpela Avatar answered Dec 06 '25 11:12

Jukka K. Korpela



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!