Hi, Our website generates some images based on a user input (converts text to image). It uses some fonts which are not installed in the DiscountAsp server. Is it possible that we install these fonts (3 fonts) in the server? If yes, how can we install them? If NO, is there any solution?
You won't be able to get custom fonts installed on a shared host DiscountASP.NET web server; I'm sure a DASP staff member will be along soon to confirm what I've said. There's nothing to stop you uploading your 3 font files to your own account space but whether this works for you as expected will depend on the process you have that "generates some images based on a user input (converts text to image)"
Thank you for participating your knowledge. I am sorry, do you mean I will be able to use the new font despite it NOT being installed in the system.
There definitely is a way to use fonts that aren't installed on the server but as I said in my last post, whether this will work for you as expected will depend on the process you have that "generates some images based on a user input (converts text to image)". If it happens that you're in full control of the application code in this process, you could try something like this example (C#.NET code sample): Code: public static PrivateFontCollection LoadFontCollection(string fontFileName) { var fontCollection = new PrivateFontCollection(); fontCollection.AddFontFile(fontFileName); return fontCollection; } With usage something like this: Code: using(var fontCollection = LoadFontCollection("aFont.ttf")) using(var aFont = new Font(fontCollection.Families[0], 10.0f)) { //do some work with aFont.. } More info here: http://msdn.microsoft.com/en-us/library/system.drawing.text.privatefontcollection(v=vs.110).aspx Please note this sample comes without warranty, is untested and it's unknown if this actually works on the DASP web server; in short YMMV ;-)
You're welcome. Please update this thread with your results if you end up trying this out on the DASP server - I'm sure it will help others in future.
Just wanted to toss my 2 cents into the discussion since I'm not sure how exactly you are using the fonts. If you just want to render them on your webpage, then I personally use the CSS3 @font-face rule.