NTK and The NTK Project
are properties of Jn Dechereux
Home | Documentation | FAQ.
Vanilla 1.1.8 is a product of Lussumo. More Information: Documentation, Community Support.
_DLL FUNCTION CreateScalableFontResource( nHidden AS int, cFontRes AS string , cFontFile AS string ,; cCurrentPath AS string ) AS bool PASCAL:GDI32.CreateScalableFontResourceA
. . . hFontDigit := nil . . . // Load, then create a memory font object from an external TTF file IF CreateScalableFontResource( 0,; // 0=RW permission - 1=RO permission+Hidden from other apps. ".\res\digital-7 (mono).fot",; // filename for font resource ".\res\digital-7 (mono).ttf",; // filename for scalable font NULL ) // path to font file If NTK_AddFontResource( ".\res\digital-7 (mono).fot" ) >0 CREATE FONT hFontDigit FACENAME "DIGITAL-7" SIZE -20 WIDTH 7 WEIGHT FW_MEDIUM PITCH FIXED_PITCH if hFontDigit == 0 alert( "cannot Create the Digital font, so use a default one... " ) hFontDigit := NTK_GetStockObject( SYSTEM_FONT ) endif Else alert( "cannot add the Digital font as a new resource, so use a default one... " ) hFontDigit := NTK_GetStockObject( SYSTEM_FONT ) EndIf ELSE alert( "cannot Load the Digital font, so use a default one... " ) hFontDigit := NTK_GetStockObject( SYSTEM_FONT ) ENDIF . . .
1 to 6 of 6