From 52dae03aae84afa78a9dbfc68976e99fd1b20ee2 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Mon, 22 Apr 2024 08:17:10 +1000 Subject: Add UnifontEx fallback for glyphs that are missing from the current font --- source/core/StarFont.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/core/StarFont.cpp') 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 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); +} + } -- cgit v1.2.3