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.

agastya.fontFamily(parameter);

The parameters allowed are:

Parameter Code Description
"serif"
agastya.fontFamily("serif");
Changes the font family to the platform serif.
"sans-serif"
agastya.fontFamily("sans-serif");
Changes the font family to the platform sans-serif.
"dyslexia"
agastya.fontFamily("dyslexia");
Changes the font family to Open Dyslexic after loading the font.
Font Face
agastya.fontFamily("'Helvetica'");
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>