You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FYI: You can compress your Pixel Pals by using the Unicode Block Elements: https://en.wikipedia.org/wiki/Block_Elements (use one color for "foreground" color and another for "background" color which can be done via {crayon})
You can "losslessly" use "full", "top half", "bottom half", and space to vertically pack "two pixels" within a single character (instead of "one pixel" horizontally spread across two characters)
I think "lossy" alogrithms to compress even further using Unicode Block Elements do exist (as used by terminal image viewers) but perhaps out of scope...
The R packages {bittermelon} and {bdftools} both do this for compactly rendering bitmap fonts glyphs in the terminal e.g. bittermelon::bm_compress():
Thank you, this is great advice - I did not know about block elements. I reckon it should be possible to have a pixel pal that is 2X the resolution at the same size combining background and foreground. Will definitely try!
This works mostly, but I still have some issues in some terminals with different line heights and jagged appearance.
In RStudio I was able to modify the CSS of the theme to have a better line height, but in other terminals this is not always possible. Sys.getenv() does not always work well for detecting the type of terminal. Will have to think more about this.
FYI: You can compress your Pixel Pals by using the Unicode Block Elements: https://en.wikipedia.org/wiki/Block_Elements (use one color for "foreground" color and another for "background" color which can be done via
{crayon}
)The R packages
{bittermelon}
and{bdftools}
both do this for compactly rendering bitmap fonts glyphs in the terminal e.g.bittermelon::bm_compress()
:The text was updated successfully, but these errors were encountered: