Jump to content

Search the Community

Showing results for tags 'Text Sizing Press+Start+2P'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Below is my following code for effects in my game. As you can see i hard code 32px as the font size, yet no matter what size I put in be it 1px to 300px no difference is made. Any idea why the font is not sizing? Ignore the properties argument, implementing that later. Effect = function(text, x, y, properties) {PIXI.Text.call(this, text, {font:'32px Press+Start+2P'}); this.position.x = x;this.position.y = y;this.z = 2; this.requestingRemoval = false;this.time = 0; console.log(this);}; Effect.prototype = Object.create(PIXI.Text.prototype); Effect.prototype.constructor = Effect; Effect.prototype.remove = function() {this.requestingRemoval = true;}; Effect.prototype.update = function() {this.time++;if (this.time >= 30) {this.remove();} this.position.y--;}; DamageText = function(text, x, y){Effect.call(this, text, x, y, {fill:'black'});}; DamageText.prototype = Object.create(Effect.prototype); DamageText.prototype.constructor = DamageText; var EffectHandler = {effects: [],addEffect: function(effect){this.effects.push(effect);}};Further style: Objectalign: "left"dropShadow: falsedropShadowAngle: 0.5235987755982988dropShadowColor: "black"dropShadowDistance: 4fill: "black"font: "32px Press+Start+2P"stroke: "black"strokeThickness: 0wordWrap: falsewordWrapWidth: 100So i can confirm that the 32px is being passed to the Font class. In addition, my font loading code right from google <!-- Fonts --><script type="text/javascript"> WebFontConfig = { google: { families: [ 'Press+Start+2P::latin' ] } }; (function() { var wf = document.createElement('script'); wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; wf.type = 'text/javascript'; wf.async = 'true'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wf, s); })(); </script>
×
×
  • Create New...