6#include "fifechan/font.hpp"
13#include "fifechan/platform.hpp"
19 assert(
"x must be non-negative" && x >= 0);
21 for (
unsigned int i = 0; i < text.size(); ++i) {
22 if (
getWidth(text.substr(0, i)) > x) {
virtual int getWidth(std::string const &text) const =0
Gets the width of a string.
virtual int getStringIndexAt(std::string const &text, int x) const
Gets a string index in a string providing an x coordinate.
Used replacement tokens by configure_file():