Adding Custom Fonts To the CUWIN
Sometimes it may be necessary to add custom fonts to improve the aesthetics of a user interface, or to add support for additional languages.
1. Obtain a .ttf file for the custom font, and copy it to either the CUWIN's flash memory (i.e. the "\Flash Disk" folder) or the CUWIN's SD Card (i.e. the "Storage Card" folder)

2. To view the font in the Visual Studio designer, change the control's font in the Visual Studio properties window.


3. In the Form's Load event, load the font file from where it was copied to in Step 1, using the Win32 AddFontResource() function. See AddFontResource

using System.Runtime.InteropServices;
[DllImport("coredll.dll")]
public static extern int AddFontResource(string lpFileName);
AddFontResource(@"\Flash Disk\Champignon.ttf");
One can also add .ttf file as resources or content in a Visual Studio solution, so it is deployed with the application, and loaded from the application's location. Download the example
Recent Posts
-
[Coming Soon] Control Your Field from Any Browser: Introducing ComfileWEB, a Free Web-Based HMI
Introducing ComfileWEB — A Smarter Way to Use CFNET Field I/O If you've been using the CFNET Field I …Jun 15th 2026 -
[New Product] CPi-J070WR — The Next Chapter of CUWIN
We've kept you waiting long enough. CPi-J070WR is here — our first model powered by the CM5 (Compute …Jun 15th 2026 -
Introducing Modula Pi – Industrial Raspberry Pi Platform
Introducing Modula Pi For a long time, many of our customers have asked the same question: “Can I u …May 8th 2026