Commit 8cdba501 authored by Chen Jiping's avatar Chen Jiping

fix:修复字体缩放的问题

parent 8ab26753
...@@ -238,6 +238,7 @@ export class Exercises { ...@@ -238,6 +238,7 @@ export class Exercises {
textArr.push(labelText); textArr.push(labelText);
} }
text.setScaleXY(this.scaleX);
text.refreshSize(); text.refreshSize();
text.y = bg.height / 2; text.y = bg.height / 2;
totalWidth = text.getBoundingBox().width; totalWidth = text.getBoundingBox().width;
...@@ -330,6 +331,7 @@ export class Exercises { ...@@ -330,6 +331,7 @@ export class Exercises {
index.fontSize = 64; index.fontSize = 64;
index.fontName = "TCB"; index.fontName = "TCB";
index.fontColor = '#ec6101'; index.fontColor = '#ec6101';
index.setScaleXY(this.scaleX);
index.setMaxSize(45 * scaleX); index.setMaxSize(45 * scaleX);
index.x = indexBg.x - index.width / 2; index.x = indexBg.x - index.width / 2;
index.y = height / 2; index.y = height / 2;
...@@ -401,7 +403,7 @@ export class Exercises { ...@@ -401,7 +403,7 @@ export class Exercises {
textArr.push(labelText); textArr.push(labelText);
} }
text.setScaleXY(this.scaleX);
text.setMaxSize(960 * this.scaleX); text.setMaxSize(960 * this.scaleX);
text.refreshSize(); text.refreshSize();
text.y = bg.height / 2; text.y = bg.height / 2;
...@@ -464,7 +466,7 @@ export class Exercises { ...@@ -464,7 +466,7 @@ export class Exercises {
textArr.push(labelText); textArr.push(labelText);
} }
text.setScaleXY(this.scaleX);
text.setMaxSize((960 - 90) * this.scaleX); text.setMaxSize((960 - 90) * this.scaleX);
text.refreshSize(); text.refreshSize();
text.y = bg.height - text.getBoundingBox().height / 2 - 7 * this.scaleY; text.y = bg.height - text.getBoundingBox().height / 2 - 7 * this.scaleY;
......
...@@ -51,6 +51,7 @@ export class Title { ...@@ -51,6 +51,7 @@ export class Title {
part1.fontSize = 48; part1.fontSize = 48;
part1.fontName = "BRLNSDB"; part1.fontName = "BRLNSDB";
part1.fontColor = "#ffffff"; part1.fontColor = "#ffffff";
part1.setScaleXY(mapScaleX);
part1.refreshSize(); part1.refreshSize();
part1.x = pWidth - part1.getBoundingBox().width - 13 * mapScaleX; part1.x = pWidth - part1.getBoundingBox().width - 13 * mapScaleX;
titleBg.addChild(part1); titleBg.addChild(part1);
...@@ -61,6 +62,7 @@ export class Title { ...@@ -61,6 +62,7 @@ export class Title {
part2.fontSize = 36; part2.fontSize = 36;
part2.fontName = "FUTURA"; part2.fontName = "FUTURA";
part2.fontColor = "#000000"; part2.fontColor = "#000000";
part2.setScaleXY(mapScaleX);
part2.refreshSize(); part2.refreshSize();
part2.x = titePart1Bg.getBoundingBox().width + 11 * mapScaleX; part2.x = titePart1Bg.getBoundingBox().width + 11 * mapScaleX;
part2.y = 10 * mapScaleY + part2.getBoundingBox().height / 2; part2.y = 10 * mapScaleY + part2.getBoundingBox().height / 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 to comment