This commit is contained in:
2026-04-18 13:22:13 +02:00
parent 2e1a82ff40
commit 27f8b0ae36
21 changed files with 54 additions and 66 deletions

View File

@@ -80,27 +80,27 @@ void Text::loadFont(const char* fnt_file) {
// Elimina comentaris inline
auto comment_pos = line.find('#');
if (comment_pos != std::string::npos) {
line = line.substr(0, comment_pos);
line.resize(comment_pos);
}
// Parseja directives
if (line.find("box_width") == 0) {
if (line.starts_with("box_width")) {
sscanf(line.c_str(), "box_width %d", &box_width_);
continue;
}
if (line.find("box_height") == 0) {
if (line.starts_with("box_height")) {
sscanf(line.c_str(), "box_height %d", &box_height_);
continue;
}
if (line.find("columns") == 0) {
if (line.starts_with("columns")) {
sscanf(line.c_str(), "columns %d", &columns_);
continue;
}
if (line.find("cell_spacing") == 0) {
if (line.starts_with("cell_spacing")) {
sscanf(line.c_str(), "cell_spacing %d", &cell_spacing_);
continue;
}
if (line.find("row_spacing") == 0) {
if (line.starts_with("row_spacing")) {
sscanf(line.c_str(), "row_spacing %d", &row_spacing_);
continue;
}