From 4457edb412a7e2782d23756442ecf88c081c7799 Mon Sep 17 00:00:00 2001 From: MysterD Date: Tue, 28 Mar 2023 00:57:05 -0700 Subject: [PATCH] Added portuguese letters to chat font --- bin/segment2.c | 77 ++++++++++++++++++ src/pc/djui/djui_font.c | 19 +++++ .../custom_font_normal_char_pa.ia4.png | Bin 0 -> 509 bytes .../custom_font_normal_char_pa2.ia4.png | Bin 0 -> 510 bytes .../custom_font_normal_char_pa3.ia4.png | Bin 0 -> 512 bytes .../custom_font_normal_char_pc.ia4.png | Bin 0 -> 507 bytes .../custom_font_normal_char_pc.ia4.png~ | Bin 0 -> 505 bytes .../custom_font_normal_char_pca.ia4.png | Bin 0 -> 515 bytes .../custom_font_normal_char_pca2.ia4.png | Bin 0 -> 514 bytes .../custom_font_normal_char_pca3.ia4.png | Bin 0 -> 521 bytes .../custom_font_normal_char_pcc.ia4.png | Bin 0 -> 511 bytes .../custom_font_normal_char_pcc.ia4.png~ | Bin 0 -> 514 bytes .../custom_font_normal_char_pce2.ia4.png | Bin 0 -> 513 bytes .../custom_font_normal_char_pco2.ia4.png | Bin 0 -> 520 bytes .../custom_font_normal_char_pco3.ia4.png | Bin 0 -> 522 bytes .../custom_font_normal_char_pe2.ia4.png | Bin 0 -> 510 bytes .../custom_font_normal_char_po2.ia4.png | Bin 0 -> 504 bytes .../custom_font_normal_char_po3.ia4.png | Bin 0 -> 496 bytes 18 files changed, 96 insertions(+) create mode 100644 textures/segment2/custom_font_normal_char_pa.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_pa2.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_pa3.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_pc.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_pc.ia4.png~ create mode 100644 textures/segment2/custom_font_normal_char_pca.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_pca2.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_pca3.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_pcc.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_pcc.ia4.png~ create mode 100644 textures/segment2/custom_font_normal_char_pce2.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_pco2.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_pco3.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_pe2.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_po2.ia4.png create mode 100644 textures/segment2/custom_font_normal_char_po3.ia4.png diff --git a/bin/segment2.c b/bin/segment2.c index de8ae9fd..e04be7d3 100644 --- a/bin/segment2.c +++ b/bin/segment2.c @@ -3657,6 +3657,63 @@ ALIGNED8 static const u8 texture_font_normal_char_squ[] = { #include "textures/segment2/custom_font_normal_char_squ.ia4.inc.c" }; +// portuguese + +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[] = { +#include "textures/segment2/custom_font_normal_char_pa2.ia4.inc.c" +}; + +ALIGNED8 static const u8 texture_font_normal_char_pa3[] = { +#include "textures/segment2/custom_font_normal_char_pa3.ia4.inc.c" +}; + +ALIGNED8 static const u8 texture_font_normal_char_pc[] = { +#include "textures/segment2/custom_font_normal_char_pc.ia4.inc.c" +}; + +ALIGNED8 static const u8 texture_font_normal_char_pca[] = { +#include "textures/segment2/custom_font_normal_char_pca.ia4.inc.c" +}; + +ALIGNED8 static const u8 texture_font_normal_char_pca2[] = { +#include "textures/segment2/custom_font_normal_char_pca2.ia4.inc.c" +}; + +ALIGNED8 static const u8 texture_font_normal_char_pca3[] = { +#include "textures/segment2/custom_font_normal_char_pca3.ia4.inc.c" +}; + +ALIGNED8 static const u8 texture_font_normal_char_pcc[] = { +#include "textures/segment2/custom_font_normal_char_pcc.ia4.inc.c" +}; + +ALIGNED8 static const u8 texture_font_normal_char_pce2[] = { +#include "textures/segment2/custom_font_normal_char_pce2.ia4.inc.c" +}; + +ALIGNED8 static const u8 texture_font_normal_char_pco2[] = { +#include "textures/segment2/custom_font_normal_char_pco2.ia4.inc.c" +}; + +ALIGNED8 static const u8 texture_font_normal_char_pco3[] = { +#include "textures/segment2/custom_font_normal_char_pco3.ia4.inc.c" +}; + +ALIGNED8 static const u8 texture_font_normal_char_pe2[] = { +#include "textures/segment2/custom_font_normal_char_pe2.ia4.inc.c" +}; + +ALIGNED8 static const u8 texture_font_normal_char_po2[] = { +#include "textures/segment2/custom_font_normal_char_po2.ia4.inc.c" +}; + +ALIGNED8 static const u8 texture_font_normal_char_po3[] = { +#include "textures/segment2/custom_font_normal_char_po3.ia4.inc.c" +}; const u8* const font_normal_chars[] = { texture_font_char_us_exclamation, // ! @@ -3772,6 +3829,20 @@ const u8* const font_normal_chars[] = { texture_font_normal_char_sex, // ¡ texture_font_normal_char_squ, // ¿ + 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[] = { @@ -3796,6 +3867,12 @@ const f32 font_normal_widths[] = { 0.3750f, 0.3750f, 0.3125f, 0.3750f, 0.3750f, 0.3750f, 0.5000f, /* ¡ ¿ */ 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, + }; diff --git a/src/pc/djui/djui_font.c b/src/pc/djui/djui_font.c index 68353e88..cb8870f0 100644 --- a/src/pc/djui/djui_font.c +++ b/src/pc/djui/djui_font.c @@ -24,13 +24,31 @@ struct SmCodeGlyph sSmCodeGlyphs[] = { { -61, -111, 141 }, // Ñ { -62, -95, 142 }, // ¡ { -62, -65, 143 }, // ¿ + + { -61, -96, 144 }, // à + { -61, -94, 145 }, // â + { -61, -93, 146 }, // ã + { -61, -86, 147 }, // ê + { -61, -76, 148 }, // ô + { -61, -75, 149 }, // õ + { -61, -89, 150 }, // ç + { -61, -128, 151 }, // À + { -61, -126, 152 }, // Â + { -61, -125, 153 }, // Ã + { -61, -118, 154 }, // Ê + { -61, -108, 155 }, // Ô + { -61, -107, 156 }, // Õ + { -61, -121, 157 }, // Ç }; void djui_font_convert_to_smcode(char* text) { size_t glyphCount = sizeof(sSmCodeGlyphs) / sizeof(sSmCodeGlyphs[0]); + //printf("....................\n"); + //printf("%s\n", text); char* t = text; while (*t != '\0') { + //printf("%d ", *t); for (size_t i = 0; i < glyphCount; i++) { struct SmCodeGlyph* glyph = &sSmCodeGlyphs[i]; if (t[0] == glyph->unicode1 && t[1] == glyph->unicode2) { @@ -43,6 +61,7 @@ void djui_font_convert_to_smcode(char* text) { } t++; } + //printf("\n....................\n"); } bool djui_font_valid_smcode(char c) { diff --git a/textures/segment2/custom_font_normal_char_pa.ia4.png b/textures/segment2/custom_font_normal_char_pa.ia4.png new file mode 100644 index 0000000000000000000000000000000000000000..9ce6b0ec935aa89212a2183d06756c845e267358 GIT binary patch literal 509 zcmV-p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ#gQQ^-a%3G(lsSDEqY2mgM!Na zf1XZybfnb1H3Id|p7-7d!Cffsc;5H1=M_&N@C28+vVTo-8vhi1r>un!p?wq1ugaRX z2Nzq={b(iac{sEQRXW4f_ zJpTXy010qNS#tmY3labT3lag+-G2N4001>fL_t(2Q)6HlUf|E4KmSSf5hJn&YzDBf zu%M_RXaTw*Fg{VP!=)K!D>g$goQJH480P~3g#aU{8#cAS00000NkvXXu0mjfI-A+s literal 0 HcmV?d00001 diff --git a/textures/segment2/custom_font_normal_char_pa2.ia4.png b/textures/segment2/custom_font_normal_char_pa2.ia4.png new file mode 100644 index 0000000000000000000000000000000000000000..195b1f01ad1479c9d8d0ca34b8092dbaeb108f08 GIT binary patch literal 510 zcmV-p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ#gQQ^-a%3G(lsSDEqY2mgM!Na zf1XZybfnb1H3Id|p7-7d!Cffsc;5H1=M_&N@C28+vVTo-8vhi1r>un!p?wq1ugaRX z2Nzq={b(iac{sEQRXW4f_ zJpTXy010qNS#tmY3labT3lag+-G2N4001^gL_t(2Q)6HlUf|E4KmSSf5hJn&YzDBf zuz=No-p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ#gQQ^-a%3G(lsSDEqY2mgM!Na zf1XZybfnb1H3Id|p7-7d!Cffsc;5H1=M_&N@C28+vVTo-8vhi1r>un!p?wq1ugaRX z2Nzq={b(iac{sEQRXW4f_ zJpTXy010qNS#tmY3labT3lag+-G2N4001~iL_t(2Q)6HlUf|E4KmSSf5hJn&YzDBf zu)x)T-p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ#gQQ^-a%3G(lsSDEqY2mgM!Na zf1XZybfnb1H3Id|p7-7d!Cffsc;5H1=M_&N@C28+vVTo-8vhi1r>un!p?wq1ugaRX z2Nzq={b(iac{sEQRXW4f_ zJpTXy010qNS#tmY3labT3lag+-G2N4001*dL_t(2Q)6Hl1sEal=g*)2FhOKC!Jq;u x#-@QNLtu)~6%(VG5#4FXnpjv^FyztI0{~R{BbxS9lEDA~002ovPDHLkV1lSr+q3`x literal 0 HcmV?d00001 diff --git a/textures/segment2/custom_font_normal_char_pc.ia4.png~ b/textures/segment2/custom_font_normal_char_pc.ia4.png~ new file mode 100644 index 0000000000000000000000000000000000000000..9b5b6e4af000fb4cb0933686fb5d2bc399ea648c GIT binary patch literal 505 zcmV-p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ#gQQ^-a%3G(lsSDEqY2mgM!Na zf1XZybfnb1H3Id|p7-7d!Cffsc;5H1=M_&N@C28+vVTo-8vhi1r>un!p?wq1ugaRX z2Nzq={b(iac{sEQRXW4f_ zJpTXy010qNS#tmY3labT3lag+-G2N4001#bL_t(2Q)6Hl1sEal=g*)2FhOKCQ9*@G v1JQ-p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ#gQQ^-a%3G(lsSDEqY2mgM!Na zf1XZybfnb1H3Id|p7-7d!Cffsc;5H1=M_&N@C28+vVTo-8vhi1r>un!p?wq1ugaRX z2Nzq={b(iac{sEQRXW4f_ zJpTXy010qNS#tmY3labT3lag+-G2N40028lL_t(2Q)6Hl@_-T92Y>$j`A>|GSXfw4 z^kLP5%`jpu02_#`7{o^B6Lcv|6E0g};yA;AD1QQ-0RYK!FM)$!Yi$4k002ovPDHLk FV1l!w-E#l{ literal 0 HcmV?d00001 diff --git a/textures/segment2/custom_font_normal_char_pca2.ia4.png b/textures/segment2/custom_font_normal_char_pca2.ia4.png new file mode 100644 index 0000000000000000000000000000000000000000..f4050f025c25e0de6142ec0c345b6c133300bc8a GIT binary patch literal 514 zcmV+d0{#7oP)-p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ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40025kL_t(2Q)6Hlp5V`)KmS1(-FMi;FhYQk zBE0g1G=pqISHl8x0wK*Xc@`EHMr3EBaPS#|t`TMk0FCJ-p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ#gQQ^-a%3G(lsSDEqY2mgM!Na zf1XZybfnb1H3Id|p7-7d!Cffsc;5H1=M_&N@C28+vVTo-8vhi1r>un!p?wq1ugaRX z2Nzq={b(iac{sEQRXW4f_ zJpTXy010qNS#tmY3labT3lag+-G2N40022jL_t(2Q)6HlS>Vr~KmXBv%!Dj}O#vY> z6a$D2PZkyyMr;N%pbH}Naj_ZEZN+LbP!Y&hY%T--p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ#gQQ^-a%3G(lsSDEqY2mgM!Na zf1XZybfnb1H3Id|p7-7d!Cffsc;5H1=M_&N@C28+vVTo-8vhi1r>un!p?wq1ugaRX z2Nzq={b(iac{sEQRXW4f_ zJpTXy010qNS#tmY3labT3lag+-G2N4002NqL_t(2Q)6Hl@_-SW5B~i5^BigP)-p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ#gQQ^-a%3G(lsSDEqY2mgM!Na zf1XZybfnb1H3Id|p7-7d!Cffsc;5H1=M_&N@C28+vVTo-8vhi1r>un!p?wq1ugaRX z2Nzq={b(iac{sEQRXW4f_ zJpTXy010qNS#tmY3labT3lag+-G2N4002TsL_t(2Q)6Hl@_-SW5B~i5^B M07*qoM6N<$f^V+iS^xk5 literal 0 HcmV?d00001 diff --git a/textures/segment2/custom_font_normal_char_pe2.ia4.png b/textures/segment2/custom_font_normal_char_pe2.ia4.png new file mode 100644 index 0000000000000000000000000000000000000000..de11dd5d931e6140640cddfb3320c6ba19229ced GIT binary patch literal 510 zcmV-p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ#gQQ^-a%3G(lsSDEqY2mgM!Na zf1XZybfnb1H3Id|p7-7d!Cffsc;5H1=M_&N@C28+vVTo-8vhi1r>un!p?wq1ugaRX z2Nzq={b(iac{sEQRXW4f_ zJpTXy010qNS#tmY3labT3lag+-G2N4001^gL_t(2Q)6Hl1vo?C&!0d4K^Ue0nT=Ny zND`Muf`-5ppwsAvBD;VQ-8sm%u&}UT$fK(V0LBt8bJzr@8vp-p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ#gQQ^-a%3G(lsSDEqY2mgM!Na zf1XZybfnb1H3Id|p7-7d!Cffsc;5H1=M_&N@C28+vVTo-8vhi1r>un!p?wq1ugaRX z2Nzq={b(iac{sEQRXW4f_ zJpTXy010qNS#tmY3labT3lag+-G2N4001yaL_t(2Q)6Hl1z1Di&!0d4VHlpAsfQN!h#`>t{wmmb1Q(9qKY~I0000DMm+ literal 0 HcmV?d00001 diff --git a/textures/segment2/custom_font_normal_char_po3.ia4.png b/textures/segment2/custom_font_normal_char_po3.ia4.png new file mode 100644 index 0000000000000000000000000000000000000000..3f64d4b7c5fb855950a6aab7b5aab2975459f428 GIT binary patch literal 496 zcmV-p*Gkt){GvEh;t$1kJT?V>)iac-V6B4ntZfPp2!~B0um7D#-J~^@o1c@~ zBeNHW7}G=up^;}51D7GGImxWLZ}`_Y!`CAmQ#gQQ^-a%3G(lsSDEqY2mgM!Na zf1XZybfnb1H3Id|p7-7d!Cffsc;5H1=M_&N@C28+vVTo-8vhi1r>un!p?wq1ugaRX z2Nzq={b(iac{sEQRXW4f_ zJpTXy010qNS#tmY3labT3lag+-G2N4001aSL_t(2Q)6Hl1z1Di&!0d4VHjBfNQ_{R mp(}#%DbftHm1sjqaXtW*VK+;iyrK{Q0000