Commit 99f34e16 authored by Chen Jiping's avatar Chen Jiping

增加字体

parent c6f65552
...@@ -116,7 +116,7 @@ export class Skin { ...@@ -116,7 +116,7 @@ export class Skin {
textLabel.text = exercises.exercisesData.text; textLabel.text = exercises.exercisesData.text;
textLabel.textAlign = 'middle'; textLabel.textAlign = 'middle';
textLabel.fontSize = 48; textLabel.fontSize = 48;
textLabel.fontName = "FUTURAB"; textLabel.fontName = "FUTURABM";
textLabel.fontColor = "#626262"; textLabel.fontColor = "#626262";
textLabel.setMaxSize(bg.width); textLabel.setMaxSize(bg.width);
textLabel.refreshSize(); textLabel.refreshSize();
......
...@@ -28,3 +28,9 @@ ...@@ -28,3 +28,9 @@
font-family: 'GOTHIC'; font-family: 'GOTHIC';
src: url("../../assets/font/GOTHIC.TTF") ; src: url("../../assets/font/GOTHIC.TTF") ;
} }
@font-face
{
font-family: 'FUTURABM';
src: url("../../assets/font/tt0142m.TTF") ;
}
\ No newline at end of file
...@@ -3,7 +3,7 @@ import { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListene ...@@ -3,7 +3,7 @@ import { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListene
import { import {
Label, Label,
MySprite, tweenChange, MySprite, tweenChange,
ShapeRect
} from './Unit'; } from './Unit';
import { res, resAudio } from './resources'; import { res, resAudio } from './resources';
...@@ -61,6 +61,9 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -61,6 +61,9 @@ export class PlayComponent implements OnInit, OnDestroy {
renderArr; renderArr;
mapScale = 1; mapScale = 1;
mapScaleX = 1;
mapScaleY = 1;
canvasLeft; canvasLeft;
canvasTop; canvasTop;
...@@ -500,8 +503,8 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -500,8 +503,8 @@ export class PlayComponent implements OnInit, OnDestroy {
const s = Math.min(sx, sy); const s = Math.min(sx, sy);
this.mapScale = s; this.mapScale = s;
// this.mapScale = sx; this.mapScaleX = sx;
// this.mapScale = sy; this.mapScaleY = sy;
this.renderArr = []; this.renderArr = [];
...@@ -529,6 +532,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -529,6 +532,7 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
initTitle() { initTitle() {
const title = new Title(this.data.title, this.images); const title = new Title(this.data.title, this.images);
title.init(this.mapScale, this.mapScale); title.init(this.mapScale, this.mapScale);
...@@ -536,7 +540,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -536,7 +540,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this.title = title; this.title = title;
title.titleBg.y = 0; title.titleBg.y = 0;
title.titleBg.x = 60; title.titleBg.x = 65 * this.mapScaleX;
this.renderArr.push(title.titleBg); this.renderArr.push(title.titleBg);
} }
......
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