working on texts and fonts

This commit is contained in:
2024-10-27 01:14:07 +02:00
parent 3aaa5df929
commit 028cb57ff4
31 changed files with 414 additions and 187 deletions

View File

@@ -15,6 +15,9 @@ namespace mlx
bool FontRegistry::IsFontKnown(std::shared_ptr<Font> font)
{
return m_fonts_registry.find(font) != m_fonts_registry.end();
return std::find_if(m_fonts_registry.begin(), m_fonts_registry.end(), [&font](std::shared_ptr<Font> rhs)
{
return font->GetName() == rhs->GetName() && font->GetScale() == rhs->GetScale();
}) != m_fonts_registry.end();
}
}