Skip to content

Commit f0b5feb

Browse files
authored
fix hotdox76v2 oled font to more closely mirror utf8 (qmk#23807)
1 parent f43c912 commit f0b5feb

File tree

2 files changed

+112
-112
lines changed

2 files changed

+112
-112
lines changed

keyboards/hotdox76v2/hotdox76v2.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ led_config_t g_led_config = {
6060

6161
#ifdef OLED_ENABLE
6262

63-
# define UNC (94 + 0x21)
63+
# define UNC (' ')
6464
typedef struct _master_to_slave_t {
6565
int cur_alp_index;
6666
char current_alp[7];
@@ -115,8 +115,8 @@ void render_layer_helper_fun(uint8_t start_line, const char *data, uint8_t gap_w
115115
for (j = 0; j < l; ++j) { // font index
116116
for (k = 0; k < 12; ++k) { // font byte index
117117
// base + logo_w(32) + gap_w(12) +l*font_w(12)+current_byte_index
118-
oled_write_raw_byte(pgm_read_byte(&ext_big_font[pgm_read_byte(&data[j]) - 0x21][k]), start_line * 2 * 128 + 32 + gap_w + j * 12 + k);
119-
oled_write_raw_byte(pgm_read_byte(&ext_big_font[pgm_read_byte(&data[j]) - 0x21][k + 12]), start_line * 2 * 128 + 128 + 32 + gap_w + j * 12 + k);
118+
oled_write_raw_byte(pgm_read_byte(&ext_big_font[pgm_read_byte(&data[j]) - 0x20][k]), start_line * 2 * 128 + 32 + gap_w + j * 12 + k);
119+
oled_write_raw_byte(pgm_read_byte(&ext_big_font[pgm_read_byte(&data[j]) - 0x20][k + 12]), start_line * 2 * 128 + 128 + 32 + gap_w + j * 12 + k);
120120
}
121121
}
122122
for (j = 0; j < gap_w; ++j) {
@@ -151,8 +151,8 @@ void render_cur_input_helper_fun(uint8_t start_line, const char *data, uint8_t g
151151
for (j = 0; j < l; ++j) { // font index
152152
for (k = 0; k < 12; ++k) { // font byte index
153153
// base + logo_w(0) + gap_w(12) +l*font_w(12)+current_byte_index
154-
oled_write_raw_byte(pgm_read_byte(&ext_big_font[data[j] - 0x21][k]), start_line * 2 * 128 + gap_w + j * 12 + k);
155-
oled_write_raw_byte(pgm_read_byte(&ext_big_font[data[j] - 0x21][12 + k]), start_line * 2 * 128 + 128 + gap_w + j * 12 + k);
154+
oled_write_raw_byte(pgm_read_byte(&ext_big_font[data[j] - 0x20][k]), start_line * 2 * 128 + gap_w + j * 12 + k);
155+
oled_write_raw_byte(pgm_read_byte(&ext_big_font[data[j] - 0x20][12 + k]), start_line * 2 * 128 + 128 + gap_w + j * 12 + k);
156156
}
157157
}
158158
for (j = 0; j < gap_w; ++j) {

0 commit comments

Comments
 (0)