On 22 March 2012 13:04, Felipe Monteiro de Carvalho wrote:
>
> Even smaller then fpgui because LCL-CustomDrawn has it's own text
> rendering system =)

Interesting, but unfortunately it seems LCL-CustomDrawn is still far
from real-world usage, so I don't think it can be counted (yet). From
what I have read, it doesn't seem feature complete or stable. eg: just
dropping a TLabel on a TForm, gives me an instant crash at runtime.

-----------------------------
$ gdb ./project1
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/test2/project1...done.
(gdb) break fpc_raiseexception
Breakpoint 1 at 0x5c7380
(gdb) run
Starting program: /tmp/test2/project1
WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0
WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0
WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0
WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0

Program received signal SIGSEGV, Segmentation fault.
0x00000000005c6934 in fpc_do_is ()
(gdb) bt
#0  0x00000000005c6934 in fpc_do_is ()
#1  0x00007fffffffcdd0 in ?? ()
#2  0x00000000004d9681 in SELECTOBJECT (this=0x7ffff7f79040,
    DC=140737353524096, GDIOBJ=18446744073573964480)
    at ../../../../lazarus/lcl/interfaces/customdrawn/customdrawnwinapi.inc:5323
#3  0x000000000043ea23 in DRAWTEXT (this=0x7ffff7f79040, DC=140737353524096,
    STR=0x7ffff7ff1ad0 "Label1", COUNT=6, RECT=..., FLAGS=352)
    at ../../../lazarus/lcl/include/intfbasewinapi.inc:744
#4  0x00000000004c6399 in DRAWTEXT (DC=140737353524096,
    STR=0x7ffff7ff1ad0 "Label1", COUNT=6, RECT=..., FLAGS=352)
    at ../../../lazarus/lcl/include/winapi.inc:216
#5  0x00000000004939df in TEXTRECT (this=0x7ffff7f49cc0, ARECT=..., X=0, Y=0,
    TEXT=0x7ffff7ff1ad0 "Label1", STYLE=...)
    at ../../../lazarus/lcl/include/canvas.inc:1312
#6  0x0000000000552faa in PAINT (this=0x7ffff7f98ed0)
    at ../../../lazarus/lcl/include/customlabel.inc:473
#7  0x00000000005288ae in WMPAINT (this=0x7ffff7f98ed0, MESSAGE=...)
    at ../../../lazarus/lcl/include/graphiccontrol.inc:64
#8  0x00000000005c6e41 in SYSTEM_TOBJECT_$__DISPATCH$formal ()
#9  0x00000000005287d8 in DESTROY (this=0x7ffff7f98ed0, vmt=0x7fffffffd338)
    at ../../../lazarus/lcl/include/graphiccontrol.inc:46
#10 0x000000000051c0e3 in PERFORM (this=0x7ffff7f98ed0, MSG=15,
---Type <return> to continue, or q <return> to quit---
    WPARAM=140737353524096, LPARAM=0)
    at ../../../lazarus/lcl/include/control.inc:1402
#11 0x000000000050ca3f in PAINTCONTROLS (this=0x7ffff7f407f0,
    DC=140737353524096, FIRST=0x0)
    at ../../../lazarus/lcl/include/wincontrol.inc:4826
#12 0x000000000050c7d0 in PAINTHANDLER (this=0x7ffff7f407f0, THEMESSAGE=...)
    at ../../../lazarus/lcl/include/wincontrol.inc:4744
#13 0x00000000005115b7 in WMPAINT (this=0x7ffff7f407f0, MSG=...)
    at ../../../lazarus/lcl/include/wincontrol.inc:6606
#14 0x0000000000528f7d in WMPAINT (this=0x7ffff7f407f0, MESSAGE=...)
    at ../../../lazarus/lcl/include/customcontrol.inc:112
#15 0x00000000005c6e41 in SYSTEM_TOBJECT_$__DISPATCH$formal ()
#16 0x0000000000528f38 in ?? ()
#17 0x00007ffff7f407f0 in ?? ()
#18 0x0000000000000001 in ?? ()
#19 0x000000000000000f in ?? ()
#20 0x00007fffffffd910 in ?? ()
#21 0x00007ffff7f407f0 in ?? ()
#22 0x0000000000000001 in ?? ()
#23 0x00007fffffffdbc8 in ?? ()
#24 0x00007fffffffe250 in ?? ()
#25 0x0000000000000000 in ?? ()
(gdb)
----------------------------------------------


Removing the TLabel and replacing it with a TButton does work however.
Though it produces some nasty X11 errors when I quit the application.

------------------------------------------
$ ./project1
WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0
WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0
WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0
WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  4 (X_DestroyWindow)
  Resource id in failed request:  0x840decc0
  Serial number of failed request:  127
  Current serial number in output stream:  128
------------------------------------------


Either way, interesting none the less. Just a quick glans at the
LCL-CustomDrawn text code. It seems like a Object Pascal
implementation of the FreeType library. Correct? Who did that work?
And how up to date is it with the actual FreeType library? Are all
FreeType library features implemented? glyph vector data extraction,
bitmap fonts, anti-alias hinting, kerning, text rotation etc..

Depending on the license, I might just take a look at that code too. ;-)


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to