Skip to content

Commit

Permalink
UI/CGAME: Fix menu font appearance
Browse files Browse the repository at this point in the history
- fixes wrong pixel assignment
- fixes truncated letters
- fixes pixel artifacts at letter edges
- fixes incoherent spacing between letters
- reduces letter spacing from 3 to 2
- removes unused PROPB_ definitions
  • Loading branch information
kai-li-wop committed Nov 15, 2023
1 parent f77251c commit bccd37a
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 185 deletions.
178 changes: 89 additions & 89 deletions code/cgame/cg_drawtools.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,105 +482,105 @@ static const struct FontData {
{0, 0, -1},

{0, 0, PROP_SPACE_WIDTH}, // SPACE
{11, 122, 7}, // !
{154, 181, 14}, // "
{55, 122, 17}, // #
{79, 122, 18}, // $
{101, 122, 23}, // %
{153, 122, 18}, // &
{9, 93, 7}, // '
{207, 122, 8}, // (
{230, 122, 9}, // )
{177, 122, 18}, // *
{30, 152, 18}, // +
{85, 181, 7}, // ,
{34, 93, 11}, // -
{110, 181, 6}, // .
{130, 152, 14}, // /

{22, 64, 17}, // 0
{41, 64, 12}, // 1
{58, 64, 17}, // 2
{78, 64, 18}, // 3
{98, 64, 19}, // 4
{120, 64, 18}, // 5
{141, 64, 18}, // 6
{204, 64, 16}, // 7
{162, 64, 17}, // 8
{182, 64, 18}, // 9
{59, 181, 7}, // :
{35, 181, 7}, // ;
{203, 152, 14}, // <
{56, 93, 14}, // =
{228, 152, 14}, // >
{177, 181, 18}, // ?
{9, 122, 11}, // !
{155, 181, 13}, // "
{54, 122, 15}, // #
{81, 122, 16}, // $
{102, 122, 18}, // %
{153, 122, 19}, // &
{10, 93, 6}, // '
{207, 122, 13}, // (
{225, 122, 13}, // )
{177, 122, 11}, // *
{33, 152, 13}, // +
{85, 181, 8}, // ,
{32, 93, 14}, // -
{108, 181, 8}, // .
{128, 152, 18}, // /

{21, 64, 18}, // 0
{40, 64, 15}, // 1
{57, 64, 16}, // 2
{78, 64, 15}, // 3
{97, 64, 14}, // 4
{116, 64, 14}, // 5
{135, 64, 13}, // 6
{153, 64, 16}, // 7
{174, 64, 16}, // 8
{194, 64, 15}, // 9
{59, 181, 8}, // :
{33, 181, 8}, // ;
{203, 152, 12}, // <
{56, 93, 15}, // =
{225, 152, 12}, // >
{179, 181, 16}, // ?

{28, 122, 22}, // @
{5, 4, 18}, // A
{27, 4, 18}, // B
{4, 4, 20}, // A
{27, 4, 15}, // B
{48, 4, 18}, // C
{69, 4, 17}, // D
{90, 4, 13}, // E
{106, 4, 13}, // F
{121, 4, 18}, // G
{143, 4, 17}, // H
{164, 4, 8}, // I
{175, 4, 16}, // J
{195, 4, 18}, // K
{216, 4, 12}, // L
{230, 4, 23}, // M
{68, 4, 16}, // D
{89, 4, 15}, // E
{106, 4, 15}, // F
{122, 4, 17}, // G
{142, 4, 17}, // H
{163, 4, 12}, // I
{176, 4, 17}, // J
{196, 4, 18}, // K
{215, 4, 15}, // L
{232, 4, 22}, // M
{6, 34, 18}, // N
{27, 34, 18}, // O

{48, 34, 18}, // P
{68, 34, 18}, // Q
{90, 34, 17}, // R
{110, 34, 18}, // S
{130, 34, 14}, // T
{146, 34, 18}, // U
{166, 34, 19}, // V
{185, 34, 29}, // W
{215, 34, 18}, // X
{234, 34, 18}, // Y
{5, 64, 14}, // Z
{60, 152, 7}, // [
{106, 151, 13}, // '\'
{83, 152, 7}, // ]
{128, 122, 17}, // ^
{4, 152, 21}, // _

{134, 181, 5}, // '
{5, 4, 18}, // A
{27, 4, 18}, // B
{48, 34, 15}, // P
{67, 34, 19}, // Q
{90, 34, 18}, // R
{111, 34, 18}, // S
{130, 34, 15}, // T
{146, 34, 19}, // U
{167, 34, 18}, // V
{188, 34, 21}, // W
{213, 34, 22}, // X
{235, 34, 19}, // Y
{4, 64, 16}, // Z
{58, 152, 11}, // [
{105, 152, 15}, // '\'
{81, 152, 11}, // ]
{128, 122, 18}, // ^
{4, 152, 20}, // _

{134, 181, 6}, // '
{4, 4, 20}, // A
{27, 4, 15}, // B
{48, 4, 18}, // C
{69, 4, 17}, // D
{90, 4, 13}, // E
{106, 4, 13}, // F
{121, 4, 18}, // G
{143, 4, 17}, // H
{164, 4, 8}, // I
{175, 4, 16}, // J
{195, 4, 18}, // K
{216, 4, 12}, // L
{230, 4, 23}, // M
{68, 4, 16}, // D
{89, 4, 15}, // E
{106, 4, 15}, // F
{122, 4, 17}, // G
{142, 4, 17}, // H
{163, 4, 12}, // I
{176, 4, 17}, // J
{196, 4, 18}, // K
{215, 4, 15}, // L
{232, 4, 22}, // M
{6, 34, 18}, // N
{27, 34, 18}, // O

{48, 34, 18}, // P
{68, 34, 18}, // Q
{90, 34, 17}, // R
{110, 34, 18}, // S
{130, 34, 14}, // T
{146, 34, 18}, // U
{166, 34, 19}, // V
{185, 34, 29}, // W
{215, 34, 18}, // X
{234, 34, 18}, // Y
{5, 64, 14}, // Z
{153, 152, 13}, // {
{11, 181, 5}, // |
{180, 152, 13}, // }
{79, 93, 17}, // ~
{48, 34, 15}, // P
{67, 34, 19}, // Q
{90, 34, 18}, // R
{111, 34, 18}, // S
{130, 34, 15}, // T
{146, 34, 19}, // U
{167, 34, 18}, // V
{188, 34, 21}, // W
{213, 34, 22}, // X
{235, 34, 19}, // Y
{4, 64, 16}, // Z
{154, 152, 10}, // {
{11, 181, 8}, // |
{182, 152, 10}, // }
{78, 93, 20}, // ~
{0, 0, -1} // DEL
};

Expand Down
2 changes: 1 addition & 1 deletion code/qcommon/q_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ typedef enum {
#define FONT_ASCII_TRIANGLE 31
#define FONT_ASCII_UNDERLINE 95

#define PROP_GAP_WIDTH 3
#define PROP_GAP_WIDTH 2
#define PROP_SPACE_WIDTH 8
#define PROP_HEIGHT 27
#define PROP_SMALL_SIZE_SCALE 0.75
Expand Down
Loading

0 comments on commit bccd37a

Please sign in to comment.