Skip to main content
GameDev.net gamedev.net
🔒 Locked

CreateFont

Started by aboeing Dec 23, 2005 at 3:28 AM 0 replies 550+ views
Original Post
aboeing
aboeing
Hi, Does anyone know how to create a font of a specific type? I am using the technique outlined here: cfxweb - Antialiased font rendering When I try to create a non-existing font, such as CreateFont("fdlskfjdlskfjdsl"), the function still succeds in createing a default font. What I would like to do is create a font of the type "ScriptC", and if this fails select a similar type, and have it notify me that the requested font was not available. (apparently 'script' is meant to be a standard font - but most people dont seem to have it..) I have tried using the "EnumFontFamilies" function, but it with no luck. Thanks.
aboeing
aboeing
Woops, using the wrong definition for the callback function.

Heres the correct version for future reference:
BOOL CALLBACK EnumFamCallBack(LPLOGFONT lplf, LPNEWTEXTMETRIC lpntm, DWORD FontType, LPVOID) {
return TRUE;
};

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.