Font type
Typst allows you to customize the fonts of testo, both size, type, space between words, …
For children with special needs, it is recommended to use a larger font, which can cause the entire document to be out of place. To do this, the question-text-parameters parameter has been created in which we will indicate the font that will have, only, the content of the questions, leaving the rest of the text with the same font. In this way, the layout of the document will be maintained in a similar way. The following example will use a 16-point, double-spaced font for the questions.
#show: exam.with( question-text-parameters: (size: 16pt, spacing:200%),)
#show: exam.with( question-text-parameters: (size: 16pt, spacing:200%),)
We can use special fonts for dyslexia, as follows.
#show: exam.with( question-text-parameters: (size: 16pt, spacing:200%, font:"OpenDyslexic),)
#show: exam.with( question-text-parameters: (size: 16pt, spacing:200%, font:"OpenDyslexic),)
If we want to change the text fonts of the entire document, we can do so, indicating it at the beginning of the document, before calling the template.
This will change the sources of the table of contents, student information, headers, and question numbering.
#set text(font: "PT Sans", size: 18pt, spacing:200%)#show: exam.with()#question(points: 2)[#lorem(30)]
#set text(font: "PT Sans", size: 18pt, spacing:200%)#show: exam.with()#question(points: 2)[#lorem(30)]