| 686 | } |
| 687 | |
| 688 | static void processString(RenderTarget& rt, std::string_view text, TextDrawInfo& info) |
| 689 | { |
| 690 | if (info.textDrawFlags.has(TextDrawFlag::noFormatting)) |
| 691 | { |
| 692 | processStringLiteral(rt, text, info); |
| 693 | info.max.x = std::max(info.max.x, info.current.x); |
| 694 | info.max.y = std::max(info.max.y, info.current.y); |
| 695 | } |
| 696 | else |
| 697 | { |
| 698 | FmtString fmt(text); |
| 699 | for (const auto& token : fmt) |
| 700 | { |
| 701 | if (token.IsLiteral()) |
| 702 | { |
| 703 | processStringLiteral(rt, token.text, info); |
| 704 | } |
| 705 | else if (token.IsCodepoint()) |
| 706 | { |
| 707 | auto codepoint = token.GetCodepoint(); |
| 708 | processStringCodepoint(rt, codepoint, info); |
| 709 | } |
| 710 | else |
| 711 | { |
| 712 | processFormatCode(rt, token, info); |
| 713 | } |
| 714 | info.max.x = std::max(info.max.x, info.current.x); |
| 715 | info.max.y = std::max(info.max.y, info.current.y); |
| 716 | } |
| 717 | } |
| 718 | } |
| 719 | |
| 720 | static void processInitialColour(ColourWithFlags colour, TextDrawInfo& info) |
| 721 | { |
no test coverage detected