Using a font that the user has not installed

I can’t believe that I don’t know the answer to this already, but what happens if I use a font that the user has not installed.

So, if I set the label to use the Segoe user interface, then the Win XP user (who does not have the Segoe user interface installed) launches the application. Does this raise an exception?

I know that I can take the system font by default and use it for compatibility, but I'm wondering what will happen if someone does not.

(C # .NET Programming)

thanks

+4
source share
3 answers

An exception will not be thrown; instead, the system will use the default font. This question was answered: what happens if I use a font that is not installed on the client machine

+2
source

As stated above, you will not get an error. It will be the default standard font. The best way to handle this is to insert a font into your application.

The easiest way I know how to do this is to open your program in Blend (free with visual studios). Then from here you can choose one of the HUGE lists of fonts. Once you find the one you want, click paste. This is it!

Here is a detailed explanation

http://msdn.microsoft.com/en-us/library/cc296385.aspx

+3
source

According to this previous question, the MS Sans Serif font will be replaced if the font is missing.

Why is there no exception when using an existing font?

However, from personal experience, I found that if the font is installed, but the style is missing, an exception will be thrown. In my case, I somehow lacked Verdana Regular, although I had Verdana, and exceptions were thrown when trying to load this style.

0
source

Source: https://habr.com/ru/post/1480556/


All Articles