MCPcopy Create free account
hub / github.com/ddnet/ddnet / AddFallbackFaceByName

Method AddFallbackFaceByName

src/engine/client/text.cpp:648–663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

646 }
647
648 bool AddFallbackFaceByName(const char *pFamilyName)
649 {
650 FT_Face Face = GetFaceByName(pFamilyName);
651 if(!Face)
652 {
653 log_error("textrender", "The fallback font face '%s' could not be found", pFamilyName);
654 return false;
655 }
656 if(std::find(m_vFallbackFaces.begin(), m_vFallbackFaces.end(), Face) != m_vFallbackFaces.end())
657 {
658 log_warn("textrender", "The fallback font face '%s' was specified multiple times", pFamilyName);
659 return true;
660 }
661 m_vFallbackFaces.push_back(Face);
662 return true;
663 }
664
665 bool SetVariantFaceByName(const char *pFamilyName)
666 {

Callers 1

LoadFontsMethod · 0.80

Calls 2

beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected