Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emojifont icons not rendered properly in rmarkdown #1460

Closed
IndrajeetPatil opened this issue Oct 9, 2018 · 5 comments
Closed

emojifont icons not rendered properly in rmarkdown #1460

IndrajeetPatil opened this issue Oct 9, 2018 · 5 comments
Milestone

Comments

@IndrajeetPatil
Copy link

IndrajeetPatil commented Oct 9, 2018

Trying to dig into the origin of this issue (yonicd/covrpage#22), I realized that the rmarkdown is not playing well with emojis.

This is what my .Rmd document looks like:

image

And this is what the rendered output looks like:

image

Of course, one option is to use Hadley's emo package (https://github.com/hadley/emo), which works just fine with rmarkdown and there is no such issue, but it's not on CRAN and so using it is not an option. emojifont, on the other hand, is on CRAN.

Here is my session info:

options(width = 200)
devtools::session_info()
#> - Session info ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#>  setting  value                       
#>  version  R version 3.5.1 (2018-07-02)
#>  os       Windows 10 x64              
#>  system   x86_64, mingw32             
#>  ui       RTerm                       
#>  language (EN)                        
#>  collate  English_United States.1252  
#>  ctype    English_United States.1252  
#>  tz       America/New_York            
#>  date     2018-10-09                  
#> 
#> - Packages -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#>  package     * version     date       lib source                            
#>  assertthat    0.2.0       2017-04-11 [1] CRAN (R 3.5.0)                    
#>  backports     1.1.2       2017-12-13 [1] CRAN (R 3.5.0)                    
#>  base64enc     0.1-3       2015-07-28 [1] CRAN (R 3.5.0)                    
#>  callr         3.0.0       2018-08-24 [1] CRAN (R 3.5.1)                    
#>  cli           1.0.1       2018-09-25 [1] CRAN (R 3.5.1)                    
#>  crayon        1.3.4       2018-09-26 [1] Github (r-lib/crayon@3e751fb)     
#>  debugme       1.1.0       2017-10-22 [1] CRAN (R 3.5.0)                    
#>  desc          1.2.0       2018-05-01 [1] CRAN (R 3.5.0)                    
#>  devtools      1.13.6.9000 2018-09-23 [1] Github (r-lib/devtools@74df201)   
#>  digest        0.6.17      2018-09-12 [1] CRAN (R 3.5.1)                    
#>  evaluate      0.11        2018-07-17 [1] CRAN (R 3.5.1)                    
#>  fs            1.2.6       2018-08-23 [1] CRAN (R 3.5.1)                    
#>  glue          1.3.0       2018-09-17 [1] Github (tidyverse/glue@4e74901)   
#>  htmldeps      0.1.1       2018-09-17 [1] Github (rstudio/htmldeps@c1023e0) 
#>  htmltools     0.3.6       2017-04-28 [1] CRAN (R 3.5.0)                    
#>  knitr         1.20.12     2018-08-13 [1] local                             
#>  magrittr      1.5         2014-11-22 [1] CRAN (R 3.5.0)                    
#>  memoise       1.1.0       2017-04-21 [1] CRAN (R 3.5.0)                    
#>  pkgbuild      1.0.1.9000  2018-10-01 [1] Github (r-lib/pkgbuild@446d70c)   
#>  pkgload       1.0.0       2018-09-17 [1] Github (r-lib/pkgload@7771d78)    
#>  prettyunits   1.0.2       2015-07-13 [1] CRAN (R 3.5.0)                    
#>  processx      3.2.0       2018-08-16 [1] CRAN (R 3.5.1)                    
#>  ps            1.1.0       2018-08-10 [1] CRAN (R 3.5.1)                    
#>  R6            2.3.0       2018-10-04 [1] CRAN (R 3.5.1)                    
#>  Rcpp          0.12.19     2018-10-01 [1] CRAN (R 3.5.1)                    
#>  remotes       1.1.1.9000  2018-09-23 [1] Github (r-lib/remotes@5a07ad2)    
#>  rlang         0.2.2       2018-08-16 [1] CRAN (R 3.5.1)                    
#>  rmarkdown     1.10.13     2018-09-17 [1] Github (rstudio/rmarkdown@df4ec91)
#>  rprojroot     1.3-2       2018-01-03 [1] CRAN (R 3.5.0)                    
#>  sessioninfo   1.1.0       2018-09-25 [1] CRAN (R 3.5.1)                    
#>  stringi       1.2.4       2018-07-20 [1] CRAN (R 3.5.1)                    
#>  stringr       1.3.1       2018-05-10 [1] CRAN (R 3.5.0)                    
#>  testthat      2.0.0       2017-12-13 [1] CRAN (R 3.5.0)                    
#>  usethis       1.4.0.9000  2018-09-23 [1] Github (r-lib/usethis@1e3c6a6)    
#>  withr         2.1.2       2018-03-15 [1] CRAN (R 3.5.0)                    
#>  xfun          0.3         2018-07-06 [1] CRAN (R 3.5.1)                    
#>  yaml          2.2.0       2018-07-25 [1] CRAN (R 3.5.1)                    
#> 
#> [1] C:/Users/inp099/Documents/R/win-library/3.5
#> [2] C:/Program Files/R/R-3.5.1/library

Created on 2018-10-09 by the reprex package (v0.2.1)

@yonicd
Copy link

yonicd commented Oct 10, 2018

i'm getting similar output using emo
screen shot 2018-10-09 at 9 07 21 pm
screen shot 2018-10-09 at 9 02 49 pm
screen shot 2018-10-09 at 9 06 11 pm

@yihui yihui added this to the v1.11 milestone Dec 4, 2018
@yihui
Copy link
Member

yihui commented Dec 4, 2018

I recommend that you report this issue to the author of the emojifont package first. I can investigate it after he confirms emojifont is innocent and this is an issue of rmarkdown. Thanks!

And FYI GuangchuangYu/emojifont#19

@yihui yihui closed this as completed Dec 4, 2018
@yonicd
Copy link

yonicd commented Dec 4, 2018

this wasn't only in emojifont, it also occurs with emo on windows

@yihui
Copy link
Member

yihui commented Dec 4, 2018

My guess is that this will ultimately lead to my $1024 question: r-lib/evaluate#59 (and the short answer is there is no solution to this problem, unless perhaps 30 years later Windows and R would fully embrace UTF-8).

@github-actions
Copy link

github-actions bot commented Nov 3, 2020

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants