diff --git a/embed.js b/embed.js index 2e3b4f3..a64c1d5 100644 --- a/embed.js +++ b/embed.js @@ -404,7 +404,7 @@ class ServerEmbed { cg * CHAR_SHADOW_BRIGHTNESS, cb * CHAR_SHADOW_BRIGHTNESS); var ox = x; var ow = 0; - if(bold) this.drawColoredChar(x + 1, y + 1, c, ccc, italic); + if(bold) this.drawColoredChar(x + 1, y, c, ccc, italic); x += (ow = this.drawColoredChar(x, y, c, ccc, italic)); if(bold) { ++x; @@ -416,7 +416,7 @@ class ServerEmbed { if(cr >= 250 && cg >= 250 && cb >= 250) { var ox = x; var ow = 0; - if(bold) this.drawChar(x + 0.5, y + 0.5, c, italic); + if(bold) this.drawChar(x + 1.0, y, c, italic); x += (ow = this.drawChar(x, y, c, italic)); if(bold) { ++x; @@ -428,7 +428,7 @@ class ServerEmbed { var ccc = this.makeColor(cr,cg,cb); var ox = x; var ow = 0; - if(bold) this.drawColoredChar(x + 0.5, y + 0.5, c, ccc, italic); + if(bold) this.drawColoredChar(x + 1.0, y, c, ccc, italic); x += (ow = this.drawColoredChar(x, y, c, ccc, italic)); if(bold) { ++x; diff --git a/embed.min.js b/embed.min.js index fff9bcd..f1218f6 100644 --- a/embed.min.js +++ b/embed.min.js @@ -12,8 +12,8 @@ this.ctx.scale(this.canvas.width/256,this.canvas.height/38),this.ctx.translate(a ServerEmbed.prototype.drawCharLine=function(a,c,b,g){this.ctx.fillStyle=g;this.ctx.fillRect(this.getPixelX(a),this.getPixelY(c),this.getPixelX(b+.02),this.getPixelY(1))};ServerEmbed.prototype.makeColor=function(a,c,b){return"rgba("+Math.floor(a)+","+Math.floor(c)+","+Math.floor(b)+",1.0)"};ServerEmbed.prototype.getStringWidth=function(a,c){c=c?c.charCodeAt(0):167;for(var b=0,g=0;g>>15,v|1);v^=v+Math.imul(v^v>>>7,v|61);v=((v^v>>>14)>>>0)/429496&255}while((v==d||CHAR_WIDTHS[v]!=x)&&1E3>++z);d=v}f?(x=this.makeColor(p*CHAR_SHADOW_BRIGHTNESS,q*CHAR_SHADOW_BRIGHTNESS,r*CHAR_SHADOW_BRIGHTNESS),z=a,k&&this.drawColoredChar(a+1,c+1,d,x,l),a+=d=this.drawColoredChar(a,c,d,x,l),k&&(++a,++d),m&&this.drawCharLine(z,c+4,d,x),n&&this.drawCharLine(z,c+8,d,x)):250<=p&&250<=q&&250<=r?(z=a,k&&this.drawChar(a+.5,c+.5,d,l),a+=d=this.drawChar(a, -c,d,l),k&&(++a,++d),m&&this.drawCharLine(z,c+4,d,"#FFFFFF"),n&&this.drawCharLine(z,c+8,d,"#FFFFFF")):(x=this.makeColor(p,q,r),z=a,k&&this.drawColoredChar(a+.5,c+.5,d,x,l),a+=d=this.drawColoredChar(a,c,d,x,l),k&&(++a,++d),m&&this.drawCharLine(z,c+4,d,x),n&&this.drawCharLine(z,c+8,d,x));if(250>>15,v|1);v^=v+Math.imul(v^v>>>7,v|61);v=((v^v>>>14)>>>0)/429496&255}while((v==d||CHAR_WIDTHS[v]!=x)&&1E3>++z);d=v}f?(x=this.makeColor(p*CHAR_SHADOW_BRIGHTNESS,q*CHAR_SHADOW_BRIGHTNESS,r*CHAR_SHADOW_BRIGHTNESS),z=a,k&&this.drawColoredChar(a+1,c,d,x,l),a+=d=this.drawColoredChar(a,c,d,x,l),k&&(++a,++d),m&&this.drawCharLine(z,c+4,d,x),n&&this.drawCharLine(z,c+8,d,x)):250<=p&&250<=q&&250<=r?(z=a,k&&this.drawChar(a+1,c,d,l),a+=d=this.drawChar(a, +c,d,l),k&&(++a,++d),m&&this.drawCharLine(z,c+4,d,"#FFFFFF"),n&&this.drawCharLine(z,c+8,d,"#FFFFFF")):(x=this.makeColor(p,q,r),z=a,k&&this.drawColoredChar(a+1,c,d,x,l),a+=d=this.drawColoredChar(a,c,d,x,l),k&&(++a,++d),m&&this.drawCharLine(z,c+4,d,x),n&&this.drawCharLine(z,c+8,d,x));if(250c-this.connecting?(this.dirty=!0,b=Math.floor(c/300)%4,this.drawString(38,15,"Connecting"+(0