Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarFont.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-04-22 08:17:10 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-04-22 08:17:10 +1000
commit52dae03aae84afa78a9dbfc68976e99fd1b20ee2 (patch)
tree90977a5c89733bbe98f8257ae520ceb9f69bd6cd /source/core/StarFont.cpp
parentca1426eabc873f781eb0dd389d45634b7d183250 (diff)
Add UnifontEx fallback for glyphs that are missing from the current font
Diffstat (limited to 'source/core/StarFont.cpp')
-rw-r--r--source/core/StarFont.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/core/StarFont.cpp b/source/core/StarFont.cpp
index 63356ad..b21b85a 100644
--- a/source/core/StarFont.cpp
+++ b/source/core/StarFont.cpp
@@ -133,4 +133,8 @@ std::pair<Image, Vec2I> Font::render(String::Char c) {
return { std::move(image), {slot->bitmap_left - 1, (slot->bitmap_top - height) + (m_pixelSize / 4) - 1} };
}
+bool Font::exists(String::Char c) {
+ return FT_Get_Char_Index(m_fontImpl->face, c);
+}
+
}