diff --git a/index.html b/index.html index 177a92efc..23134bb57 100644 --- a/index.html +++ b/index.html @@ -18,6 +18,10 @@ font-family: 'emerald'; src: url('./fonts/pokemon-emerald-pro.ttf') format('truetype'); } + @font-face { + font-family: 'dppt'; + src: url('./fonts/pokemon-dppt.ttf') format('truetype'); + } @font-face { font-family: 'pkmnems'; diff --git a/public/fonts/license_pokemon-dppt.txt b/public/fonts/license_pokemon-dppt.txt new file mode 100644 index 000000000..a46e15e3d --- /dev/null +++ b/public/fonts/license_pokemon-dppt.txt @@ -0,0 +1,4 @@ +The FontStruction “Pokemon DPPt” +(https://fontstruct.com/fontstructions/show/1951915) by “aztecwarrior28” is +licensed under a Creative Commons Attribution Share Alike license +(http://creativecommons.org/licenses/by-sa/3.0/). diff --git a/public/fonts/pokemon-dppt.ttf b/public/fonts/pokemon-dppt.ttf new file mode 100644 index 000000000..cce340f7c Binary files /dev/null and b/public/fonts/pokemon-dppt.ttf differ diff --git a/src/loading-scene.ts b/src/loading-scene.ts index a7d68ef98..35495ddff 100644 --- a/src/loading-scene.ts +++ b/src/loading-scene.ts @@ -303,7 +303,7 @@ export class LoadingScene extends SceneBase { y: height / 2 - 24, text: '0%', style: { - font: "72px emerald", + font: "72px emerald, dppt", color: "#ffffff", }, }); @@ -314,7 +314,7 @@ export class LoadingScene extends SceneBase { y: height / 2 + 48, text: "", style: { - font: "48px emerald", + font: "48px emerald, dppt", color: "#ffffff", }, }); diff --git a/src/main.ts b/src/main.ts index b3b4d5f3c..948e59cb9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -91,7 +91,7 @@ Phaser.GameObjects.Text.prototype.setPositionRelative = setPositionRelative; BBCodeText.prototype.setPositionRelative = setPositionRelative; Phaser.GameObjects.Rectangle.prototype.setPositionRelative = setPositionRelative; -document.fonts.load('16px emerald').then(() => document.fonts.load('10px pkmnems')); +document.fonts.load('16px emerald, dppt').then(() => document.fonts.load('10px pkmnems')); let game; diff --git a/src/ui/message-ui-handler.ts b/src/ui/message-ui-handler.ts index 44b3cc1a1..d6645a41b 100644 --- a/src/ui/message-ui-handler.ts +++ b/src/ui/message-ui-handler.ts @@ -144,7 +144,7 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler { const wrappedTextLines = this.message.runWordWrap(this.message.text).split(/\n/g); const textLinesCount = wrappedTextLines.length; const lastTextLine = wrappedTextLines[wrappedTextLines.length - 1]; - const lastLineTest = this.scene.add.text(0, 0, lastTextLine, { font: '96px emerald' }); + const lastLineTest = this.scene.add.text(0, 0, lastTextLine, { font: '96px emerald, dppt' }); lastLineTest.setScale(this.message.scale); const lastLineWidth = lastLineTest.displayWidth; lastLineTest.destroy(); diff --git a/src/ui/text.ts b/src/ui/text.ts index d7ecd3b25..aa17128ef 100644 --- a/src/ui/text.ts +++ b/src/ui/text.ts @@ -68,7 +68,7 @@ function getTextStyleOptions(style: TextStyle, uiTheme: UiTheme, extraStyleOptio let shadowSize = 6; let styleOptions: Phaser.Types.GameObjects.Text.TextStyle = { - fontFamily: 'emerald', + fontFamily: 'emerald, dppt', fontSize: '96px', color: getTextColor(style, false, uiTheme), padding: {