Adjusted kerning

This commit is contained in:
MysterD 2023-04-22 02:44:19 -07:00
parent afe7e28fb3
commit 865d17b512
3 changed files with 9 additions and 9 deletions

View file

@ -15,11 +15,11 @@ const f32 font_normal_widths[] = {
/* : ; < = > ? @ */
6, 8, 10, 12, 10, 11, 18,
/* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z */
12, 12, 12, 12, 12, 10, 12, 12, 10, 12, 12, 10, 16, 16, 12, 12, 12, 12, 12, 10, 12, 12, 16, 14, 12, 12,
12, 12, 12, 12, 11, 10, 12, 12, 9, 12, 12, 10, 16, 16, 12, 11, 12, 12, 12, 10, 12, 10, 16, 14, 12, 12,
/* [ \ ] ^ _ ` */
10, 10, 10, 12, 12, 8,
/* a b c d e f g h i j k l m n o p q r s t u v w x y z */
10, 10, 10, 10, 10, 8, 12, 10, 7, 10, 10, 5, 14, 10, 10, 10, 10, 9, 10, 10, 10, 9, 14, 12, 10, 10,
10, 10, 10, 10, 9, 8, 12, 10, 7, 9, 10, 4, 13, 10, 9, 9, 10, 9, 10, 9, 10, 9, 14, 12, 10, 10,
/* { | } ~ DEL */
10, 8, 10, 16, 10,
};

View file

@ -19,7 +19,7 @@ static void djui_font_normal_render_char(char* c) {
}
static f32 djui_font_normal_char_width(char* c) {
if (*c == ' ') { return 5 / 32.0f; }
if (*c == ' ') { return 6 / 32.0f; }
extern const f32 font_normal_widths[];
return djui_unicode_get_sprite_width(c, font_normal_widths) / 32.0f;
}

View file

@ -71,18 +71,18 @@ struct SmCodeGlyph sSmCodeGlyphs[] = {
{ "ý", 'y', 0, 0 },
{ "ÿ", 'y', 0, 0 },
{ "æ", 'a', 0.5000f, 0 },
{ "Æ", 'a', 0.6000f, 0 },
{ "œ", 'o', 0.5000f, 0 },
{ "Œ", 'o', 0.5000f, 0 },
{ "æ", 'a', 15, 0 },
{ "Æ", 'a', 16, 0 },
{ "œ", 'o', 15, 0 },
{ "Œ", 'o', 16, 0 },
{ "ð", 'd', 0, 0 },
{ "Ð", 'D', 0.4375f, 0 },
{ "Ð", 'D', 14, 0 },
{ "ø", 'o', 0, 0 },
{ "Ø", 'O', 0, 0 },
{ "ß", 'S', 0, 0 },
{ "¡", '!', 0, 0 },
{ "¿", '?', 0.3750f, 0 },
{ "¿", '?', 12, 0 },
{ "Б", 15, 0, 0 },
{ "Г", 14, 0, 0 },