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
Produced chart:
Note: this chart will be absolutely fine when rendered with svglite directly.
Proposed solution
The issue is caused by using a pdf device at the time of calling evaluate() in eng_r(), if chunk device was set to svglite.
A change to chunk_device() to support svglite device seems to fix this and produces a report with no warnings and no visual issues. I will provide a PR for this.
Issue is reproducible to me under macOS and Ubuntu
I have provided the necessary information about my issue.
If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('knitr'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('yihui/knitr').
If I have posted the same issue elsewhere, I have also mentioned it in this issue.
I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered:
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.
Using custom fonts with svglite device (with
{systemfonts}
, rather than loading them via{extrafont}
) leads to issues:ggtext::geom_richtext
produce unexpected results.Example
In my example I used Montserrat font (can be installed as system font from google fonts).
An .rmd like one bellow will produce warnings as one above and text in the chart will be rendered incorrectly.
Produced chart:
![chart-1](https://private-user-images.githubusercontent.com/1351765/256055109-4c0d6dc7-c001-4452-b05a-dcf6a9fb4eb3.svg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTg2OTMsIm5iZiI6MTcyNDcxODM5MywicGF0aCI6Ii8xMzUxNzY1LzI1NjA1NTEwOS00YzBkNmRjNy1jMDAxLTQ0NTItYjA1YS1kY2Y2YTlmYjRlYjMuc3ZnP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjdUMDAyNjMzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjA2OTg0ZTdjMzRiNmViMGRmMzI5YjZhNTczNGY4OTA1YjEyN2Y4ZGE3YWEzYWExZDk1NmMzOTdkNjE1ZDUxNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.oigYNNkmy7woQ_25khW4ew3BBzdqf4gC5Wxbe3Oie5w)
Note: this chart will be absolutely fine when rendered with
svglite
directly.Proposed solution
The issue is caused by using a pdf device at the time of calling
evaluate()
ineng_r()
, if chunk device was set to svglite.A change to
chunk_device()
to supportsvglite
device seems to fix this and produces a report with no warnings and no visual issues. I will provide a PR for this.Issue is reproducible to me under macOS and Ubuntu
Session info
By filing an issue to this repo, I promise that
xfun::session_info('knitr')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/knitr')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: