# Achieving Responsive Font Size

**URL:** <https://phaser.discourse.group/t/achieving-responsive-font-size/8015>\
**Category:** Phaser 3\
**Created:** [November 4, 2020, 4:33am UTC](https://phaser.discourse.group/t/achieving-responsive-font-size/8015 "2020-11-04T04:33:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![as3mbus](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/as3mbus/32/3328_2.png) [@as3mbus](https://phaser.discourse.group/u/as3mbus)\
**Post date:** [November 4, 2020, 4:33am UTC](https://phaser.discourse.group/t/achieving-responsive-font-size/8015/1 "2020-11-04T04:33:08Z")

</div>

Is there a better way to achieve responsive font sizing other than calculating height alone ?

for example i’d love to be able to do this

```javascript
const fontSize = 64 * responsiveModifier;
const someText = scene.add.text(0,0,"A text");
someText.setFontSize(fontSize);

```

for now what i did was providing magic number for reference like below

```javascript
const responsiveModifier = scene.scale.height / 1920

```

which doesn’t feels right for me to do so

---

<div class="post-metadata">

**Author:** ![crapthings](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/crapthings/32/5993_2.png) [@crapthings](https://phaser.discourse.group/u/crapthings)\
**Post date:** [January 15, 2022, 7:23am UTC](https://phaser.discourse.group/t/achieving-responsive-font-size/8015/2 "2022-01-15T07:23:52Z")

</div>

what about fontSize to rem?

setFontSize(1 \* window.devicePixelRatio)
