Giter Site home page Giter Site logo

showtext and RStudioGD about showtext HOT 7 CLOSED

yixuan avatar yixuan commented on September 14, 2024 1
showtext and RStudioGD

from showtext.

Comments (7)

yixuan avatar yixuan commented on September 14, 2024 1

I would keep it as an open issue, which reminds me of this problem. 😄

from showtext.

yixuan avatar yixuan commented on September 14, 2024

I guess it's a bit complicated. RStudio's internal graphics device actually consists of two devices: one used to fast preview and the other for the real rendering of graphics. showtext can only affect one of them which results in the failure of using showtext.

from showtext.

jolars avatar jolars commented on September 14, 2024

I see, that's too bad. Can you think of any solution or should I close this down?

from showtext.

benjaminrobinson avatar benjaminrobinson commented on September 14, 2024

Any update on this issue?

from showtext.

yixuan avatar yixuan commented on September 14, 2024

@benjaminrobinson I apologize for my non-response. I haven't found a way to solve this issue yet, so you still need to manually open new graphics devices to make showtext work.

from showtext.

yixuan avatar yixuan commented on September 14, 2024

Hi All,

I just figured out a workaround for this issue. The solution is actually simple: before you create plots, run the following code in the RStudio session:

trace(grDevices::png, exit = quote({
    showtext::showtext_begin()
}), print = FALSE)

Note that this will enable showtext for the RStudio graphics device even if you haven't called showtext_auto(). To turn off, use

untrace(grDevices::png)

Please let me know if this works for you.

from showtext.

yixuan avatar yixuan commented on September 14, 2024

The new version (0.9) has already solved this issue.

from showtext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.