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

Method SetVariantFaceByName

src/engine/client/text.cpp:665–679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

663 }
664
665 bool SetVariantFaceByName(const char *pFamilyName)
666 {
667 FT_Face Face = GetFaceByName(pFamilyName);
668 if(m_VariantFace != Face)
669 {
670 m_VariantFace = Face;
671 Clear(); // rebuild atlas after changing variant font
672 if(!Face && pFamilyName != nullptr)
673 {
674 log_error("textrender", "The variant font face '%s' could not be found", pFamilyName);
675 return false;
676 }
677 }
678 return true;
679 }
680
681 void SetFontPreset(EFontPreset FontPreset)
682 {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected