Originally Posted By: Toon
Hi Richi007, thanks for your reply! Unfortunately I tryed the code without any luck grin This is what I tryed, maybe you know what I'm doing wrong;

Code:
#include <acknex.h>
#include <default.c>
#include <windows.h>
#include <stdio.h>

FONT* my_font;


TEXT* test_txt = 
{
	flags = SHOW;
	string = "Comic letter";
	pos_x = 100;
	pos_y = 100;
}

void main()
{
	if(AddFontResource("comic_andy.ttf")!=0)
	{
		my_font = font_create("comic andy#100");
		
		if(my_font == NULL)
		{
			sys_exit("");
		}
		else
		{
			beep();
			wait(-10);
			test_txt.font = my_font;
		}	
	}
	else
	{
		beep();beep();beep();
	}
}



This will not work, because font_create() will use a standard font if the new one (added with AddFontResource) was not found. This means that font_create() give you back a pointer and not a NULL!

You can not be 100% sure if the new font is really used!