kopia lustrzana https://github.com/backface/turtlestitch
fix issues with asteroid font and make it look better
rodzic
a2926a51b7
commit
a91eacdcc3
|
@ -4,11 +4,11 @@
|
|||
"2": [ [0,12], [8,12], [8,7], [0,5], [0,0], [8,0], "FONT_LAST" ],
|
||||
"3": [ [0,12], [8,12], [8,0], [0,0], "FONT_UP", [0,6], [8,6], "FONT_LAST" ],
|
||||
"4": [ [0,12], [0,6], [8,6], "FONT_UP", [8,12], [8,0], "FONT_LAST" ],
|
||||
"5": [ [0,0], [8,0], [8,6], [0,7], [0,12], [8,12], "FONT_LAST" ],
|
||||
"6": [ [0,12], [0,0], [8,0], [8,5], [0,7], "FONT_LAST" ],
|
||||
"5": [ [0,0], [8,0], [8,5], [0,6], [0,12], [8,12], "FONT_LAST" ],
|
||||
"6": [ [0,12], [0,0], [8,0], [8,6], [0,6], "FONT_LAST" ],
|
||||
"7": [ [0,12], [8,12], [8,6], [4,0], "FONT_LAST" ],
|
||||
"8": [ [0,0], [8,0], [8,12], [0,12], [0,0], "FONT_UP", [0,6], [8,6], "FONT_LAST" ],
|
||||
"9": [ [8,0], [8,12], [0,12], [0,7], [8,5], "FONT_LAST" ],
|
||||
"9": [ [8,0], [8,12], [0,12], [0,6], [8,6], "FONT_LAST" ],
|
||||
" ": [ "FONT_LAST", "FONT_LAST" ],
|
||||
".": [ [3,0], [4,0], "FONT_LAST" ],
|
||||
",": [ [2,0], [4,2], "FONT_LAST" ],
|
||||
|
@ -43,12 +43,12 @@
|
|||
"~": [ [0,4], [2,8], [6,4], [8,8], "FONT_LAST" ],
|
||||
"?": [ [0,8], [4,12], [8,8], [4,4], "FONT_UP", [4,1], [4,0], "FONT_LAST" ],
|
||||
"A": [ [0,0], [0,8], [4,12], [8,8], [8,0], "FONT_UP", [0,4], [8,4], "FONT_LAST" ],
|
||||
"B": [ [0,0], [0,12], [4,12], [8,10], [4,6], [8,2], [4,0], [0,0], "FONT_LAST" ],
|
||||
"B": [ [0,0], [0,12], [6,12], [8,10], [8,8], [6,6], [0,6], "FONT_UP", [6,6], [8,4], [8,2], [6,0], [0,0], "FONT_LAST" ],
|
||||
"C": [ [8,0], [0,0], [0,12], [8,12], "FONT_LAST" ],
|
||||
"D": [ [0,0], [0,12], [4,12], [8,8], [8,4], [4,0], [0,0], "FONT_LAST" ],
|
||||
"E": [ [8,0], [0,0], [0,12], [8,12], "FONT_UP", [0,6], [6,6], "FONT_LAST" ],
|
||||
"F": [ [0,0], [0,12], [8,12], "FONT_UP", [0,6], [6,6], "FONT_LAST" ],
|
||||
"G": [ [6,6], [8,4], [8,0], [0,0], [0,12], [8,12], "FONT_LAST" ],
|
||||
"G": [ [6,4], [8,4], [8,0], [0,0], [0,12], [8,12], "FONT_LAST" ],
|
||||
"H": [ [0,0], [0,12], "FONT_UP", [0,6], [8,6], "FONT_UP", [8,12], [8,0], "FONT_LAST" ],
|
||||
"I": [ [0,0], [8,0], "FONT_UP", [4,0], [4,12], "FONT_UP", [0,12], [8,12], "FONT_LAST" ],
|
||||
"J": [ [0,4], [4,0], [8,0], [8,12], "FONT_LAST" ],
|
||||
|
@ -57,15 +57,15 @@
|
|||
"M": [ [0,0], [0,12], [4,8], [8,12], [8,0], "FONT_LAST" ],
|
||||
"N": [ [0,0], [0,12], [8,0], [8,12], "FONT_LAST" ],
|
||||
"O": [ [0,0], [0,12], [8,12], [8,0], [0,0], "FONT_LAST" ],
|
||||
"P": [ [0,0], [0,12], [8,12], [8,6], [0,5], "FONT_LAST" ],
|
||||
"Q": [ [0,0], [0,12], [8,12], [8,4], [0,0], "FONT_UP", [4,4], [8,0], "FONT_LAST" ],
|
||||
"R": [ [0,0], [0,12], [8,12], [8,6], [0,5], "FONT_UP", [4,5], [8,0], "FONT_LAST" ],
|
||||
"S": [ [0,2], [2,0], [8,0], [8,5], [0,7], [0,12], [6,12], [8,10], "FONT_LAST" ],
|
||||
"P": [ [0,0], [0,12], [8,12], [8,6], [0,6], "FONT_LAST" ],
|
||||
"Q": [ [0,0], [0,12], [8,12], [8,4], [4,0], [0,0], "FONT_UP", [4,4], [8,0], "FONT_LAST" ],
|
||||
"R": [ [0,0], [0,12], [8,12], [8,6], [0,6], "FONT_UP", [4,6], [8,0], "FONT_LAST" ],
|
||||
"S": [ [0,0], [8,0], [8,6], [0,6], [0,12], [8,12], "FONT_LAST" ],
|
||||
"T": [ [0,12], [8,12], "FONT_UP", [4,12], [4,0], "FONT_LAST" ],
|
||||
"U": [ [0,12], [0,2], [4,0], [8,2], [8,12], "FONT_LAST" ],
|
||||
"V": [ [0,12], [4,0], [8,12], "FONT_LAST" ],
|
||||
"W": [ [0,12], [2,0], [4,4], [6,0], [8,12], "FONT_LAST" ],
|
||||
"X": [ [0,0], [8,12], "FONT_UP", [0,12], [8,0], "FONT_LAST" ],
|
||||
"Y": [ [0,12], [4,6], [8,12], "FONT_UP", [4,6], [4,0], "FONT_LAST" ],
|
||||
"Z": [ [0,12], [8,12], [0,0], [8,0], "FONT_UP", [2,6], [6,6], "FONT_LAST" ]
|
||||
"Z": [ [0,12], [8,12], [0,0], [8,0],"FONT_LAST" ]
|
||||
}
|
||||
|
|
|
@ -365,13 +365,13 @@ SpriteMorph.prototype.drawText = function (text, scale, fontnr) {
|
|||
if (fontnr == 3) {
|
||||
if (stage.afonts[text[i].toUpperCase()]){
|
||||
coords = stage.afonts[text[i].toUpperCase()];
|
||||
for (var j =0; j<coords.length; j++) {
|
||||
for (var j=0; j<coords.length; j++) {
|
||||
if (coords[j] == "FONT_UP") {
|
||||
nextPenIsUp = true;
|
||||
} else if (coords[j] == "FONT_LAST") {
|
||||
// ignore last
|
||||
} else {
|
||||
if (nextPenIsUp) {
|
||||
if (nextPenIsUp || j == 0 ) {
|
||||
var penState = this.isDown;
|
||||
this.isDown = false;
|
||||
this.gotoXY(x + coords[j][0] * scale, y + coords[j][1] * scale )
|
||||
|
|
Ładowanie…
Reference in New Issue