Load Custom Fonts on the CUWIN

Applications, examples, and sample programs using products from Comfile Technology

Load Custom Fonts on the CUWIN

Postby Mike » Thu Jul 14, 2011 6:09 pm

This is a sample project that illustrates how to load custom fonts on the CUWIN.

* To load a font you need to call the Windows API function AddFontResource - http://msdn.microsoft.com/en-us/library ... 60%29.aspx
Calling a Windows API function is done using a technique called "Platform Invoke" or "P/Invoke" for short - http://msdn.microsoft.com/en-us/library/aa446536.aspx
* To display a list of loaded fonts, use the System.Drawing.Text.InstalledFontCollection - http://msdn.microsoft.com/en-us/library ... 90%29.aspx
* The font I use in this example I downloaded from http://www.1001freefonts.com/
* C# and VB.Net projects are attached. These projects were built for the CUWIN 5000/6000 series, but I believe the same code can be used for the CUWIN 3000/4000 series.
Attachments
FontTest_VB.zip
VB.Net Project
(81.69 KiB) Downloaded 689 times
FontTest.zip
C# Project
(69.08 KiB) Downloaded 728 times
Mike
Mike
SuperDuperDuper
 
Posts: 551
Joined: Thu Mar 17, 2011 3:54 pm
Location: Seoul, South Korea

Return to Applications and Examples

Who is online

Users browsing this forum: No registered users and 2 guests

cron