How can I change the font of my project in a way that anyone who downloads the app sees it with the font that I choose?
I’m using C#, Microsoft Visual Studio Code, Winforms.
I keep searching but all that I can find is a tutorial on how to install the font on my own computer.
2
Answers
If you want to change the font of all controls in a form (.NET Framework). See this link.
But, if you are using .NET Core (.NET 6 or later) you can:
In project file inside
<PropertyGroup>
add:You can also call
Application.SetDefaultFont()
directly in yourMain()
method as shown here:Here is an example of a custom font working.
(Important: In this example I dragged "FiraCode-SemiBold.ttf" into the root of my project, then I right clicked it in visual studio and set the property: "Copy to Output Directory" to "Copy if newer" (copy always will work too))