MCPcopy Create free account
hub / github.com/SFML/SFML / getDescent

Method getDescent

src/SFML/Graphics/Font.cpp:345–358  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

343
344////////////////////////////////////////////////////////////
345float Font::getDescent(unsigned int characterSize) const
346{
347 FT_Face face = m_fontHandles ? m_fontHandles->face : nullptr;
348
349 if (face && setCurrentSize(characterSize))
350 {
351 if (!FT_IS_SCALABLE(face))
352 return static_cast<float>(face->size->metrics.descender) / float{1 << 6};
353
354 return static_cast<float>(FT_MulFix(face->descender, face->size->metrics.y_scale)) / float{1 << 6};
355 }
356
357 return 0.f;
358}
359
360
361////////////////////////////////////////////////////////////

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected