Resetting font size within a game

JSK
16 Jul 2016, 05:54

I was wondering how best to use the game's defaultfontsize attribute to make any changes to the text's size within that game temporary. Usually, I'd have to manually change it back to the value it was before, and I don't want to keep doing that when I change the default size. This is the workaround I came up with so far:

msg ("The front cover reads:<br/>")
SetFontSize (16)
msg ("<b>THE QUEST TIMES</b> <i>Issue 500</i><br/>")
SetFontSize (this.defaultfontsize)
msg ("<b>LOREM IPSUM DOLOR SIT AMET!</b><br/>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur venenatis ipsum ullamcorper urna rhoncus, eu. <small>p. 47</small>")

The problem is if I change the default font size for some reason, it keeps reverting to the old default (12pt) when I use this.defaultfontsize and test the game further. Any help debugging this issue would be appreciated!

EDIT: Before I forget, I'm currently using Quest 5.6.2 (Build 5.6.5783.24161).


Pertex
18 Jul 2016, 07:17
SetFontSize (16)

ist doing an internal

game.defaultfontsize = 16

so

 SetFontSize (16)
 SetFontSize (this.defaultfontsize)

does not reset the fontsize. Best thing is to save the old defaultsize in an variable


Anonynn
21 Jul 2016, 02:15

You can also use HTML to temporarily modify certain text without permanently changing the default.

<font size="#here"> </font size>

as well as

<font color="colorhere"> </font color>