Loading... Please wait...

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;

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


What's News


Contact Us

Toll-Free : (888) 9CUBLOC, (888) 928 2562
Office : (571) 322-5010
Fax : (571) 322-5011

14 Pidgeon Hill Dr. #310 Sterling VA 20165
Office Hours: Mon-Fri 8:30am-5:00pm EST

Sales: sales@comfiletech.com
TechSupport: support@comfiletech.com

Copyright 2020 COMFILE Technology,Inc. All Rights Reserved.