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

Method TextLine

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

Source from the content-addressed store, hash-verified

498}
499
500TextLine::TextLine(const String& p_text, const Ref<Font>& p_font, int p_font_size, const String& p_language, TextServer::Direction p_direction, TextServer::Orientation p_orientation)
501{
502 rid = TS->create_shaped_text(p_direction, p_orientation);
503 if (p_font.is_valid())
504 {
505 TS->shaped_text_add_string(rid, p_text, p_font->get_rids(), p_font_size, p_font->get_opentype_features(), p_language);
506 for (int i = 0; i < TextServer::SPACING_MAX; i++)
507 {
508 TS->shaped_text_set_spacing(rid, TextServer::SpacingType(i), p_font->get_spacing(TextServer::SpacingType(i)));
509 }
510 }
511}
512
513TextLine::TextLine()
514{

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected