| 753 | } |
| 754 | |
| 755 | TextColours ttfDrawString( |
| 756 | RenderTarget& rt, u8string_view text, ColourWithFlags colour, const ScreenCoordsXY& coords, bool noFormatting, |
| 757 | FontStyle fontStyle, TextDarkness darkness) |
| 758 | { |
| 759 | TextDrawInfo info{}; |
| 760 | info.fontStyle = fontStyle; |
| 761 | info.start = coords; |
| 762 | info.current = coords; |
| 763 | info.darkness = darkness; |
| 764 | |
| 765 | if (LocalisationService_UseTrueTypeFont()) |
| 766 | { |
| 767 | info.textDrawFlags.set(TextDrawFlag::ttf); |
| 768 | } |
| 769 | |
| 770 | if (noFormatting) |
| 771 | { |
| 772 | info.textDrawFlags.set(TextDrawFlag::noFormatting); |
| 773 | } |
| 774 | |
| 775 | info.palette = _savedTextPalette; |
| 776 | processInitialColour(colour, info); |
| 777 | processString(rt, text, info); |
| 778 | _savedTextPalette = info.palette; |
| 779 | |
| 780 | rt.lastStringPos = info.current; |
| 781 | |
| 782 | return info.palette; |
| 783 | } |
| 784 | |
| 785 | int32_t getStringWidth(std::string_view text, FontStyle fontStyle, bool noFormatting) |
| 786 | { |
no test coverage detected