Closed fredvs closed 2 years ago
That's a good point
Related to https://github.com/bgrabitmap/bgrabitmap/issues/168
Now there is only a dependency to freetypelaz and FCL.
Actually you don't need to download all Lazarus. You can just get the following directory: https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main/components/freetype
Actually you don't need to download all Lazarus. You can just get the following directory: https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main/components/freetype
I believe you also need components/lazutils, otherwise you get this error:
Compiling /home/roland/Documents/pascal/sources/bgrabitmap-11.5.4/bgrabitmap/bgrafreetype.pas
Compiling /home/roland/lazarus-trunk-2023-04-19/lazarus/components/freetype/easylazfreetype.pas
easylazfreetype.pas(22,31) Fatal: Can't find unit Laz_AVL_Tree used by EasyLazFreeType
LazUtils is still needed for FreeType implementation.
I've made a BGRABitmap4NoLCL package that doesn't use any of the LCL.
Note that it does not have font rendering (no system rendering, no FreeType rendering). You can have the same result by applying -dBGRABITMAP_DONT_USE_LAZFREETYPE compiler option.
MSEgui has his own font rendering, including unicode and freefonts.
Maybe use this instead of font rendering from Lazarus? I will check in BGRAUTF8 maybe it could be done easy when msegui was assigned...
Well yes in fact in MSEgui you may render with the system using what's provided my MSEgui. So maybe you don't need FreeType at all.
In what case is lazutf8 used?
In the msegui demo _FractalTree that you provided in BGABitmap/test/, it uses bmp.TextOut() and the rendering is perfect, even for Chineese chars. https://github.com/bgrabitmap/bgrabitmap/blob/master/test/test4ideu/fractal_tree/main.pas
Is lazutf8 needed there?
I suppose it is not needed as it was necessary for FreeType which is not used anymore
Tested msegui /test/fractal_tree from last BGRABitmap release. Without any lazutf8.pas added nor path to directory to lazutils.
Perfect, compiles without cry and nice font-rendering.
Trick: for not latin-root font in Linux, use a universal font, like Unifont:
bmp.FontName := 'Unifont';
Also try to compile StrumPract, deleting all lazutf8 dependencies. The same, compiles without tears, and nice rendering.
So good to feel free! ;-)
Well done and many thanks.
Hello.
Very little detail.
When using the _fractaltree.prj project file given in: https://github.com/bgrabitmap/bgrabitmap/tree/master/test/test4ideu/fractal_tree
there could be problem for user at compilation: https://github.com/mse-org/mseide-msegui/discussions/55#discussioncomment-5955926
This because when using some {$ ifdef ...} fpc ignore it without using the -B (rebuild all) parameter.
In attachment, the fractal_tree.prj file with -B option added. Also the color of warning and error messages were inversed, it is fixed in the attachment.
It would be great if you could replace the fractal_tree.prj so people will be able to compile out-of-the-box.
Thanks.
Ok I've applied the change on dev branch
Many thanks!
Thank you too!
Hello.
When compiling a console or msegui application, bgrabitmap needs files from /lazarus/components/lazutils/.
Could it be possible to consider to add in bgrabitmap directory the files needed to not oblige people to install all Lazarus ?
In attachment the files needed.
lazdep.zip