Commit e1efd334 by doszhang

dos

parent 542514a7
......@@ -25,8 +25,8 @@ input::-webkit-input-placeholder {
}
@font-face {
font-family: 'fzlt';
src: url(./fzlt.ttf);
font-family: 'zkkh';
src: url(./zkkh.ttf);
}
.page {
......
......@@ -279,6 +279,8 @@ function createHeadimg() {
frameimg.onload = function() {
headimgctx.drawImage(frameimg,0,0,headimgCanvas.width,headimgCanvas.height);
txtDraw(headimgctx, $('[name=customize]').val(), 325, 445, 41, 'normal', '#fff');
$('#headimg').attr('src',getManBase64(headimgCanvas));
$('.upload-page').fadeOut(300);
......@@ -387,10 +389,10 @@ function initGame() {
}
function txtDraw(ctx, content, x, y, fontsize, fontweight, color) {
x = x * 4;
y = y * 4;
fontsize = fontsize * 4;
ctx.font = fontweight + ' '+fontsize+'px fzlt';
x = x * 2;
y = y * 2;
fontsize = fontsize * 2;
ctx.font = fontweight + ' '+fontsize+'px zkkh';
var width = ctx.measureText(content).width;
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