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

Method add_string

modules/gui/gui/src/backend/text_server/text_line.cpp:159–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159bool TextLine::add_string(const String& p_text, const Ref<Font>& p_font, int p_font_size, const String& p_language, const Variant& p_meta)
160{
161 ERR_FAIL_COND_V(p_font.is_null(), false);
162 bool res = TS->shaped_text_add_string(rid, p_text, p_font->get_rids(), p_font_size, p_font->get_opentype_features(), p_language, p_meta);
163 for (int i = 0; i < TextServer::SPACING_MAX; i++)
164 {
165 TS->shaped_text_set_spacing(rid, TextServer::SpacingType(i), p_font->get_spacing(TextServer::SpacingType(i)));
166 }
167 dirty = true;
168 return res;
169}
170
171bool TextLine::add_object(Variant p_key, const Size2& p_size, InlineAlignment p_inline_align, int p_length, float p_baseline)
172{

Callers 7

get_string_sizeMethod · 0.45
draw_stringMethod · 0.45
draw_multiline_stringMethod · 0.45
draw_string_outlineMethod · 0.45
buildMethod · 0.45

Calls 5

SpacingTypeEnum · 0.85
get_ridsMethod · 0.80
get_opentype_featuresMethod · 0.80
get_spacingMethod · 0.80
is_nullMethod · 0.45

Tested by

no test coverage detected