MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ is_control()

MAYAFLUX_API bool MayaFlux::Portal::Text::is_control ( uint32_t  codepoint)
noexcept

True if a codepoint must never be rasterized or treated as printable content.

Covers Unicode categories Cc (control), Cf (format), Cs (surrogate), and Co (private use) via utf8proc_category(). This is the one fact every Portal::Text consumer (layout, raw-string editing) shares about a codepoint; what each does in response - skip, reposition a pen, refuse an insertion - is theirs to decide.

Parameters
codepointUnicode codepoint to classify.
Returns
true if the codepoint must never produce a glyph.

Definition at line 9 of file TypeSetter.cpp.

10{
11 switch (utf8proc_category(static_cast<utf8proc_int32_t>(codepoint))) {
12 case UTF8PROC_CATEGORY_CC:
13 case UTF8PROC_CATEGORY_CF:
14 case UTF8PROC_CATEGORY_CS:
15 case UTF8PROC_CATEGORY_CO:
16 return true;
17 default:
18 return false;
19 }
20}

Referenced by insert_codepoint(), and lay_out().

+ Here is the caller graph for this function: