Make the extended character names and order make more sense

This commit is contained in:
MysterD 2023-03-28 12:33:13 -07:00
parent 4457edb412
commit e0b5886bdf
32 changed files with 130 additions and 137 deletions

View file

@ -3591,130 +3591,129 @@ ALIGNED8 static const u8 texture_font_normal_char_93[] = {
#include "textures/segment2/custom_font_normal_char_93.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_93.ia4.inc.c"
}; };
// spanish // extended
ALIGNED8 static const u8 texture_font_normal_char_sa[] = { ALIGNED8 static const u8 texture_font_normal_char_ca_a[] = {
#include "textures/segment2/custom_font_normal_char_sa.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_ca_a.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_se[] = { ALIGNED8 static const u8 texture_font_normal_char_ca_c[] = {
#include "textures/segment2/custom_font_normal_char_se.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_ca_c.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_si[] = { ALIGNED8 static const u8 texture_font_normal_char_ca_g[] = {
#include "textures/segment2/custom_font_normal_char_si.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_ca_g.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_so[] = { ALIGNED8 static const u8 texture_font_normal_char_ca_t[] = {
#include "textures/segment2/custom_font_normal_char_so.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_ca_t.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_su[] = { ALIGNED8 static const u8 texture_font_normal_char_cc_ced[] = {
#include "textures/segment2/custom_font_normal_char_su.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_cc_ced.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_su2[] = { ALIGNED8 static const u8 texture_font_normal_char_ce_a[] = {
#include "textures/segment2/custom_font_normal_char_su2.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_ce_a.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_sn[] = { ALIGNED8 static const u8 texture_font_normal_char_ce_c[] = {
#include "textures/segment2/custom_font_normal_char_sn.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_ce_c.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_sca[] = { ALIGNED8 static const u8 texture_font_normal_char_ci_a[] = {
#include "textures/segment2/custom_font_normal_char_sca.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_ci_a.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_sce[] = { ALIGNED8 static const u8 texture_font_normal_char_cn_t[] = {
#include "textures/segment2/custom_font_normal_char_sce.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_cn_t.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_sci[] = { ALIGNED8 static const u8 texture_font_normal_char_co_a[] = {
#include "textures/segment2/custom_font_normal_char_sci.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_co_a.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_sco[] = { ALIGNED8 static const u8 texture_font_normal_char_co_c[] = {
#include "textures/segment2/custom_font_normal_char_sco.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_co_c.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_scu[] = { ALIGNED8 static const u8 texture_font_normal_char_co_t[] = {
#include "textures/segment2/custom_font_normal_char_scu.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_co_t.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_scu2[] = { ALIGNED8 static const u8 texture_font_normal_char_cu_a[] = {
#include "textures/segment2/custom_font_normal_char_scu2.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_cu_a.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_scn[] = { ALIGNED8 static const u8 texture_font_normal_char_cu_u[] = {
#include "textures/segment2/custom_font_normal_char_scn.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_cu_u.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_sex[] = { ALIGNED8 static const u8 texture_font_normal_char_la_a[] = {
#include "textures/segment2/custom_font_normal_char_sex.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_la_a.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_squ[] = { ALIGNED8 static const u8 texture_font_normal_char_la_c[] = {
#include "textures/segment2/custom_font_normal_char_squ.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_la_c.ia4.inc.c"
}; };
// portuguese ALIGNED8 static const u8 texture_font_normal_char_la_g[] = {
#include "textures/segment2/custom_font_normal_char_la_g.ia4.inc.c"
ALIGNED8 static const u8 texture_font_normal_char_pa[] = {
#include "textures/segment2/custom_font_normal_char_pa.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_pa2[] = { ALIGNED8 static const u8 texture_font_normal_char_la_t[] = {
#include "textures/segment2/custom_font_normal_char_pa2.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_la_t.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_pa3[] = { ALIGNED8 static const u8 texture_font_normal_char_lc_ced[] = {
#include "textures/segment2/custom_font_normal_char_pa3.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_lc_ced.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_pc[] = { ALIGNED8 static const u8 texture_font_normal_char_le_a[] = {
#include "textures/segment2/custom_font_normal_char_pc.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_le_a.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_pca[] = { ALIGNED8 static const u8 texture_font_normal_char_le_c[] = {
#include "textures/segment2/custom_font_normal_char_pca.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_le_c.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_pca2[] = { ALIGNED8 static const u8 texture_font_normal_char_li_a[] = {
#include "textures/segment2/custom_font_normal_char_pca2.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_li_a.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_pca3[] = { ALIGNED8 static const u8 texture_font_normal_char_ln_t[] = {
#include "textures/segment2/custom_font_normal_char_pca3.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_ln_t.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_pcc[] = { ALIGNED8 static const u8 texture_font_normal_char_lo_a[] = {
#include "textures/segment2/custom_font_normal_char_pcc.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_lo_a.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_pce2[] = { ALIGNED8 static const u8 texture_font_normal_char_lo_c[] = {
#include "textures/segment2/custom_font_normal_char_pce2.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_lo_c.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_pco2[] = { ALIGNED8 static const u8 texture_font_normal_char_lo_t[] = {
#include "textures/segment2/custom_font_normal_char_pco2.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_lo_t.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_pco3[] = { ALIGNED8 static const u8 texture_font_normal_char_lu_a[] = {
#include "textures/segment2/custom_font_normal_char_pco3.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_lu_a.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_pe2[] = { ALIGNED8 static const u8 texture_font_normal_char_lu_u[] = {
#include "textures/segment2/custom_font_normal_char_pe2.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_lu_u.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_po2[] = { ALIGNED8 static const u8 texture_font_normal_char_punc_sp_ex[] = {
#include "textures/segment2/custom_font_normal_char_po2.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_punc_sp_ex.ia4.inc.c"
}; };
ALIGNED8 static const u8 texture_font_normal_char_po3[] = { ALIGNED8 static const u8 texture_font_normal_char_punc_sp_qu[] = {
#include "textures/segment2/custom_font_normal_char_po3.ia4.inc.c" #include "textures/segment2/custom_font_normal_char_punc_sp_qu.ia4.inc.c"
}; };
const u8* const font_normal_chars[] = { const u8* const font_normal_chars[] = {
texture_font_char_us_exclamation, // ! texture_font_char_us_exclamation, // !
texture_font_char_us_double_quote_open, // " texture_font_char_us_double_quote_open, // "
@ -3812,37 +3811,39 @@ const u8* const font_normal_chars[] = {
texture_font_char_us_tilde, // ~ texture_font_char_us_tilde, // ~
texture_font_char_us_star_filled, // DEL texture_font_char_us_star_filled, // DEL
texture_font_normal_char_sa, // á texture_font_normal_char_ca_a, // Á
texture_font_normal_char_se, // é texture_font_normal_char_ca_c, // Â
texture_font_normal_char_si, // í texture_font_normal_char_ca_g, // À
texture_font_normal_char_so, // ó texture_font_normal_char_ca_t, // Ã
texture_font_normal_char_su, // ú texture_font_normal_char_cc_ced, // Ç
texture_font_normal_char_su2, // ü texture_font_normal_char_ce_a, // É
texture_font_normal_char_sn, // ñ texture_font_normal_char_ce_c, // Ê
texture_font_normal_char_sca, // Á texture_font_normal_char_ci_a, // Í
texture_font_normal_char_sce, // É texture_font_normal_char_cn_t, // Ñ
texture_font_normal_char_sci, // Í texture_font_normal_char_co_a, // Ó
texture_font_normal_char_sco, // Ó texture_font_normal_char_co_c, // Ô
texture_font_normal_char_scu, // Ú texture_font_normal_char_co_t, // Õ
texture_font_normal_char_scu2, // Ü texture_font_normal_char_cu_a, // Ú
texture_font_normal_char_scn, // Ñ texture_font_normal_char_cu_u, // Ü
texture_font_normal_char_sex, // ¡
texture_font_normal_char_squ, // ¿ texture_font_normal_char_la_a, // á
texture_font_normal_char_la_c, // â
texture_font_normal_char_la_g, // à
texture_font_normal_char_la_t, // ã
texture_font_normal_char_lc_ced, // ç
texture_font_normal_char_le_a, // é
texture_font_normal_char_le_c, // ê
texture_font_normal_char_li_a, // í
texture_font_normal_char_ln_t, // ñ
texture_font_normal_char_lo_a, // ó
texture_font_normal_char_lo_c, // ô
texture_font_normal_char_lo_t, // õ
texture_font_normal_char_lu_a, // ú
texture_font_normal_char_lu_u, // ü
texture_font_normal_char_punc_sp_ex, // ¡
texture_font_normal_char_punc_sp_qu, // ¿
texture_font_normal_char_pa, // à
texture_font_normal_char_pa2, // â
texture_font_normal_char_pa3, // ã
texture_font_normal_char_pe2, // ê
texture_font_normal_char_po2, // ô
texture_font_normal_char_po3, // õ
texture_font_normal_char_pc, // ç
texture_font_normal_char_pca, // À
texture_font_normal_char_pca2, // Â
texture_font_normal_char_pca3, // Ã
texture_font_normal_char_pce2, // Ê
texture_font_normal_char_pco2, // Ô
texture_font_normal_char_pco3, // Õ
texture_font_normal_char_pcc, // Ç
}; };
const f32 font_normal_widths[] = { const f32 font_normal_widths[] = {
@ -3861,18 +3862,13 @@ const f32 font_normal_widths[] = {
/* { | } ~ DEL */ /* { | } ~ DEL */
0.3125f, 0.2500f, 0.3125f, 0.5000f, 0.5000f, 0.3125f, 0.2500f, 0.3125f, 0.5000f, 0.5000f,
/* á é í ó ú ü ñ */ /* Á Â À Ã Ç É Ê Í Ñ Ó Ô Õ Ú Ü */
0.3750f, 0.3125f, 0.2500f, 0.3125f, 0.3125f, 0.3125f, 0.3125f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3125f, 0.5000f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f,
/* Á É Í Ó Ú Ü Ñ */ /* á â à ã ç é ê í ñ ó ô õ ú ü */
0.3750f, 0.3750f, 0.3125f, 0.3750f, 0.3750f, 0.3750f, 0.5000f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3125f, 0.3125f, 0.3125f, 0.2500f, 0.3125f, 0.3125f, 0.3125f, 0.3125f, 0.3125f, 0.3125f,
/* ¡ ¿ */ /* ¡ ¿ */
0.3125f, 0.4375f, 0.3125f, 0.4375f,
/* à â ã ê ô õ ç */
0.3750f, 0.3750f, 0.3750f, 0.3125f, 0.3125f, 0.3125f, 0.3125f,
/* À Â Ã Ê Ô Õ Ç */
0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f, 0.3750f,
}; };

View file

@ -4,41 +4,39 @@
struct SmCodeGlyph { struct SmCodeGlyph {
s8 unicode1; s8 unicode1;
s8 unicode2; s8 unicode2;
u8 smcode;
}; };
struct SmCodeGlyph sSmCodeGlyphs[] = { struct SmCodeGlyph sSmCodeGlyphs[] = {
{ -61, -95, 128 }, // á { -61, -127 }, // Á
{ -61, -87, 129 }, // é { -61, -126 }, // Â
{ -61, -83, 130 }, // í { -61, -128 }, // À
{ -61, -77, 131 }, // ó { -61, -125 }, // Ã
{ -61, -70, 132 }, // ú { -61, -121 }, // Ç
{ -61, -68, 133 }, // ü { -61, -119 }, // É
{ -61, -79, 134 }, // ñ { -61, -118 }, // Ê
{ -61, -127, 135 }, // Á { -61, -115 }, // Í
{ -61, -119, 136 }, // É { -61, -111 }, // Ñ
{ -61, -115, 137 }, // Í { -61, -109 }, // Ó
{ -61, -109, 138 }, // Ó { -61, -108 }, // Ô
{ -61, -102, 139 }, // Ú { -61, -107 }, // Õ
{ -61, -100, 140 }, // Ü { -61, -102 }, // Ú
{ -61, -111, 141 }, // Ñ { -61, -100 }, // Ü
{ -62, -95, 142 }, // ¡ { -61, -95 }, // á
{ -62, -65, 143 }, // ¿ { -61, -94 }, // â
{ -61, -96 }, // à
{ -61, -96, 144 }, // à { -61, -93 }, // ã
{ -61, -94, 145 }, // â { -61, -89 }, // ç
{ -61, -93, 146 }, // ã { -61, -87 }, // é
{ -61, -86, 147 }, // ê { -61, -86 }, // ê
{ -61, -76, 148 }, // ô { -61, -83 }, // í
{ -61, -75, 149 }, // õ { -61, -79 }, // ñ
{ -61, -89, 150 }, // ç { -61, -77 }, // ó
{ -61, -128, 151 }, // À { -61, -76 }, // ô
{ -61, -126, 152 }, // Â { -61, -75 }, // õ
{ -61, -125, 153 }, // Ã { -61, -70 }, // ú
{ -61, -118, 154 }, // Ê { -61, -68 }, // ü
{ -61, -108, 155 }, // Ô { -62, -95 }, // ¡
{ -61, -107, 156 }, // Õ { -62, -65 }, // ¿
{ -61, -121, 157 }, // Ç
}; };
void djui_font_convert_to_smcode(char* text) { void djui_font_convert_to_smcode(char* text) {
@ -56,7 +54,7 @@ void djui_font_convert_to_smcode(char* text) {
char* t2 = t; char* t2 = t;
while (*t2 != '\0') { t2[0] = t2[1]; t2++; } while (*t2 != '\0') { t2[0] = t2[1]; t2++; }
// replace // replace
t[0] = (s8)glyph->smcode; t[0] = (s8)(128 + i);
} }
} }
t++; t++;
@ -73,8 +71,7 @@ bool djui_font_valid_smcode(char c) {
size_t glyphCount = sizeof(sSmCodeGlyphs) / sizeof(sSmCodeGlyphs[0]); size_t glyphCount = sizeof(sSmCodeGlyphs) / sizeof(sSmCodeGlyphs[0]);
for (size_t i = 0; i < glyphCount; i++) { for (size_t i = 0; i < glyphCount; i++) {
struct SmCodeGlyph* glyph = &sSmCodeGlyphs[i]; if ((u8)c == ((u8)(128 + i))) { return true; }
if ((u8)c == glyph->smcode) { return true; }
} }
return false; return false;

View file

Before

Width:  |  Height:  |  Size: 512 B

After

Width:  |  Height:  |  Size: 512 B

View file

Before

Width:  |  Height:  |  Size: 514 B

After

Width:  |  Height:  |  Size: 514 B

View file

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 515 B

View file

Before

Width:  |  Height:  |  Size: 521 B

After

Width:  |  Height:  |  Size: 521 B

View file

Before

Width:  |  Height:  |  Size: 511 B

After

Width:  |  Height:  |  Size: 511 B

View file

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 515 B

View file

Before

Width:  |  Height:  |  Size: 513 B

After

Width:  |  Height:  |  Size: 513 B

View file

Before

Width:  |  Height:  |  Size: 514 B

After

Width:  |  Height:  |  Size: 514 B

View file

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 534 B

View file

Before

Width:  |  Height:  |  Size: 514 B

After

Width:  |  Height:  |  Size: 514 B

View file

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 520 B

View file

Before

Width:  |  Height:  |  Size: 522 B

After

Width:  |  Height:  |  Size: 522 B

View file

Before

Width:  |  Height:  |  Size: 513 B

After

Width:  |  Height:  |  Size: 513 B

View file

Before

Width:  |  Height:  |  Size: 519 B

After

Width:  |  Height:  |  Size: 519 B

View file

Before

Width:  |  Height:  |  Size: 504 B

After

Width:  |  Height:  |  Size: 504 B

View file

Before

Width:  |  Height:  |  Size: 510 B

After

Width:  |  Height:  |  Size: 510 B

View file

Before

Width:  |  Height:  |  Size: 509 B

After

Width:  |  Height:  |  Size: 509 B

View file

Before

Width:  |  Height:  |  Size: 512 B

After

Width:  |  Height:  |  Size: 512 B

View file

Before

Width:  |  Height:  |  Size: 507 B

After

Width:  |  Height:  |  Size: 507 B

View file

Before

Width:  |  Height:  |  Size: 504 B

After

Width:  |  Height:  |  Size: 504 B

View file

Before

Width:  |  Height:  |  Size: 510 B

After

Width:  |  Height:  |  Size: 510 B

View file

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 502 B

View file

Before

Width:  |  Height:  |  Size: 498 B

After

Width:  |  Height:  |  Size: 498 B

View file

Before

Width:  |  Height:  |  Size: 503 B

After

Width:  |  Height:  |  Size: 503 B

View file

Before

Width:  |  Height:  |  Size: 504 B

After

Width:  |  Height:  |  Size: 504 B

View file

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 496 B

View file

Before

Width:  |  Height:  |  Size: 509 B

After

Width:  |  Height:  |  Size: 509 B

View file

Before

Width:  |  Height:  |  Size: 510 B

After

Width:  |  Height:  |  Size: 510 B

View file

Before

Width:  |  Height:  |  Size: 499 B

After

Width:  |  Height:  |  Size: 499 B

View file

Before

Width:  |  Height:  |  Size: 509 B

After

Width:  |  Height:  |  Size: 509 B