MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetMSDF

Method GetMSDF

Source/Engine/Render2D/FontAsset.cpp:159–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159FontAsset* FontAsset::GetMSDF()
160{
161 ScopeLock lock(Locker);
162 if (_options.RasterMode == FontRasterMode::MSDF)
163 return this;
164 if (!_virtualMSDF)
165 {
166 _virtualMSDF = Content::CreateVirtualAsset<FontAsset>();
167 _virtualMSDF->Init(_fontFile);
168 auto options = _options;
169 options.RasterMode = FontRasterMode::MSDF;
170 _virtualMSDF->SetOptions(options);
171 }
172 return _virtualMSDF;
173}
174
175bool FontAsset::Init(const BytesContainer& fontFile)
176{

Callers 1

GetCharacterMethod · 0.80

Calls 2

InitMethod · 0.45
SetOptionsMethod · 0.45

Tested by

no test coverage detected