Thanks @tmacchant3. It worked. What I did earlier was to change the environmental variable after installing gnuplot. But now I changed the environmental variable before installing and there are no font issues as such (atleast for now XD)
@tmacchant3 How do I go about setting the environmental variable? I have tried going to Control Panel → System → Advanced → Environmental Variables and created a global variable PANGOCAIRO_BACKEND and set its value to fc However, the kerning issue still persisted. I didn't face a similar issue in version 5.2.8. Do you think that I should revert to that version before this issue is fixed?