mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
fixed splitting in symbol font
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@138 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -144,10 +144,10 @@ void SymbolFont::split(const String& text, SplitSymbols& out) const {
|
|||||||
for (size_t pos = 0 ; pos < text.size() ; ) {
|
for (size_t pos = 0 ; pos < text.size() ; ) {
|
||||||
// 1. check merged numbers
|
// 1. check merged numbers
|
||||||
if (merge_numbers && pos + 1 < text.size()) {
|
if (merge_numbers && pos + 1 < text.size()) {
|
||||||
size_t num_count = text.find_first_not_of(_("0123456789"), pos);
|
size_t num_count = text.find_first_not_of(_("0123456789"), pos) - pos;
|
||||||
if (num_count >= 2) {
|
if (num_count >= 2) {
|
||||||
// draw single symbol for the whole number
|
// draw single symbol for the whole number
|
||||||
out.push_back(DrawableSymbol(text.substr(0, num_count), 0));
|
out.push_back(DrawableSymbol(text.substr(pos, num_count), nullptr));
|
||||||
pos += num_count;
|
pos += num_count;
|
||||||
goto next_symbol;
|
goto next_symbol;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user