OnlineCop / kq-fork

Fork of KQ r910. Just for fun.
GNU General Public License v2.0
16 stars 9 forks source link

How was fonts.png generated? #168

Open OnlineCop opened 3 weeks ago

OnlineCop commented 3 weeks ago

The fonts.png image contains a mixture of ASCII and Unicode characters.

There are 7 rows; the top 6 are 8x8 pixels; the bottom row is 8x12 (width x height).

fonts

From left-to-right, we have:
(0x20: space) ! (0x21: exclamation mark) " (0x22: double quote) # (0x23: octothorpe)
$ (0x24: which is rendered as a ~, except in row 7) % (0x25: percent) & (0x26: ampersand) ' (0x27: single quote)
( (0x28: left paren) ) (0x29: right paren) * (0x2a: asterisk) + (0x2b: plus)
, (0x2c: comma) - (0x2d: hyphen) . (0x2e: period) / (0x2f: forward-slash)
0..9 (0x30..0x39: digits 0-9) : (0x3a: colon) ; (0x3b: semi-colon) < (0x3c: left angle bracket, which is rendered as a left arrow in rows 1-5)
= (0x3d: equal sign) > (0x3e: right angle bracket, which is rendered as a right arrow in rows 1-5) ? (0x3f: question mark) @ (0x40: at sign, which is rendered as a downward chevron in rows 1-5)
A..Z (0x41..0x5a: uppercase A-Z) [ (0x5b: left bracket) \\ (0x5c: backslash) ] (0x5d: right bracket)
^ (0x5e: chevron, which is rendered as a stylized x in rows 1-5) _ (0x5f: underscore, which is rendered as a blank space) ` (backtick) | `a..z (0x61..0x7a: lowercase a-z)
{ (0x7b: left brace, not rendered) \| (0x7c: pipe, not rendered) } (0x7d: right brace, not rendered) ~ (0x7e: tilde, not rendered)

These constitute the ASCII characters; there are a handful of accented characters that follow, although they are rarely used:

á (a-acute) à (a-grave) â (a-circumflex) ä (a-diaeresis)
é (e-acute) è (e-grave) ê (e-circumflex) ë (e-diaeresis)
ó (o-acute) ò (o-grave) ô (o-circumflex) ö (o-diaeresis)
ú (u-acute) ù (u-grave) û (u-circumflex) ü (u-diaeresis)
ß (sharp s) ñ (n-tilde) ç (c-cedilla) (ellipsis)

Is there an SDL font that we could use instead? Preferably one with better Unicode support?

z9484 commented 3 weeks ago

I would guess that it was manually created, but I don't know.