tachart nogui demo exeption lazarus / 55-TAChart ---------------------------------------------------------------------- pacific2 · 2013-02-04 08:53 Dear all I have just installed the 1.04 version under ubuntu. the compilation of nogui demo works fine but I get the following exception when I try to execute the program. No other problems on lazarus, may be a linux miss configuration ? anny idea? Thanks in advance [FORMS.PP] ExceptionOccurred   Sender=FreeTypeException   Exception=Font file "Arial.ttf" not found   Stack trace:   $0000000000802795   $0000000000803FED   $0000000000800D58   $00000000004C521B line 254 of ../../tadrawerfpcanvas.pas   $00000000006ACF06 line 492 of tatypes.pas   $00000000006D9C98 line 721 of tatypes.pas   $00000000006ADD62 line 586 of tatypes.pas   $00000000006D8417 line 570 of tachartaxisutils.pas   $000000000068D09F line 660 of tachartaxis.pas   $000000000068F0B9 line 950 of tachartaxis.pas   $00000000004BB1EA line 1184 of tagraph.pas   $00000000004B83F7 line 765 of tagraph.pas   $0000000000464918 line 39 of noguidemo.lpr TApplication.HandleException Font file "Arial.ttf" not found   Stack trace:   $0000000000802795   $0000000000803FED   $0000000000800D58   $00000000004C521B line 254 of ../../tadrawerfpcanvas.pas   $00000000006ACF06 line 492 of tatypes.pas   $00000000006D9C98 line 721 of tatypes.pas   $00000000006ADD62 line 586 of tatypes.pas   $00000000006D8417 line 570 of tachartaxisutils.pas   $000000000068D09F line 660 of tachartaxis.pas   $000000000068F0B9 line 950 of tachartaxis.pas   $00000000004BB1EA line 1184 of tagraph.pas   $00000000004B83F7 line 765 of tagraph.pas   $0000000000464918 line 39 of noguidemo.lpr exception at 0000000000802795: Font file "Arial.ttf" not found. ---------------------------------------------------------------------- Ask · 2013-02-04 09:06 The demo requires font file, "Arial.ttf", which you should put in the same directory as demo executable. ---------------------------------------------------------------------- pacific2 · 2013-02-04 09:58 Thanks for your rapid answer Actually I have already tryed this solution but it appear that the file Arial.ttf was empty (it seems thats there is several of such files on ubuntu ???) Anyway I get a not empty file and I tryed again. This time I get a new error type (see below). I conclude that all Arial.ttf are not suitable. Can you please tell me where can I get the good one. [FORMS.PP] ExceptionOccurred   Sender=FreeTypeException   Exception=Error 6 while making string bitmaps step 4   Stack trace:   $00000000008017DE   $000000000080186B   $00000000008034BF   $0000000000803CB0   $000000000080124E   $0000000000800EDE   $00000000004B0FF2   $00000000004AFB69   $00000000004C5312 line 275 of ../../tadrawerfpcanvas.pas   $00000000004C7B42 line 349 of tadrawutils.pas   $00000000006ADD8E line 587 of tatypes.pas   $00000000006D8417 line 570 of tachartaxisutils.pas   $000000000068D09F line 660 of tachartaxis.pas   $000000000068F0B9 line 950 of tachartaxis.pas   $00000000004BB1EA line 1184 of tagraph.pas   $00000000004B83F7 line 765 of tagraph.pas   $0000000000464918 line 39 of noguidemo.lpr TApplication.HandleException Error 6 while making string bitmaps step 4   Stack trace:   $00000000008017DE   $000000000080186B   $00000000008034BF   $0000000000803CB0   $000000000080124E   $0000000000800EDE   $00000000004B0FF2   $00000000004AFB69   $00000000004C5312 line 275 of ../../tadrawerfpcanvas.pas   $00000000004C7B42 line 349 of tadrawutils.pas   $00000000006ADD8E line 587 of tatypes.pas   $00000000006D8417 line 570 of tachartaxisutils.pas   $000000000068D09F line 660 of tachartaxis.pas   $000000000068F0B9 line 950 of tachartaxis.pas   $00000000004BB1EA line 1184 of tagraph.pas   $00000000004B83F7 line 765 of tagraph.pas   $0000000000464918 line 39 of noguidemo.lpr exception at 00000000008017DE: Error 6 while making string bitmaps step 4. ---------------------------------------------------------------------- Ask · 2013-02-04 12:21 I am not sure how to help here -- I am on Windows, and both system font file and random file found with Google worked for me. Anyway, it is planned in the nearest future to use LazFreeType librsary for Nogui chart, which should at least be easier to debug. ---------------------------------------------------------------------- pacific2 · 2013-02-04 18:36 thank you Asck I tried to see where occurs the error. if I put under comment the following line, the png file is generated but with a black picture chart.Draw(d, Rect(0, 0, chart.Width, chart.Height)); ---------------------------------------------------------------------- Ask · 2013-02-05 00:26 This is to be expected -- chart.Draw procedure draws the chart, so is you comment it out, nothing happens. Please post your version of ttf file, so I can try it. ---------------------------------------------------------------------- pacific2 · 2013-02-05 09:42 here is 2 examples of font I tried with no success. I also triad an other arial font but it was too big (>700ko) to put it in the post attachement. good luck ;-) ---------------------------------------------------------------------- Ask · 2013-02-05 10:10 Both fonts worked for me on Windows (although the Times font is unreadable at such a small size). Perhaps update your FreeType? Alternatively, see this topic. ---------------------------------------------------------------------- pacific2 · 2013-02-05 11:59 the freetype seems to be uptodate. Furthermore, the following program works fine, font are corectly displayed. I will see the the discussion on TBGRABitmap + NoGUI http://wiki.freepascal.org/Developing_with_Graphics#Drawing_text_with_ sharp_edges_.28non_antialiased.29 ---------------------------------------------------------------------- Ask · 2013-02-05 12:58 This programs uses widgetset font drawing procedures, not freetype directly. ---------------------------------------------------------------------- pacific2 · 2013-02-05 14:40 A possible sub optimal solution (that works for my purpose) could be to delete the orientation indications I comment the following lines:  d.DoGetFontOrientation  := @CanvasGetFontOrientationFunc; -> no more errors at the execution but le left axis is not clean I delete the following in order to have a bit clearer left axis chart.LeftAxis.Marks.Frame.Style := psSolid;