MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / get_height

Method get_height

modules/gui/gui/src/backend/text_server/font.cpp:150–162  ·  view source on GitHub ↗

Drawing string.

Source from the content-addressed store, hash-verified

148
149// Drawing string.
150real_t Font::get_height(int p_font_size) const
151{
152 if (dirty_rids)
153 {
154 _update_rids();
155 }
156 real_t ret = 0.f;
157 for (int i = 0; i < rids.size(); i++)
158 {
159 ret = (real_t)MAX(ret, TS->font_get_ascent(rids[i], p_font_size) + TS->font_get_descent(rids[i], p_font_size));
160 }
161 return ret + get_spacing(TextServer::SPACING_BOTTOM) + get_spacing(TextServer::SPACING_TOP);
162}
163
164real_t Font::get_ascent(int p_font_size) const
165{

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected