Skip to content

Commit

Permalink
fix hotdox76v2 oled font to more closely mirror utf8 (#23807)
Browse files Browse the repository at this point in the history
  • Loading branch information
wdouglass authored Oct 11, 2024
1 parent f43c912 commit f0b5feb
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 112 deletions.
10 changes: 5 additions & 5 deletions keyboards/hotdox76v2/hotdox76v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ led_config_t g_led_config = {

#ifdef OLED_ENABLE

# define UNC (94 + 0x21)
# define UNC (' ')
typedef struct _master_to_slave_t {
int cur_alp_index;
char current_alp[7];
Expand Down Expand Up @@ -115,8 +115,8 @@ void render_layer_helper_fun(uint8_t start_line, const char *data, uint8_t gap_w
for (j = 0; j < l; ++j) { // font index
for (k = 0; k < 12; ++k) { // font byte index
// base + logo_w(32) + gap_w(12) +l*font_w(12)+current_byte_index
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);
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);
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);
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);
}
}
for (j = 0; j < gap_w; ++j) {
Expand Down Expand Up @@ -151,8 +151,8 @@ void render_cur_input_helper_fun(uint8_t start_line, const char *data, uint8_t g
for (j = 0; j < l; ++j) { // font index
for (k = 0; k < 12; ++k) { // font byte index
// base + logo_w(0) + gap_w(12) +l*font_w(12)+current_byte_index
oled_write_raw_byte(pgm_read_byte(&ext_big_font[data[j] - 0x21][k]), start_line * 2 * 128 + gap_w + j * 12 + k);
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);
oled_write_raw_byte(pgm_read_byte(&ext_big_font[data[j] - 0x20][k]), start_line * 2 * 128 + gap_w + j * 12 + k);
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);
}
}
for (j = 0; j < gap_w; ++j) {
Expand Down
Loading

0 comments on commit f0b5feb

Please sign in to comment.