MCPcopy Create free account
hub / github.com/defold/defold / NextBreak

Function NextBreak

engine/font/src/text_layout_legacy.cpp:34–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32static const uint32_t CHAR_FALLBACK = '~'; // 126
33
34static inline uint32_t NextBreak(TextGlyph* glyphs, uint32_t num_glyphs, uint32_t* cursor, uint32_t* n)
35{
36 uint32_t c = 0;
37 do
38 {
39 c = (*cursor) < num_glyphs ? glyphs[(*cursor)++].m_Codepoint : 0;
40 if (c != 0)
41 *n = *n + 1;
42 } while (c != 0 && !dmUtf8::IsBreaking(c));
43 return c;
44}
45
46static inline uint32_t SkipWS(TextGlyph* glyphs, uint32_t num_glyphs, uint32_t* cursor, uint32_t* n)
47{

Callers 1

LayoutFunction · 0.70

Calls 1

IsBreakingFunction · 0.50

Tested by

no test coverage detected