Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Experts.

I want to use hindi font in some of my Pages on a ASP.NET Site. I have that font on my machine. that may not be available in general. how can i pack my font with the website, so that any user who uses the site sees the text in same font.

even if i define that font for any control in the Font properties of that control.

for example.

(let say drop down box),

<asp:DropDownList ID="ddlCourse" runat="server" AutoPostBack="True" 
            Font-Names="Kruti Dev 010" Font-Size="18pt" Height="29px" 
            onselectedindexchanged="ddlCourse_SelectedIndexChanged" Width="361px">



it does not work on local machine, what could be the problem. the Items shown in DDL are shown as english font,

hope i made myself clear.

regards

Prateek.
Posted
Updated 2-Apr-16 0:15am
Comments
Nayeem Mansoori 24-Apr-12 3:43am    
its same problem face for mee

Just a note for you: there is no such thing as "Hindi font". There is Devanagari script used not just in Hindi but in a good number of other most used languages in India and — importantly — in Sansrit. Now, there are no "English" or "Latin" or "Arabic" or "Devanagari" fonts. The fonts supporting Unicode are universal but they can support different sub-sets of Unicode code points. To best of my knowledge Devanagari is supported at least by one font in all modern desktop-oriented systems (anyway, you Question remains valid: how to guarantee it?).

Look, I've never been in India and never worked with any Indian language but I know this most basic and simple fact of Indian culture.

You live and work in India and aim to support Hindi, so you're supposed to know better. In my humble opinion, you need to respect culture of your own country…

—SA
 
Share this answer
 
v4
Your font must be located in "C:\Windows\Fonts".

Also, when you publish your website on a production server, you must make sure that the font is installed on that particular machine.

Another thing to point out is, where are you getting the strings from? If you're getting the strings from a file or a database, make sure that the strings are stored and retrieved in Hindi fonts.
 
Share this answer
 
Comments
Katiyar S. 8-Mar-11 4:54am    
Thanks Ryan,

I was Making a mistake, I was not initializing the font in the OnLoad event of that control.
anyway i got it running, on my local machine, one more thing, how can i make sure that my page will be rendered correctly on client machine, do i need to ask my website hosting service to install that particular font, and not sure if they agree.

or may be i can made this font available from the site itself. and anybody using my site, can download and install the font on their local machine.

please suggest, as i am not sure how these applications are deployed.

prateek.
Ryan Zahra 8-Mar-11 5:18am    
Glad you found your mistake :)
Since you're initializing your font on the load event, it would be safer to have your font in the website itself. Thus when loading the font, make sure that the path is found in a folder in the website itself.

I'm against having clients install the font themselves. Its a bit of hassle for a normal user to install a font just to view one particular website. Make sure to avoid it!!
juhii3102 30-Mar-12 6:59am    
How to save and retrieve hindi text in a desktop application?
juhii3102 30-Mar-12 7:01am    
Kindly reply,
How to save and retrieve hindi text data in sql server in a desktop application?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900