r-lib / cli

Tools for making beautiful & useful command line interfaces
https://cli.r-lib.org/
Other
642 stars 69 forks source link

Sparkline full bar not rendering properly #615

Open be-green opened 1 year ago

be-green commented 1 year ago

For some reason when I run the cli::spark_bar command, the full bars are missing a bottom section. I have absolutely no idea why! Other full height utf8 characters seem to render ok. I realize this is almost certainly outside the scope of the package, but thought I would ask just in case.

Screen Shot 2023-06-25 at 8 26 26 AM

This does not happen in my terminal. Screen Shot 2023-06-25 at 8 29 17 AM

If I should instead open an issue w/ RStudio let me know.

RStudio Version:

$mode
[1] "desktop"

$version
[1] ‘2023.3.1.446’

$long_version
[1] "2023.03.1+446"

$release_name
[1] "Cherry Blossom"

I updated my RStudio to the current release on the website (as of 06/25) but had the same issue.

Session Info:

> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.5.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] devtools_2.4.2 usethis_2.1.3 

loaded via a namespace (and not attached):
 [1] rstudioapi_0.14   magrittr_2.0.3    pkgload_1.2.4     R6_2.5.1         
 [5] rlang_1.1.1       fastmap_1.1.1     tools_4.1.2       pkgbuild_1.3.1   
 [9] sessioninfo_1.2.1 cli_3.6.1         withr_2.5.0       ellipsis_0.3.2   
[13] remotes_2.4.1     rprojroot_2.0.3   lifecycle_1.0.3   crayon_1.5.2     
[17] processx_3.5.3    purrr_1.0.1       callr_3.7.0       vctrs_0.6.2      
[21] fs_1.6.2          ps_1.6.0          testthat_3.1.0    memoise_2.0.0    
[25] glue_1.6.2        cachem_1.0.6      compiler_4.1.2    desc_1.4.1       
[29] prettyunits_1.1.1
gaborcsardi commented 1 year ago

I don't see this, probably a font issue. Try changing the font or theme. If it is a font issue, can you please tell me which font(s) you see the issue with? Thanks!

be-green commented 1 year ago

Ah it is a font issue! Thanks for the quick response, it seems like Monaco was rendering things a bit strangely. When I switch to AndaleMono (chosen at random) the behavior is significantly better. Screen Shot 2023-06-25 at 8 42 21 AM

And with Menlo-Regular there is no issue at all.

Screen Shot 2023-06-25 at 8 43 02 AM

I did try changing the theme a few times and that didn't seem to impact anything. Sorry should have thought to check that!

gaborcsardi commented 1 year ago

Yeah, we do suggest Menlo in the ?boxx manual page, but it is quite hidden. I'll document this better. I use Fira Code Retina, I think that's a great font for (R) coding, but before that I used Menlo, and that's great as well.

I reopen this if you don't mind, until the documentation is updated.