Commit e1efd334 by doszhang

dos

parent 542514a7
...@@ -25,8 +25,8 @@ input::-webkit-input-placeholder { ...@@ -25,8 +25,8 @@ input::-webkit-input-placeholder {
} }
@font-face { @font-face {
font-family: 'fzlt'; font-family: 'zkkh';
src: url(./fzlt.ttf); src: url(./zkkh.ttf);
} }
.page { .page {
......
...@@ -279,6 +279,8 @@ function createHeadimg() { ...@@ -279,6 +279,8 @@ function createHeadimg() {
frameimg.onload = function() { frameimg.onload = function() {
headimgctx.drawImage(frameimg,0,0,headimgCanvas.width,headimgCanvas.height); headimgctx.drawImage(frameimg,0,0,headimgCanvas.width,headimgCanvas.height);
txtDraw(headimgctx, $('[name=customize]').val(), 325, 445, 41, 'normal', '#fff');
$('#headimg').attr('src',getManBase64(headimgCanvas)); $('#headimg').attr('src',getManBase64(headimgCanvas));
$('.upload-page').fadeOut(300); $('.upload-page').fadeOut(300);
...@@ -387,10 +389,10 @@ function initGame() { ...@@ -387,10 +389,10 @@ function initGame() {
} }
function txtDraw(ctx, content, x, y, fontsize, fontweight, color) { function txtDraw(ctx, content, x, y, fontsize, fontweight, color) {
x = x * 4; x = x * 2;
y = y * 4; y = y * 2;
fontsize = fontsize * 4; fontsize = fontsize * 2;
ctx.font = fontweight + ' '+fontsize+'px fzlt'; ctx.font = fontweight + ' '+fontsize+'px zkkh';
var width = ctx.measureText(content).width; var width = ctx.measureText(content).width;
var cx = x - width / 2; var cx = x - width / 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment