Controlling Font Size in Learnosity Questions

This article details the fontsize attribute and how you can control the size of the text in Learnosity Questions.
 

The fontsize attributes allows control of the base font size. Each row denotes a different configuration point, Question level attributes are the most specific and allow for activity level overrides.

Location/Codebase Key Type Default Description
Questions API, question level questions [ui_style.fontsize] string normal Font size for the question. Options include:
  • small: 12px
  • normal: 14px
  • large: 17px
  • xlarge: 20px
  • xxlarge: 24px
Questions API, activity level fontsize string normal Same as above
Assess API configuration.fontsize string normal Same as above
Items API config.fontsize string normal Same as above

 

Changing the font size for Questions API

For example, if we want to specify the font size in Questions API,  use the following code. See also, the reference site page.

{
"type": "longtextV2",
"ui_style": {
"fontsize": "small"
}
}

Code example 1: setting the font size in Questions API

Changing the font size in Assess API

If we want to specify the font size in Assess API, use the following code. See also, the reference site page.

"configuration":{
"fontsize": "large"
}

Code example 2: setting the font size in Assess API

Changing the font size in Items API

If we want to specify the font size in Items API, use the following code. See also, the reference site page.

"config":{
"configuration":{
"fontsize": "xlarge"
}
}
Code example 3: setting the font size in Items API

 

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.