forked from JanDeDobbeleer/oh-my-posh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
1 parent
4eb3b43
commit e27d34a
Showing
7 changed files
with
74 additions
and
10 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters