MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / EnumFamCallBack

Function EnumFamCallBack

Engine/source/platformWin32/winFont.cpp:98–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96//-----------------------------------------------------------------------------
97
98BOOL CALLBACK EnumFamCallBack(LPLOGFONT logFont, LPNEWTEXTMETRIC textMetric, DWORD fontType, LPARAM lParam)
99{
100 if( !( fontType & TRUETYPE_FONTTYPE ) )
101 return true;
102
103 Vector<StringTableEntry>* fonts = (Vector< StringTableEntry>*)lParam;
104
105 const U32 len = dStrlen( logFont->lfFaceName ) * 3 + 1;
106 FrameTemp<UTF8> buffer( len );
107 convertUTF16toUTF8N( logFont->lfFaceName, buffer, len );
108
109 fonts->push_back( StringTable->insert( buffer ) );
110
111 return true;
112}
113
114void PlatformFont::enumeratePlatformFonts( Vector<StringTableEntry>& fonts, UTF16* fontFamily )
115{

Callers

nothing calls this directly

Calls 4

convertUTF16toUTF8NFunction · 0.85
dStrlenFunction · 0.50
push_backMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected