Font Size

This method is used to change the font size of the webpage. Using this, users can increase the font size for a more comfortable reading experience. It is especially useful for audiences with slight visual impairment, like senior citizens.

agastya.fontSize(parameter);

The parameters allowed are:

Parameter Code Description
"increase"
agastya.fontSize("increase");
Increases the font size by 10%.
"decrease"
agastya.fontSize("decrease");
Decreases the font size by 10%.
"normal"
agastya.fontSize("normal");
Reverts the font size to the page's default.
Pixel value
agastya.fontSize("16px");
Changes the font size to the specified value.

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

<button onclick="agastya.fontSize('increase')">A+</button>
<button onclick="agastya.fontSize('normal')">A</button>
<button onclick="agastya.fontSize('decrease')">A&minus;</button>
<button onclick="agastya.reset('fontSize')">Reset</button>

Another implementation could be a slider.

<label>
	Change font size: 
	<input type="range" onchange="agastya.fontSize(this.value+'%')" min="80" max="120" value="100">
</label>
<button onclick="agastya.reset('fontSize')">Reset</button>