about summary refs log tree commit diff stats
path: root/adapter/img/nanosvg.nim
Commit message (Collapse)AuthorAgeFilesLines
* myaddr: backport & switch to newSeqUninitbptato2025-04-301-1/+1
|
* dynstream: remove exceptionsbptato2025-02-261-5/+4
| | | | | | | | | | | | | Now we just pass down the value of n and check errno, plus readDataLoop/writeDataLoop returns a bool indicating whether it failed. For now this seems to work OK, but maybe I'll add a better abstraction in the future. EOFError is still used for handling failed packets; this is brittle, and should be replaced once we have a proper buffering mechanism for them. (That will also let us kill BufStream.) Unrelated: this also fixes a bug in buffer with cacheId.
* img: remove intermediate C filesbptato2025-01-301-3/+10
| | | | | | Nim doesn't consider included files when recompiling C files, which would sometimes lead to fixes not being compiled in without a clean build.
* nanosvg, myaddr: fix obuf type and myaddr shimbptato2024-12-201-1/+1
| | | | | | | this is exactly why I shimmed in unsafeAddr, but the compiler isn't cooperating... :( well, it seems to work with auto.
* img: add nanosvgbptato2024-12-191-0/+65
Only for SVG in image tags for now. Plus it comes with NanoSVG's limitations, i.e. no text. Still, better than nothing. I've gone through open tickets and PRs at upstream to check for known security issues. As a recurring theme I found that parseTransform fails to check the result of parseTransformArgs, so I fixed and refactored that part. (Probably not a security issue, but still UB.) Also, I've added a fix for an OOB read in parseColorRGB. Future directions: * replace nanosvgrast with our own rasterizer in canvas (will have to be extended somewhat...) * add text rendering (with unifont, which canvas already includes)