showtext.auto: Automatically Using 'showtext' for New Graphics Devices

Description Usage Arguments Author(s) See Also Examples

Description

This function could turn on/off the automatic use of showtext functionality. If turned on, any newly opened graphics devices will use showtext to draw text. This helps to avoid the repeated calls of showtext.begin() and showtext.end().

Usage

1
showtext.auto(enable = TRUE)

Arguments

enable

TRUE to turn on and FALSE to turn off

Author(s)

Yixuan Qiu <http://statr.me/>

See Also

showtext.begin(), showtext.end()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
pdf("test1.pdf")
plot(1, main = "\u6b22\u8fce")  ## may not render properly
dev.off()

## Automatically use showtext for future devices
showtext.auto()
plot(1, main = "\u6b22\u8fce", family = "wqy-microhei")

pdf("test2.pdf")
plot(1, main = "\u6b22\u8fce", family = "wqy-microhei")
dev.off()

## Turn off if needed
showtext.auto(FALSE)

## End(Not run)


Search within the showtext package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.