[fpc-pascal] [Lazarus] New in FPC: SVG support.
Michael Van Canneyt
michael at freepascal.org
Fri Nov 20 08:29:27 CET 2026
On Thu, 19 Nov 2026, Fabio Luis Girardi wrote:
> Hi Michael!
>
> The native SVG support will be officially released together with FPC 3.4.0?
Yes, it is in the FPC repo.
Michael.
>
> Em dom., 20 de set. de 2026 às 17:58, Michael Van Canneyt via lazarus <
> lazarus at lists.lazarus-ide.org> escreveu:
>
>>
>> Hi,
>>
>> FPC for a long time had support for raster images in fcl-image.
>> It now has support for what is probably the most used vector image today:
>> SVG.
>>
>> Support is broad:
>>
>> - All drawing primitives.
>> - Full font support (using platform native font support, freetype as
>> fallback).
>> - CSS support (using fcl-css)
>> - Animation support (SMIL)
>> - Filters
>> - paint servers (patterns)
>>
>> What is not supported:
>> - Javascript
>> - The DOM
>> - Color profiles (still planned)
>> Which is logical, since we're not in the browser.
>>
>> The code renders a SVG file to a fcl-image supported format.
>> For animated SVGs, the code can render a single frame at any given
>> timestamp,
>> or create a series of image frames in a GIF.
>>
>> The results have been carefully tuned and compared with the W3C SVG
>> reference
>> set of images, and conformance to the standard is very good:
>> mean/median difference <3%, barely visible with the naked eye.
>>
>> An example of what can be done is viewable in
>>
>> https://www.freepascal.org/~michael/svg/
>>
>> As part of the work, the existing GIF reader was extended and a GIF writer
>> was created - making the animation in the above page possible.
>>
>> The code is compilable with FPC 3.2.2, I'll upload the code to a separate
>> repo for those that want to use it with FPC 3.2.2
>> (it then needs trunk's fcl-css and image support included)
>>
>> Still to do:
>> - Color profiles
>> - Generate a PDF image from the SVG.
>> - Lazarus component(s).
>>
>> Enjoy!
>>
>> Michael.
>> --
>> _______________________________________________
>> lazarus mailing list
>> lazarus at lists.lazarus-ide.org
>> https://lists.lazarus-ide.org/listinfo/lazarus
>>
>
>
> --
> The best regards,
>
> Fabio Luis Girardi
> PascalSCADA Project
> http://sourceforge.net/projects/pascalscada
> http://www.pascalscada.com
>
More information about the fpc-pascal
mailing list