Commit graph

8 commits

Author SHA1 Message Date
Jan De Dobbeleer c30901ba81 chore(go): update dependencies 2021-11-26 14:25:20 +01:00
Jan De Dobbeleer 6eb9a2e492 fix(image): remove braille blank before export 2021-11-15 13:12:18 +01:00
Nick Craver 4bcef332a5
fix: os fonts in theme renders
There's a bug in the wiki ranges that I noticed in the
final Ubuntu renders cutting off the Ubuntu logo,
this should resolve it.

Issue filed on nerd fonts to fix the wiki here: 
ryanoasis/nerd-fonts#667
2021-09-21 20:11:38 +02:00
Nick Craver e27d34a1cb
feat: improved theme png rendering
* feat: improved theme png rendering

Overall this improves glyph rendering in the theme PNGs for docs.
Changes:
- Replaces VictorMono with latest Hack nerd font
- When calculating overall width, count glyphs as double wide
- When rendering a glyph, allow ~1.7x space (this seemed right testing many)

I hope this is a net improvement that helps theme renders be a bit more accurate and shine!

* move to 2x for overall width expansion

1.7 introduces some odd offset problems with some backgrounds - 2x is stable.

* Based on data from:
https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points
...checking those points for nerd font glyphs in play

I'm unfamiliar with Go here and maybe there's a better way to implement,
but the results are much improved.

* tweak ranges and bg position for font diff

* exclude pixelated (e0c4-e0c7) from doube-width

* simplify cyclomatic complexity

Go checks were unhappy - this isn't a hot path so breaking it out
into a format that matches the docs, for easier maintenance.

* I have no idea what I'm doing

...but I hope this works - bit simpler layout to maintain too.

* fix: add comments

Good PR feedback - adding some more commentary for anyone coming across these bits later

* typo
2021-09-18 15:37:15 +02:00
Nick Craver bf51f59ceb
feat: image background color 2021-09-17 20:34:43 +02:00
Jan De Dobbeleer 50473767a7 chore(ci): replace golint with revive 2021-05-21 20:33:11 +02:00
Jan De Dobbeleer b11b69f0e8 refactor: ansi module cleanup 2021-04-21 19:54:43 +02:00
Jan De Dobbeleer afb69b4229 feat: export image of the current theme 2021-04-11 10:53:10 +02:00