lithium: Fix text Spacing

This commit is contained in:
2025-10-21 08:55:51 +02:00
parent 0ecf559fbb
commit c2bff368d4

View File

@@ -224,7 +224,7 @@ PD_LITHIUM_API fvec2 Font::GetTextBounds(const std::string &text, float scale) {
x += 16 * cfs; x += 16 * cfs;
break; break;
case L' ': case L' ':
x += 16 * cfs; x += 4 * cfs;
// Fall trough here to get the same result as in // Fall trough here to get the same result as in
// TextCommand if/else Section // TextCommand if/else Section
default: default:
@@ -305,7 +305,7 @@ PD_LITHIUM_API void Font::CmdTextEx(std::vector<Command::Ref> &cmds,
Renderer::CmdQuad(cmd.get(), rec, cp.SimpleUV, color); Renderer::CmdQuad(cmd.get(), rec, cp.SimpleUV, color);
off.x += cp.Size.x * cfs + 2 * cfs; off.x += cp.Size.x * cfs + 2 * cfs;
} else { } else {
off.x += 16 * cfs; off.x += 4 * cfs;
} }
} }
} }
@@ -316,4 +316,4 @@ PD_LITHIUM_API void Font::CmdTextEx(std::vector<Command::Ref> &cmds,
} }
} // namespace Li } // namespace Li
} // namespace PD } // namespace PD