Of course you can add ttf directly:
I used Zip to make the .exe file have a smaller size.edk wrote: ↑Fri Apr 21, 2017 9:09 am Or without .zip:
.RC file:.PRG file:Code: Select all
segoeuil RCDATA res\segoeuil.ttf
Code: Select all
IF !FILE('segoeuil.ttf') STRFILE(HMG_LoadResourceRawFile ( 'segoeuil', RT_RCDATA ),'segoeuil.ttf') ENDIF (...) cfnt:='segoeuil.ttf' AddFont(cfnt) SET FONT TO "Segoe UI Light", 13 (...) //on release of program RemoveFont(cfnt) *---------------------------------* FUNCTION AddFont(font) *---------------------------------* #define FR_PRIVATE 0x10 #define FR_NOT_ENUM 0x20 local nRet :=WAPI_ADDFONTRESOURCEEX(font, FR_PRIVATE+ FR_NOT_ENUM,0) RETURN nRet *---------------------------------* FUNCTION RemoveFont(font) *---------------------------------* #define FR_PRIVATE 0x10 #define FR_NOT_ENUM 0x20 local nRet := WAPI_REMOVEFONTRESOURCEEX(font, FR_PRIVATE+ FR_NOT_ENUM,0) RETURN nRet ****************************