no colon in font formatted text

This commit is contained in:
Jindra Petk
2013-04-28 14:33:15 +02:00
parent 508c5aaacf
commit 7eec295460
4 changed files with 695 additions and 741 deletions

View File

@@ -101,7 +101,7 @@ public class DefineText2Tag extends CharacterTag implements BoundedTag, TextTag
}
}
}
ret += "[font " + rec.fontId + " height:" + rec.textHeight + "]";
ret += "[font " + rec.fontId + " height " + rec.textHeight + "]";
}
if (rec.styleFlagsHasColor) {
ret += "[color " + rec.textColorA.toHexARGB() + "]";

View File

@@ -96,7 +96,7 @@ public class DefineTextTag extends CharacterTag implements BoundedTag, TextTag {
}
}
}
ret += "[font " + rec.fontId + " height:" + rec.textHeight + "]";
ret += "[font " + rec.fontId + " height " + rec.textHeight + "]";
}
if (rec.styleFlagsHasColor) {
ret += "[color " + rec.textColor.toHexRGB() + "]";

File diff suppressed because it is too large Load Diff

View File

@@ -45,7 +45,7 @@ NegativeNumber = - {PositiveNumber}
Number = {PositiveNumber}|{NegativeNumber}
Hex = [0-9a-f][0-9a-f]
Font = "[font " {PositiveNumber} " height:" {PositiveNumber} "]"
Font = "[font " {PositiveNumber} " height " {PositiveNumber} "]"
Color = "[color #" {Hex}{Hex}{Hex} "]"
ColorA = "[color #" {Hex}{Hex}{Hex}{Hex} "]"
X = "[x " {Number} "]"
@@ -57,7 +57,7 @@ Y = "[y " {Number} "]"
<YYINITIAL> {
{Font} {
if(string==null){
Pattern pat = Pattern.compile("\\[font ([0-9]+) height:([0-9]+)\\]");
Pattern pat = Pattern.compile("\\[font ([0-9]+) height ([0-9]+)\\]");
Matcher m=pat.matcher(yytext());
if(m.matches()){
return new ParsedSymbol(SymbolType.FONT,Integer.parseInt(m.group(1)),Integer.parseInt(m.group(2)));