Requires FilterMeister 1.0 Beta 9.1 (Feb 2009) or newer
bool createFont(int i, int size, bool bold, bool italic, char *fontname)
Returns true if creating the font succeeded, false otherwise.
Creates a font that can be used in your plug-in user interface with setCtlFont. The font must already be installed on the user's computer, so it is best to choose fonts that come installed with Windows. You can use up to 32 different fonts, and the fonts are deleted automatically when FM exits. if a font already exists at the given index number, it is deleted and replaced with a pointer to the newly created font.
Behind the scenes, this function is mostly a wrapper around the [CreateFont] Win32 GDI API function.
%fml // Create some text to display on the interface ctl[10]: STATICTEXT, Size=(100, 40), Text="The Text Appears Here" OnFilterStart: { // Create font #1 as Segoe Print in height 40 createFont(1, 40, false, false, "Segoe Print"); // Set control #10 to use our newly created Segoe Print 40 setCtlFont(10, 1); return true; }