How To Change The Font Size Of Questions / Answers / Topics

Overview

The survey texts appear in a default font size set by the SurveyToGo system, where it can fit differently on different screen resolutions and / or different languages.

This article will show you how you can control the font size of questions, answers and topics, through the script.

Step 1: Changing the font size of a question

Step 2: Changing the font size of an answer

Step 3: Changing the font size of a topic

Step 4: Automatically change the font for all questions in the survey

 

Steps

Step 1: Changing the font size of a question

Use the “SetQuestionFontScale” function. This function gets the question index and a specific size property. These are the available size properties (from the biggest to the smallest):

eFontSize.XLarge

eFontSize.Largest

eFontSize.Large

eFontSize.Regular

eFontSize.Small

eFontSize.Smaller

eFontSize.XSmall

 

So for example, write the following in the question’s start script to change its font to the “Largest” size:

SetQuestionFontScale(CurrQues, eFontSize.Largest);

Step 2: Changing the font size of an answer

To change the font size of the answers texts in a question, use the “SetAnswerFontScale” function. It works exactly the same as the “SetQuestionFontScale” mentioned in step 1 above, where it gets the question’s index and the size property.

Step 3: Changing the font size of a topic

To change the font size of the topics texts in a question, use the “SetTopicFontScale” function, which again works exactly the same as the “SetQuestionFontScale” mentioned in step 1 above, where it gets the question’s index and the size property.

Step 4: Automatically change the font for all questions in the survey

If you want to set the same font size (that is not the default one) for all the questions in the script, instead of calling the font size function in the start script of each and every question, you can write this code once in the Advanced Scripts section (If you’re not familiar with the Advanced Scripts section please Click Here): 


function OnPageRendered(){
   SetQuestionFontScale(CurrQues, eFontSize.Largest);
}

That’s it!

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.