I test the EasyLazFreeType from lazutils package. I cannot make the example work (in directory examples\lazfreetype).
It stops with this stack trace:
#0 HANDLEERRORADDRFRAME(44954876, 0x2adf500, 0x2adf590) at P:\software\FPC\trunk_src\rtl\inc\system.inc:1133
#1 HANDLEERRORADDRFRAMEIND(210, 0x576820, 0x2adf590) at P:\software\FPC\trunk_src\rtl\inc\system.inc:1152
#2 fpc_objecterror at P:\software\FPC\trunk_src\rtl\inc\system.inc:741 #3 LOADFACE(0x2c5c590) at easylazfreetype.pas:858
#4 CHECKFACE(0x2c5c590) at easylazfreetype.pas:1862 #5 FETCHNAMES(0x2c5c590) at easylazfreetype.pas:1815 #6 GETINFORMATION(0x2c5c590, FTIFULLNAME) at easylazfreetype.pas:1007 #7 TFORM1__FORMPAINT(0x2c1c030, <error reading variable>) at mainform.pas:192
#8 PAINT(0x2c1c030) at include\customcontrol.inc:73 #9 PAINTWINDOW(0x2c1c030, 738278591) at include\customform.inc:1111 #10 PAINTHANDLER(0x2c1c030, {MSG = 15, DC = 738278591, PAINTSTRUCT = 0x2adfad0, RESULT = 0}) at include\wincontrol.inc:4801 #11 WMPAINT(0x2c1c030, {MSG = 15, DC = 738278591, PAINTSTRUCT = 0x2adfad0, RESULT = 0}) at include\wincontrol.inc:6754 #12 WMPAINT(0x2c1c030, {MSG = 15, DC = 738278591, PAINTSTRUCT = 0x2adfad0, RESULT = 0}) at include\customcontrol.inc:106 #13 TOBJECT__DISPATCH(void, <error reading variable>) at P:\software\FPC\trunk_src\rtl\inc\objpas.inc:602
#14 WNDPROC(0x2c1c030, {MSG = 15, WPARAM = 738278591, LPARAM = 44956368, RESULT = 0, WPARAMLO = 15551, WPARAMHI = 11265, WPARAMFILLER = {}, LPARAMLO = 64208, LPARAMHI = 685, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {}}) at include\control.inc:2100 #15 WNDPROC(0x2c1c030, {MSG = 15, WPARAM = 738278591, LPARAM = 44956368, RESULT = 0, WPARAMLO = 15551, WPARAMHI = 11265, WPARAMFILLER = {}, LPARAMLO = 64208, LPARAMHI = 685, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {}}) at include\wincontrol.inc:5386 #16 WNDPROC(0x2c1c030, {MSG = 15, WPARAM = 738278591, LPARAM = 44956368, RESULT = 0, WPARAMLO = 15551, WPARAMHI = 11265, WPARAMFILLER = {}, LPARAMLO = 64208, LPARAMHI = 685, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {}}) at include\customform.inc:1455 #17 DELIVERMESSAGE(0x2c1c030, 0) at lclmessageglue.pas:112 #18 SENDPAINTMESSAGE(0x2c4c280, 0) at win32\win32callback.inc:696 #19 DOWINDOWPROC(0x2c4c280) at win32\win32callback.inc:2198 #20 WINDOWPROC(2760662, 15, 0, 0) at win32\win32callback.inc:2590 #21 CUSTOMFORMWNDPROC(2760662, 15, 0, 0) at win32\win32wsforms.pp:386 #22 USER32!SetMessageQueue at :0
#23 USER32!CancelShutdown at :0
#24 USER32!DlgDirListComboBoxW at :0
#25 USER32!PrivateExtractIconExA at :0
#26 ?? at :0
#27 USER32!DlgDirListComboBoxW at :0
#28 APPPROCESSMESSAGES(0x2c378f0) at win32\win32object.inc:407 #29 HANDLEMESSAGE(0x2bdfd40) at include\application.inc:1262 #30 RUNLOOP(0x2bdfd40) at include\application.inc:1399 #31 INTERFACEBASE$_$TWIDGETSET_$__$$_APPRUN$TAPPLICATIONMAINLOOP at :0 #32 RUN(0x2bdfd40) at include\application.inc:1387 #33 :17
The actual problem is in TFreeTypeFont.LoadFace line "familyItem := Collection.Family[FName];" where Collection is nil (the FontCollection global variable in EasyLazFreeType is nil).
I downloaded all font files and placed them into the directory, they are correctly loaded.
Can somebody help? :)
Ondrej
