Font Face

This method is used to change the typeface of the webpage. Using this, users can use Open Dyslexia, a serif or a sans-serif font based on their reading preference. It is especially useful for audiences with dyslexia or similar reading disorders as they can change the entire typography to Open Dyslexic.


The parameters allowed are:

Parameter Code Description
Changes the font family to the platform serif.
Changes the font family to the platform sans-serif.
Changes the font family to Open Dyslexic after loading the font.
Font Face
Changes the font family to the specified font.

You can add these methods to a button with a onclick events, for example:

<button onclick="agastya.fontFamily('dyslexia')">Dyslexia-friendly Mode</button>
<button onclick="agastya.fontFamily('\"Roboto\"')">Roboto Font</button>
<button onclick="agastya.reset('fontFamily')">Reset Fonts</button>