Achieving Responsive Font Size

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

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

const responsiveModifier = scene.scale.height / 1920

which doesn’t feels right for me to do so

what about fontSize to rem?

setFontSize(1 * window.devicePixelRatio)