Add new smooth Hobo font

This commit is contained in:
Kae 2023-08-04 00:21:24 +10:00
parent 722488a9ab
commit dcc15a8103
5 changed files with 22361 additions and 2 deletions

2
.gitignore vendored
View File

@ -2,7 +2,7 @@ build/
dist/
enc_temp_folder/
.cache/
attic/
attic/chucklefish/
tiled/
assets/user/
assets/devel/

Binary file not shown.

BIN
assets/opensb/hobo.ttf Normal file

Binary file not shown.

22359
attic/HoboSabien.sfd Normal file

File diff suppressed because it is too large Load Diff

View File

@ -79,7 +79,7 @@ unsigned Font::width(String::Char c) {
return *width;
} else {
FT_Load_Char(m_fontImpl->face, c, FontLoadFlags);
unsigned newWidth = (m_fontImpl->face->glyph->advance.x + 32) / 64;
unsigned newWidth = (m_fontImpl->face->glyph->linearHoriAdvance + 32768) / 65536;
m_widthCache.insert({c, m_pixelSize}, newWidth);
return newWidth;
}