Recent

Author Topic: Lightweight HTML/CSS rendering engine written in pure Free Pascal  (Read 6447 times)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12865
  • FPC developer.
Re: Lightweight HTML/CSS rendering engine written in pure Free Pascal
« Reply #30 on: March 18, 2026, 10:16:53 am »
(maybe consider gitlab, because that is what FPC and Lazarus use?)

Would be great to see if it can be integrated into the CHM viewer.

dsiders

  • Hero Member
  • *****
  • Posts: 1617
Re: Lightweight HTML/CSS rendering engine written in pure Free Pascal
« Reply #31 on: March 18, 2026, 04:56:12 pm »
(maybe consider gitlab, because that is what FPC and Lazarus use?)

+1. Users only need one account to report bugs.

Would be great to see if it can be integrated into the CHM viewer.

Good luck with that one. This came up with IPro versus THtmlViewer - and that didn't go anywhere.


avra

  • Hero Member
  • *****
  • Posts: 2586
    • Additional info
Re: Lightweight HTML/CSS rendering engine written in pure Free Pascal
« Reply #32 on: March 18, 2026, 05:56:26 pm »
Would there be interest in seeing this released as open source?
+1

Hoping for some commercial friendly license (like https://wiki.lazarus.freepascal.org/FPC_modified_LGPL:D
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

AlexTP

  • Hero Member
  • *****
  • Posts: 2709
    • UVviewsoft
Re: Lightweight HTML/CSS rendering engine written in pure Free Pascal
« Reply #33 on: March 18, 2026, 06:14:16 pm »
I could use it in the CudaText editor. It can be the internal web-view control and app can expose Python API to this control (like it does for ListBox, TreeView, Buttons). Then Py programmers could improve 'Markdown Preview' plugin. It converts Markdown to HTML and calls yet the OS browser to show HTML.
« Last Edit: March 18, 2026, 06:15:47 pm by AlexTP »

JD

  • Hero Member
  • *****
  • Posts: 1913
Re: Lightweight HTML/CSS rendering engine written in pure Free Pascal
« Reply #34 on: March 19, 2026, 08:23:38 am »
I could use it in the CudaText editor. It can be the internal web-view control and app can expose Python API to this control (like it does for ListBox, TreeView, Buttons). Then Py programmers could improve 'Markdown Preview' plugin. It converts Markdown to HTML and calls yet the OS browser to show HTML.

+1
That's a great idea.
Linux Mint - Lazarus 4.6/FPC 3.2.2,
Windows - Lazarus 4.6/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

Wallaby

  • Guest

JD

  • Hero Member
  • *****
  • Posts: 1913
Linux Mint - Lazarus 4.6/FPC 3.2.2,
Windows - Lazarus 4.6/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

mdalacu

  • Full Member
  • ***
  • Posts: 245
    • dmSimpleApps
Re: Lightweight HTML/CSS rendering engine written in pure Free Pascal
« Reply #37 on: March 19, 2026, 08:48:42 am »
Great!!! It should be included in OPM!
Many thanks!

ALLIGATOR

  • Sr. Member
  • ****
  • Posts: 419
  • I use FPC [main] 💪🐯💪
Re: Lightweight HTML/CSS rendering engine written in pure Free Pascal
« Reply #38 on: March 19, 2026, 08:53:14 am »
That's awesome! I'll have to give it a star ⭐

We should also add it to the Awesome Pascal list https://github.com/Fr0sT-Brutal/awesome-pascal
and share the info through our usual channels (messenger groups, forums, aggregators (www.beginend.net))
I may seem rude - please don't take it personally

Wallaby

  • Guest
Re: Lightweight HTML/CSS rendering engine written in pure Free Pascal
« Reply #39 on: March 19, 2026, 08:57:05 am »
That's awesome! I'll have to give it a star ⭐

We should also add it to the Awesome Pascal list https://github.com/Fr0sT-Brutal/awesome-pascal
and share the info through our usual channels (messenger groups, forums, aggregators (www.beginend.net))

Thanks! Let's test it thoroughly though - I am sure there are bugs lurking beneath the surface :-)


zeljko

  • Hero Member
  • *****
  • Posts: 1932
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lightweight HTML/CSS rendering engine written in pure Free Pascal
« Reply #41 on: March 19, 2026, 09:42:32 am »
Pixie.Canvas.Cairo.pas needs a little bit of tuning, now it is gtk2 only, so LCLGtk2 define should be used for gtk2 and LCLGtk3 for gtk3, I'l l look into if I have enough time, same for Qt/Qt5/Qt6 canvas implementation.

Wallaby

  • Guest
Re: Lightweight HTML/CSS rendering engine written in pure Free Pascal
« Reply #42 on: March 19, 2026, 10:30:35 am »
Pixie.Canvas.Cairo.pas needs a little bit of tuning, now it is gtk2 only, so LCLGtk2 define should be used for gtk2 and LCLGtk3 for gtk3, I'l l look into if I have enough time, same for Qt/Qt5/Qt6 canvas implementation.

Gtk3 support added, I'll have a look at Qt a bit later - the main issue is that QSvgRenderer is missing from the Pascal interface DLL.

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1946
Re: Lightweight HTML/CSS rendering engine written in pure Free Pascal
« Reply #43 on: March 19, 2026, 11:17:58 am »
Thanks! Looks good.

At first, I had a problem with compiling:
Pixie.Table.pas(881,43) Error: Illegal type conversion: “Int64” to “Single”

I just removed the type cast, and then it worked.

Lazarus 4.99 (rev main_4_99-3785-gaeac73c5d3) FPC 3.2.2 x86_64-linux-gtk2

myisjwj

  • Full Member
  • ***
  • Posts: 104
Re: Lightweight HTML/CSS rendering engine written in pure Free Pascal
« Reply #44 on: March 19, 2026, 01:48:36 pm »
Thanks! Looks good.
1
function TPixieCssLength.CalcPercent(AWidth: pixel_t): pixel_t;
begin
  if not IsPredefined then
  begin
    if FUnits = cssUnitsPercentage then
      //Result := pixel_t(AWidth * FValue / 100.0)  <-Error: Illegal type conversion: "Double" to "Single"
Result := Extended(AWidth * FValue / 100.0)
    else
      Result := pixel_t(Val);
  end
  else
    Result := 0;
end;
2
Have you noticed that? The scroll bar on the right side of TPixieHtmlView is not functional.
3
It would be even better if there were a script (such as JavaScript) that could handle the callback event.
« Last Edit: March 19, 2026, 01:58:21 pm by myisjwj »

 

TinyPortal © 2005-2018