kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Bitmap Fonts: Add final five chars.
rodzic
6a9bc8688f
commit
e4bde0985a
|
@ -99,7 +99,7 @@ static const char char_base[] = {
|
||||||
'A', // Ã - c3 83 - A + TILDE
|
'A', // Ã - c3 83 - A + TILDE
|
||||||
'A', // Ä - c3 84 - A + DIAERESIS
|
'A', // Ä - c3 84 - A + DIAERESIS
|
||||||
'A', // Å - c3 85 - A + RING ABOVE
|
'A', // Å - c3 85 - A + RING ABOVE
|
||||||
' ', // Æ - c3 86 - AE
|
'\x80', // Æ - c3 86 - AE
|
||||||
'C', // Ç - c3 87 - C + CEDILLA
|
'C', // Ç - c3 87 - C + CEDILLA
|
||||||
'E', // È - c3 88 - E + GRAVE
|
'E', // È - c3 88 - E + GRAVE
|
||||||
'E', // É - c3 89 - E + ACUTE
|
'E', // É - c3 89 - E + ACUTE
|
||||||
|
@ -123,15 +123,15 @@ static const char char_base[] = {
|
||||||
'U', // Û - c3 9b - U + CIRCUMFLEX
|
'U', // Û - c3 9b - U + CIRCUMFLEX
|
||||||
'U', // Ü - c3 9c - U + DIAERESIS
|
'U', // Ü - c3 9c - U + DIAERESIS
|
||||||
'Y', // Ý - c3 9d - Y + ACUTE
|
'Y', // Ý - c3 9d - Y + ACUTE
|
||||||
' ', // Þ - c3 9e - THORN
|
'\x81', // Þ - c3 9e - THORN
|
||||||
' ', // ß - c3 9f - SHARP S
|
'\x82', // ß - c3 9f - SHARP S
|
||||||
'a', // à - c3 a0 - A + GRAVE
|
'a', // à - c3 a0 - A + GRAVE
|
||||||
'a', // á - c3 a1 - A + ACUTE
|
'a', // á - c3 a1 - A + ACUTE
|
||||||
'a', // â - c3 a2 - A + CIRCUMFLEX
|
'a', // â - c3 a2 - A + CIRCUMFLEX
|
||||||
'a', // ã - c3 a3 - A + TILDE
|
'a', // ã - c3 a3 - A + TILDE
|
||||||
'a', // ä - c3 a4 - A + DIAERESIS
|
'a', // ä - c3 a4 - A + DIAERESIS
|
||||||
'a', // å - c3 a5 - A + RING ABOVE
|
'a', // å - c3 a5 - A + RING ABOVE
|
||||||
' ', // æ - c3 a6 - AE
|
'\x83', // æ - c3 a6 - AE
|
||||||
'c', // ç - c3 a7 - C + CEDILLA
|
'c', // ç - c3 a7 - C + CEDILLA
|
||||||
'e', // è - c3 a8 - E + GRAVE
|
'e', // è - c3 a8 - E + GRAVE
|
||||||
'e', // é - c3 a9 - E + ACUTE
|
'e', // é - c3 a9 - E + ACUTE
|
||||||
|
@ -155,7 +155,7 @@ static const char char_base[] = {
|
||||||
'u', // û - c3 bb - U + CIRCUMFLEX
|
'u', // û - c3 bb - U + CIRCUMFLEX
|
||||||
'u', // ü - c3 bc - U + DIAERESIS
|
'u', // ü - c3 bc - U + DIAERESIS
|
||||||
'y', // ý - c3 bd - Y + ACUTE
|
'y', // ý - c3 bd - Y + ACUTE
|
||||||
' ', // þ - c3 be - THORN
|
'\x84', // þ - c3 be - THORN
|
||||||
'y', // ÿ - c3 bf - Y + DIAERESIS
|
'y', // ÿ - c3 bf - Y + DIAERESIS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace bitmap {
|
||||||
char_index -= 32;
|
char_index -= 32;
|
||||||
|
|
||||||
const uint8_t *d = &font->data[char_index * font->max_width];
|
const uint8_t *d = &font->data[char_index * font->max_width];
|
||||||
const uint8_t *a = &font->data[96 * font->max_width + char_accent * font->max_width];
|
const uint8_t *a = &font->data[101 * font->max_width + char_accent * font->max_width];
|
||||||
|
|
||||||
// Vertical offset of our char within the 32 pixel column canvas
|
// Vertical offset of our char within the 32 pixel column canvas
|
||||||
// At 16 pixels this gives us 8 pixels above and below the char for accents and spacing.
|
// At 16 pixels this gives us 8 pixels above and below the char for accents and spacing.
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace bitmap {
|
||||||
const uint8_t accent_offset_upper; // Number of pixels to shift accents UP above uppercase letters
|
const uint8_t accent_offset_upper; // Number of pixels to shift accents UP above uppercase letters
|
||||||
const uint8_t accent_offset_lower; // Number of pixels to shift accents UP above lowercase letters
|
const uint8_t accent_offset_lower; // Number of pixels to shift accents UP above lowercase letters
|
||||||
const uint8_t accent_offset_below; // Number of pixels to shift accents DOWN below lowercase letters (height of the cedilla accent)
|
const uint8_t accent_offset_below; // Number of pixels to shift accents DOWN below lowercase letters (height of the cedilla accent)
|
||||||
const uint8_t widths[96];
|
const uint8_t widths[96 + 5]; // 96 printable ASCII chars plus 5 exta we can't easily remap and decorate with accents
|
||||||
const uint8_t data[];
|
const uint8_t data[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,8 @@ const bitmap::font_t font6 {
|
||||||
7, 6, 6, 5, 6, 5, 5, 6, 5, 4, 5, 5, 5, 6, 6, 6,
|
7, 6, 6, 5, 6, 5, 5, 6, 5, 4, 5, 5, 5, 6, 6, 6,
|
||||||
6, 6, 6, 5, 6, 6, 6, 6, 5, 5, 5, 3, 4, 3, 4, 4,
|
6, 6, 6, 5, 6, 6, 6, 6, 5, 5, 5, 3, 4, 3, 4, 4,
|
||||||
3, 6, 6, 5, 6, 5, 5, 6, 5, 4, 5, 5, 5, 6, 6, 6,
|
3, 6, 6, 5, 6, 5, 5, 6, 5, 4, 5, 5, 5, 6, 6, 6,
|
||||||
6, 6, 6, 5, 6, 6, 6, 6, 5, 5, 5, 4, 2, 4, 4, 2
|
6, 6, 6, 5, 6, 6, 6, 6, 5, 5, 5, 4, 2, 4, 4, 2,
|
||||||
|
6, 6, 6, 6, 6 // Extra
|
||||||
},
|
},
|
||||||
.data = {
|
.data = {
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00, //
|
0x00,0x00,0x00,0x00,0x00,0x00, //
|
||||||
|
@ -113,13 +114,19 @@ const bitmap::font_t font6 {
|
||||||
0x22,0x3e,0x08,0x00,0x00,0x00, // }
|
0x22,0x3e,0x08,0x00,0x00,0x00, // }
|
||||||
0x04,0x02,0x02,0x00,0x00,0x00, // ~
|
0x04,0x02,0x02,0x00,0x00,0x00, // ~
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
|
// Extra
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // Æ
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // Þ
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // ß
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // æ
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // þ
|
||||||
// Accents
|
// Accents
|
||||||
0x00,0x00,0x01,0x02,0x00,0x00, // Grave
|
0x00,0x00,0x01,0x02,0x00,0x00, // Grave
|
||||||
0x00,0x00,0x02,0x01,0x00,0x00, // Acute
|
0x00,0x00,0x02,0x01,0x00,0x00, // Acute
|
||||||
0x00,0x02,0x01,0x02,0x00,0x00, // Circumflex
|
0x00,0x02,0x01,0x02,0x00,0x00, // Circumflex
|
||||||
0x00,0x01,0x02,0x01,0x02,0x00, // Tilde
|
0x00,0x01,0x02,0x01,0x02,0x00, // Tilde
|
||||||
0x00,0x01,0x00,0x01,0x00,0x00, // Diaresis
|
0x00,0x01,0x00,0x01,0x00,0x00, // Diaresis
|
||||||
0x00,0x06,0x09,0x06,0x00,0x00, // Ring Above
|
0x00,0x02,0x05,0x02,0x00,0x00, // Ring Above
|
||||||
0x00,0x40,0x20,0x10,0x00,0x00, // Stroke
|
0x00,0x40,0x20,0x10,0x00,0x00, // Stroke
|
||||||
0x00,0x00,0x28,0x10,0x00,0x00 // Cedilla
|
0x00,0x00,0x28,0x10,0x00,0x00 // Cedilla
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,8 @@ const bitmap::font_t font8 {
|
||||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 6, 5, 5,
|
5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 6, 5, 5,
|
||||||
5, 5, 5, 5, 6, 5, 5, 6, 5, 5, 5, 3, 5, 3, 4, 4,
|
5, 5, 5, 5, 6, 5, 5, 6, 5, 5, 5, 3, 5, 3, 4, 4,
|
||||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 4, 6, 5, 5,
|
5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 4, 6, 5, 5,
|
||||||
5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 4, 2, 4, 5, 2
|
5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 4, 2, 4, 5, 2,
|
||||||
|
6, 5, 5, 6, 5 // Extra
|
||||||
},
|
},
|
||||||
.data = {
|
.data = {
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00, //
|
0x00,0x00,0x00,0x00,0x00,0x00, //
|
||||||
|
@ -113,13 +114,19 @@ const bitmap::font_t font8 {
|
||||||
0x41,0x3e,0x08,0x00,0x00,0x00, // }
|
0x41,0x3e,0x08,0x00,0x00,0x00, // }
|
||||||
0x08,0x04,0x08,0x04,0x00,0x00, // ~
|
0x08,0x04,0x08,0x04,0x00,0x00, // ~
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
|
// Extra
|
||||||
|
0x7e,0x09,0x7f,0x49,0x49,0x00, // Æ
|
||||||
|
0x7e,0x24,0x24,0x18,0x00,0x00, // Þ
|
||||||
|
0x7e,0x09,0x49,0x36,0x00,0x00, // ß
|
||||||
|
0x20,0x54,0x78,0x54,0x58,0x00, // æ
|
||||||
|
0x7f,0x24,0x24,0x18,0x00,0x00, // þ
|
||||||
// Accents
|
// Accents
|
||||||
0x00,0x00,0x01,0x02,0x00,0x00, // Grave
|
0x00,0x00,0x01,0x02,0x00,0x00, // Grave
|
||||||
0x00,0x00,0x02,0x01,0x00,0x00, // Acute
|
0x00,0x00,0x02,0x01,0x00,0x00, // Acute
|
||||||
0x00,0x02,0x01,0x02,0x00,0x00, // Circumflex
|
0x00,0x02,0x01,0x02,0x00,0x00, // Circumflex
|
||||||
0x00,0x01,0x02,0x01,0x02,0x00, // Tilde
|
0x00,0x01,0x02,0x01,0x02,0x00, // Tilde
|
||||||
0x00,0x01,0x00,0x01,0x00,0x00, // Diaresis
|
0x00,0x01,0x00,0x01,0x00,0x00, // Diaresis
|
||||||
0x00,0x06,0x09,0x06,0x00,0x00, // Ring Above
|
0x00,0x02,0x05,0x02,0x00,0x00, // Ring Above
|
||||||
0x00,0x40,0x20,0x00,0x00,0x00, // Stroke
|
0x00,0x40,0x20,0x00,0x00,0x00, // Stroke
|
||||||
0x00,0x00,0xa0,0x40,0x00,0x00 // Cedilla
|
0x00,0x00,0xa0,0x40,0x00,0x00 // Cedilla
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue