MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / parse_next_text_jot

Function parse_next_text_jot

src/SB/Core/x/xFont.cpp:890–923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

888 }
889
890 const char* parse_next_text_jot(xtextbox::jot& a, const xtextbox& tb, const xtextbox& ctb,
891 const char* text, size_t text_size)
892 {
893 char c = text[0];
894
895 a.s.text = text;
896 a.s.size = 1;
897 a.flag.merge = true;
898
899 if (c == '\n')
900 {
901 a.flag.line_break = true;
902 }
903 else if (c == '\t')
904 {
905 a.flag.tab = true;
906 }
907 else if (c == '-')
908 {
909 a.flag.word_end = true;
910 }
911
912 if (is_ws(c))
913 {
914 a.flag.invisible = a.flag.word_break = true;
915 }
916
917 a.bounds = tb.font.bounds(c);
918 a.cb = &xtextbox::text_cb;
919 a.context = NULL;
920 a.context_size = 0;
921
922 return a.s.text + a.s.size;
923 }
924
925 const char* parse_next_jot(xtextbox::jot& a, const xtextbox& tb, const xtextbox& ctb,
926 const char* text, size_t text_size)

Callers 1

parse_next_jotFunction · 0.70

Calls 2

is_wsFunction · 0.85
boundsMethod · 0.80

Tested by

no test coverage detected