2

I am using 1st-time @font-face and facing some issue that my form label need two languages (1) English and (2) Hindi

I want the content of the text box in Hindi instead of the English alphabet.

For Hindi font I made below CSS added external CSS font but it's not coming on my form, then I called my class into my HTML but HTML is taking junk values, I don't know where I doing some mistakes please suggest me a solution.

@font-face {
  font-family: hindi !important;
  font-style: normal;
  font-weight: 400;
  src: url('file:///C:/Users/Tapas/Desktop/java%20script/es6/Kruti_Dev_010.ttf');
}

.lang-hindi {
  font-family: hindi !important;
}
<p class="lang-hindi"> kaise ho</p>

I am expecting the Hindi alphabet as an output but it's showing only the English alphabet, can anyone please help me with the solution.

Tapas Mondal
  • 23
  • 1
  • 5

3 Answers3

0
  1. go to this site: https://www.web-font-generator.com/
  2. upload your (Kruti_Dev_010.ttf) generate the web font
  3. download generated font there will be CSS file in download files along with .woff, .svg, .eot and .ttf files as well
  4. copy CSS style and correct file paths then use it into you web page
Rehan
  • 408
  • 1
  • 6
  • 17
0

To use kruti dev font you cannot type the text like 'kaise ho' you need to use hindi keyboard layout to type -

hindi keyboard layout

so for example if you want to write hindi text

then you will in your html you will write - 'lkoZtfud izU;kl efUnj Jh egkdkys'oj '

Monika Mangal
  • 1,665
  • 7
  • 17
-1

You can better use Google Fonts, https://fonts.google.com/

Select your font over there, and add this to your web-page.

The answer you are looking for is a bit difficult but you can write whatever your desired text using google font and it will work on all browsers.

Navneet Kumar
  • 623
  • 1
  • 6
  • 16