MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IsConsumedFormattingCode

Function IsConsumedFormattingCode

src/gfx_layout.cpp:221–229  ·  view source on GitHub ↗

* Test whether a character is a non-printable formatting code */

Source from the content-addressed store, hash-verified

219 * Test whether a character is a non-printable formatting code
220 */
221static bool IsConsumedFormattingCode(char32_t ch)
222{
223 if (ch >= SCC_BLUE && ch <= SCC_BLACK) return true;
224 if (ch == SCC_PUSH_COLOUR) return true;
225 if (ch == SCC_POP_COLOUR) return true;
226 if (ch >= SCC_FIRST_FONT && ch <= SCC_LAST_FONT) return true;
227 /* All other characters defined in Unicode standard are assumed to be non-consumed. */
228 return false;
229}
230
231/**
232 * Get the position of a character in the layout.

Callers 2

GetCharPositionMethod · 0.85
GetCharAtPositionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected