- Code: Select all Expand view RUN
// Some tests with fonts capabilities
#include "FiveWin.ch"
Function Main()
LOCAL oWnd, oSay, oSay2
Local oFontCalibri12
DEFINE FONT oFontCalibri12 NAME "Calibri" SIZE 0, -12
DEFINE WINDOW oWnd FROM 1,5 TO 20,65 ;
TITLE "Test font. oSay:oFont:lBold is always .t.!"
@ 11.5,10 SAY oSay PROMPT "Is this bold... Font Calibri12 ?" // FONT oFontCalibri12
@ 10,10 SAY oSay2 ;
PROMPT "Is this bold now?" OF oWnd
@ 2,10 BUTTON "Change Font";
SIZE 100,50;
ACTION ( ( oSay2:SelFont() ), oSay2:Refresh() ) OF oWnd
@ 2,40 BUTTON "Bold?" SIZE 100,50;
ACTION MsgInfo(If(oSay:oFont:lBold,"Yes, oSay:oFont:lBold says it's BOLD!","NOT BOLD, OK?")) OF oWnd
SET FONT OF oSay TO oFontCalibri12
ACTIVATE WINDOW oWnd
oFontCalibri12:End()
RETURN NIL
Saludos.