Add tilde to sprite font

This commit is contained in:
Michael Steenbeek 2022-02-06 21:08:40 +01:00 committed by GitHub
parent 866ad2c016
commit 6d229eb9d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

View File

@ -1095,6 +1095,12 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/tilde-small.png",
"y_offset": 3,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/latin/ae-uc-bold.png",
"y_offset": 0,
@ -1688,6 +1694,12 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/tilde-bold.png",
"y_offset": 2,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/latin/ae-uc-tiny.png",
"y_offset": 0,
@ -2288,6 +2300,12 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/tilde-tiny.png",
"y_offset": 1,
"palette": "keep",
"forceBmp": true
},
{
"path": "support/flat_to_steep_1_1.png",
"x_offset": -32,

View File

@ -183,6 +183,7 @@ static const std::unordered_map<char32_t, int32_t> codepointOffsetMap = {
{ UnicodeChar::left_brace, SPR_G2_LEFT_BRACE - SPR_CHAR_START },
{ UnicodeChar::vertical_bar, SPR_G2_VERTICAL_BAR - SPR_CHAR_START },
{ UnicodeChar::right_brace, SPR_G2_RIGHT_BRACE - SPR_CHAR_START },
{ UnicodeChar::tilde, SPR_G2_TILDE - SPR_CHAR_START },
{ UnicodeChar::non_breaking_space, ' ' - CS_SPRITE_FONT_OFFSET },
{ UnicodeChar::interpunct, SPR_G2_INTERPUNCT - SPR_CHAR_START },
{ UnicodeChar::multiplication_sign, CSChar::cross - CS_SPRITE_FONT_OFFSET },

View File

@ -281,6 +281,7 @@ namespace UnicodeChar
constexpr char32_t left_brace = 0x7B;
constexpr char32_t vertical_bar = 0x7C;
constexpr char32_t right_brace = 0x7D;
constexpr char32_t tilde = 0x7E;
constexpr char32_t non_breaking_space = 0xA0;
constexpr char32_t leftguillemet = 0xAB;
constexpr char32_t rightguillemet = 0xBB;

View File

@ -1014,8 +1014,9 @@ enum
SPR_G2_LEFT_BRACE,
SPR_G2_VERTICAL_BAR,
SPR_G2_RIGHT_BRACE,
SPR_G2_TILDE,
SPR_G2_GLYPH_COUNT = (SPR_G2_RIGHT_BRACE - SPR_G2_CHAR_BEGIN) + 1,
SPR_G2_GLYPH_COUNT = (SPR_G2_TILDE - SPR_G2_CHAR_BEGIN) + 1,
SPR_G2_CHAR_END = SPR_G2_CHAR_BEGIN + SPR_G2_GLYPH_COUNT * 3,
SPR_G2_SUPPORT_BEGIN = SPR_G2_CHAR_END,