4/4 I used #nanosvg with my #Tuxmath patches and with a GPL version of mupdf I've experimented with to add lighter & better #SVG support. The #ggwm fork of #jwm used nanosvg to add SVG support to a lightweight, low dependency window manager. Know of any other fun SVG projects? #AskFedi #DFD2026
2/4 #librsvg is a popular #C/C++ SVG library. For years, I searched for a lighter option. #sdl_svg was good but not perfect. #nanosvg makes a great alternative. It's used by #SDL_image & #FLTK projects & others. I would love to combine the best patches from the nanosvg forks. #DFD2026

- Updated #tiff to 4.7.1

- Updated pl_mpeg

- Updated #nanoSVG

- Updated #libpng to 1.6.50

- Updated #jasper to 4.2.8

- Updated #AnimatedGIF to 2.2.0

- Moved mbedTLS config out of the source tree

- Added more examples/tests

- Added my #VCFe talk slides from May, 2025

#MSDOS #DOSGaming #retrocomputing #JavaScript #FreeDOS #creativecoding #p5js #retrodev #retrodevelopment #3dfx #OpenGL #Processing
3/

Also time to say thanks to @MikkoMononen for his #nanosvg library! This came to the rescue adding support for fonts with #svg #glyphs *without* pulling in dependencies like rust and cairo 😁

Hi @dnkl, for a project (#X11 with #XRender using #xcb, still in experimentation phase), I was looking for a sane way to render #SVG fonts with #freetype. Looking for a sane library to do the rasterizing, I finally found the solution (#nanosvg πŸ‘) in your #fcft project (thanks!).

I tried to "steal" your metrics calculations at first, but the result was completely broken with the "Twitter Color Emoji" font, so I started over (meanwhile ditching most floating-point stuff in favor of freetype's fixed-point formats), and now the result looks sane. In case you're interested, here's my nanosvg/freetype adapter:
https://github.com/Zirias/xmoji/blob/master/src/bin/xmoji/svghooks.c

But of course I have doubts now, maybe the font I'm testing with is "unusual"? Which fonts do you test with? Thanks!

xmoji/src/bin/xmoji/svghooks.c at master Β· Zirias/xmoji

Contribute to Zirias/xmoji development by creating an account on GitHub.

GitHub

#xcb #X11 #programming adventure continued... I managed to add SVG support! πŸ₯³
https://github.com/Zirias/xmoji/commit/05ceefbec24364f42173dadf0bb6bbdcb2653843

Thanks to #nanosvg, I could avoid the dependency "monster" librsvg (pulling in rust and cairo). As long as such nice "just do the thing as simple as possible" #opensource projects exist, good software engineering isn't dead yet!
https://github.com/memononen/nanosvg

Connecting this to #freetype wasn't that hard, except for the "calculate font metrics" part, which I almost certainly got horribly wrong, i just did trial&error until the #Twitter #emoji font looked somewhat sane. πŸ™ˆ

Here's a screenshot using these SVG emojis in 56pt ... and for comparison Google's "Noto" emojis (scaled by my own bitmap-scaling code) in the same size.

Font: Add SVG support via nanosvg Β· Zirias/xmoji@05ceefb

Contribute to Zirias/xmoji development by creating an account on GitHub.

GitHub

#NanoSVG is a tiny #SVG #library.

NanoSVG is a parser and rasterizer for scalable vector graphics (SVG) data. NanoSVG loads SVG into a tree of objects composed of BΓ©zier curves, which can be iterated through. Coordinates are converted into uniform coordinates specified by the user. NanoSVG's rasterizer renders simple flat SVG into pixel data.

Website πŸ”—οΈ: https://github.com/memononen/nanosvg

#free #opensource #foss #fossmendations #programming #graphics

GitHub - memononen/nanosvg: Simple stupid SVG parser

Simple stupid SVG parser. Contribute to memononen/nanosvg development by creating an account on GitHub.

GitHub

My project #fnott (notification daemon) uses #nanosvg to render SVG icons.

I've always thought the rendered icons looked bad, compared to the ones rendered by librsvg. I chalked it up to nanosvg being "simple stupid" [sic].

Turns out /I'm/ stupid.

Nanosvg produces RGBA output that is NOT pre-multiplied.

But, pixman expects pre-multiplied color channels.

Blend a non-premultplied image as if it was pre-multiplied, and the result is, well, crap.

https://github.com/memononen/nanosvg

GitHub - memononen/nanosvg: Simple stupid SVG parser

Simple stupid SVG parser. Contribute to memononen/nanosvg development by creating an account on GitHub.

GitHub