Commit 18b1316d by doszhang

dos

parent 227014f9
...@@ -66,6 +66,16 @@ body { ...@@ -66,6 +66,16 @@ body {
background-size: 100%; background-size: 100%;
} }
@font-face {
font-family: 'num';
src: url(./num.ttf);
}
@font-face {
font-family: 'text';
src: url(./text.ttf);
}
.music { .music {
position: fixed; position: fixed;
...@@ -98,6 +108,7 @@ input[name=business] { ...@@ -98,6 +108,7 @@ input[name=business] {
.page1 .num .numbig { .page1 .num .numbig {
font-size: 40px; font-size: 40px;
font-weight: bolder; font-weight: bolder;
font-family: 'num';
} }
.page1 .regulate-block { .page1 .regulate-block {
......
...@@ -329,7 +329,7 @@ function drawNum() { ...@@ -329,7 +329,7 @@ function drawNum() {
let text1Width = posterCtx.measureText(text1).width; let text1Width = posterCtx.measureText(text1).width;
let text2Width = posterCtx.measureText(text2).width; let text2Width = posterCtx.measureText(text2).width;
posterCtx.font = 'normal ' + '80px normal'; posterCtx.font = 'normal ' + '80px num';
let numWidth = posterCtx.measureText(window.num).width; let numWidth = posterCtx.measureText(window.num).width;
let totalWidth = text1Width + 10 * 2 + numWidth + 6 * 2 + text2Width; let totalWidth = text1Width + 10 * 2 + numWidth + 6 * 2 + text2Width;
...@@ -346,7 +346,7 @@ function drawNum() { ...@@ -346,7 +346,7 @@ function drawNum() {
function drawUserInfo(name, business, fontsize, fontweight) { function drawUserInfo(name, business, fontsize, fontweight) {
fontsize = fontsize * 2; fontsize = fontsize * 2;
posterCtx.font = fontweight + ' ' + fontsize + 'px normal'; posterCtx.font = fontweight + ' ' + fontsize + 'px text';
let { let {
idX, idX,
nameX, nameX,
......
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