CrazyEngineers
  • How to add Hindi, Tamil, Bengali fonts using Google Fonts API?

    Kaustubh Katdare

    Kaustubh Katdare

    @thebigk
    Updated: Oct 25, 2024
    Views: 1.1K
    Indian web developers rejoice - Google's web font has now included three Indian languages in their international 'local language fonts'. Currently the 'early access' shows 9 international languages viz. Arabic, Lao, Ethiopic, Tamil, Thai, Bengali, Hindi, Korean, and Burmese. Now, it'll be very easy for the developers and web-masters to include support to all these languages in the web applications.

    Google Web Fonts is a font delivery service which eliminates the need of installing the fonts locally. All you need is a simple JavaScript code that will fetch the relevant font from Google's servers and deliver them to the web-browser. Here's an example -

    If you wish to include Hindi font -

    Include in header -
    @import url(https://fonts.googleapis.com/earlyaccess/lohitdevanagari.css);
    CSS -
    font-family: 'Lohit Devanagari', serif;
    You will now be able to display Hindi on your web-site. Those who want to give it a try can use above code. The Google API will be delivered through a content delivery network so the loading time of these fonts is minimal - at least, it won't cause your web applications to load slower.
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Home Channels Search Login Register