From f326bf762124fa170df1059a5793ccb0565f20a4 Mon Sep 17 00:00:00 2001 From: thomasp85 Date: Wed, 23 Oct 2024 11:00:42 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20r-lib/sv?= =?UTF-8?q?glite@bac2af836e479a68e4ce9abaf04d1f428daf1c3d=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 19 +++++++++++++++---- pkgdown.yml | 2 +- search.json | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 5122a54..9fa9b82 100644 --- a/index.html +++ b/index.html @@ -119,8 +119,8 @@

Speed #> # A tibble: 2 × 6 #> expression min median `itr/sec` mem_alloc `gc/sec` #> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl> -#> 1 svglite_test() 2.08ms 2.23ms 438. 691KB 7.13 -#> 2 svg_test() 6.07ms 6.26ms 159. 179KB 0.638 +#> 1 svglite_test() 1.47ms 1.53ms 648. 587KB 6.15 +#> 2 svg_test() 6.19ms 6.42ms 155. 192KB 0.623

File size @@ -133,7 +133,7 @@

File size# svg fs::file_size(tmp2) -#> 321K

+#> 327K

In both cases, compressing to make .svgz (gzipped svg) is worthwhile. svglite supports compressed output directly which will be triggered if the provided path has a ".svgz" (or ".svg.gz") extension.

 tmp3 <- tempfile(fileext = ".svgz")
@@ -143,7 +143,7 @@ 

File size# svglite - svgz fs::file_size(tmp3) -#> 9.42K

+#> 9.45K

Editability @@ -157,6 +157,17 @@

Font support +

Building svglite +

+

This section is only relevant for building svglite from scratch, as opposed to installing from a pre-built package on CRAN.

+

Building vdiffr requires the system dependency libpng. As vdiffr doesn’t have any build-time configuration, your R configuration must point to libpng’s include and lib folders.

+

For instance on macOS, install libpng with:

+
brew install libpng
+

And make sure your ~/.R/Makevars knows about Homebrew’s include and lib folders where libpng should now be installed. On arm64 hardware, this would be:

+
CPPFLAGS += -I/opt/homebrew/include
+LDFLAGS += -L/opt/homebrew/lib
+

+

Code of Conduct

Please note that the svglite project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

diff --git a/pkgdown.yml b/pkgdown.yml index d81bda5..75f4213 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: fonts: fonts.html scaling: scaling.html -last_built: 2024-10-23T07:59Z +last_built: 2024-10-23T11:00Z urls: reference: https://svglite.r-lib.org/reference article: https://svglite.r-lib.org/articles diff --git a/search.json b/search.json index 6343eb4..3d7519b 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://svglite.r-lib.org/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://svglite.r-lib.org/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://svglite.r-lib.org/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://svglite.r-lib.org/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://svglite.r-lib.org/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement codeofconduct@posit.co. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://svglite.r-lib.org/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://svglite.r-lib.org/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://svglite.r-lib.org/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://svglite.r-lib.org/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://svglite.r-lib.org/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://svglite.r-lib.org/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://svglite.r-lib.org/articles/fonts.html","id":"system-font-aliases","dir":"Articles","previous_headings":"","what":"System font aliases","title":"Specifying fonts","text":"system_fonts takes named list font families argument. names typically correspond standard R faces can also alias non-standard families (though less useful): need support non-latin characters, choose fonts good Unicode coverage. “Arial Unicode MS” sans serif font good coverage available macOS Windows systems (latter, MS Office installed). Note font support kerning bold italic faces. Noto fontset provided Google well Han Sans family Adobe excellent coverage may available time rendering. can concern distribute SVG files Internet.","code":"fonts <- list( sans = \"Helvetica\", mono = \"Consolas\", `Times New Roman` = \"DejaVu Serif\" ) ss <- svgstring(system_fonts = fonts) plot(1:10) text(0.8, 0.8, \"Some text\", family = \"mono\") text(0.2, 0.2, \"Other text\", family = \"Times New Roman\") dev.off() ss() svglite(\"Rplots.svg\", system_fonts = list(sans = \"Arial Unicode MS\")) plot.new() text(0.5, 0.5, \"正規分布\") dev.off()"},{"path":"https://svglite.r-lib.org/articles/fonts.html","id":"user-font-aliases","dir":"Articles","previous_headings":"","what":"User font aliases","title":"Specifying fonts","text":"addition system fonts, can also provide fonts necessarily installed system (.e., fonts live user space). main reason generate reproducible SVG files different platforms can different versions font thus produce different text metrics. user_fonts arguments takes either paths font files, fonts fontquiver package, list specifies alias. Whereas system_fonts gets named list families argument, user_fonts takes named tree lists families (sans, serif, mono symbol) faces (plain, italic, bold, bolditalic, symbol): can also control font gets written font-family fields SVGs supplying list containing alias file elements: fontquiver fonts particularly useful creating reproducible SVG files. vdiffr package uses svglite fontquiver fonts create visual unit tests reliably across platforms. Liberation fontset appropriate usage features 12 combinations standard R families faces. addition fontquiver provides Symbola symbol font. function fontquiver::font_families() produces list appropriate structure can directly supplied svglite:","code":"# Using ttf files from fontquiver here, but it could be any ttf some_file <- fontquiver::font(\"Liberation\", \"Sans\", \"Regular\")$ttf other_file <- fontquiver::font(\"Liberation\", \"Sans\", \"Italic\")$ttf serif_file <- fontquiver::font(\"Liberation\", \"serif\", \"Italic\")$ttf # The outer named list contains families while the inner named list # contains faces: fonts <- list( sans = list( plain = some_file, italic = other_file ), serif = list(plain = serif_file) ) ss <- svglite(\"plot.svg\", user_fonts = fonts) plot.new() text(0.5, 0.5, \"Sans Plain text\") text(0.2, 0.2, \"Sans Italic text\", font = 3) text(0.8, 0.8, \"Serif text\", family = \"serif\") dev.off() file_with_alias <- list(alias = \"Foobar Font\", file = other_file) fonts <- list(sans = list(plain = file_with_alias)) ss <- svgstring(user_fonts = fonts) plot(1:10) text(0.5, 0.5, \"Sans text\") dev.off() ss() fonts <- fontquiver::font_families(\"Liberation\") fonts$symbol$symbol <- fontquiver::font_symbol(\"Symbola\") str(fonts, 2) svglite(\"reproducible.svg\", user_fonts = fonts) plot(1:10) dev.off()"},{"path":"https://svglite.r-lib.org/articles/fonts.html","id":"debugging-font-matching","dir":"Articles","previous_headings":"","what":"Debugging font matching","title":"Specifying fonts","text":"systemfonts package used match font family names fonts installed system. systemfonts always return valid font, requested font badly misspelled missing, default returned. test expected font matched can use match_font() font_info() functions systemfonts:","code":"systemfonts::match_font(\"Helvetica\") #> Warning: `match_font()` was deprecated in systemfonts 1.1.0. #> ℹ Please use `match_fonts()` instead. #> This warning is displayed once every 8 hours. #> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was #> generated. #> $path #> [1] \"/usr/share/fonts/opentype/urw-base35/NimbusSans-Regular.otf\" #> #> $index #> [1] 0 #> #> $features #> integer(0) systemfonts::font_info(\"Helvetica\", bold = TRUE) #> # A data frame: 1 × 24 #> path index family style italic bold monospace weight width kerning #> #> 1 /usr/sha… 0 Nimbu… Bold FALSE TRUE FALSE bold norm… FALSE #> # ℹ 14 more variables: color , scalable , vertical , #> # n_glyphs , n_sizes , n_charmaps , bbox , #> # max_ascend , max_descend , max_advance_width , #> # max_advance_height , lineheight , underline_pos , #> # underline_size "},{"path":"https://svglite.r-lib.org/articles/scaling.html","id":"scaling-svg-outputs","dir":"Articles","previous_headings":"","what":"Scaling SVG outputs","title":"Scaling Issues","text":"SVG files produced svglite include width height properties. deliberate choice intended make easier fit fluidly SVG figure enclosing container. scaling straightforward requires understanding viewBox SVG attribute included SVGs produced svglite. property defines aspect ratio plot (well user coordinate system, see next section).","code":""},{"path":"https://svglite.r-lib.org/articles/scaling.html","id":"fluid-scaling","dir":"Articles","previous_headings":"Scaling SVG outputs","what":"Fluid scaling","title":"Scaling Issues","text":"viewBox determined width height arguments svglite’s device functions (10’’ x 8’’ default). Although dimensions supplied inches, viewBox’s user coordinate system completely unit agnostic. main effect thus determine aspect ratio. Since dimensions provided, dimensions enclosing container used instead SVG rescaled fit container (although Internet Explorer currently requires CSS tricks get behaviour, see https://tympanus.net/codrops/2014/08/19/making-svgs-responsive--css/). Aspect ratio preserved default figure scaled . details aspect ratio preserved can adjusted multiple ways via preserveAspectRatio attribute. See https://www.sarasoueidan.com/blog/svg-coordinate-systems/ information property. useful resource: https://css-tricks.com/scale-svg/","code":""},{"path":"https://svglite.r-lib.org/articles/scaling.html","id":"natural-scaling","dir":"Articles","previous_headings":"Scaling SVG outputs","what":"Natural scaling","title":"Scaling Issues","text":"Another strategy needed order scale figure make text within SVG consistent text surrounding web page. useful, instance, create consistent appearance HTML presentation. Since user coordinate system defined viewBox unitless, need map figure natural dimensions. ensure correspondence scale figure web page. mentioned , natural scale svglite’s figures points determined width height arguments supply device functions (10’’ x 8’’ default). Although dimensions specified inches, coordinate system scaled points. Counting 72 points per inch, default SVG surface thus 720 x 576 pt. Note CSS standard defines 12pt equal 16px, default size text browsers. Since 12pt default text size svglite well, SVG scaled natural dimensions appear seamless web text 16px. text web page another size, compute scale factor adjust dimensions SVG accordingly. sum , displaying plot according natural dimensions requires providing user agent information lengths defined within SVG actually mean. several ways achieve . First can edit SVG enclose another pair tags defines height width. root element determines final dimensions figure. second way enclose figure
tag appropriate dimensions let SVG figure rescale container (cf. section fluid scaling): Finally, can directly specify dimensions tag embedding figure. Note dimension attributes tags accept arbitrary units, supply dimensions pixels. Just multiply width height measured points factor 16/12:","code":"
<\/div> "},{"path":[]},{"path":"https://svglite.r-lib.org/articles/scaling.html","id":"device-scaling","dir":"Articles","previous_headings":"Internal notes","what":"Device scaling","title":"Scaling Issues","text":"graphics devices, svglite scaled big points (1/72 inch) rather pica points (1/72.27 inch). Note LaTeX grid graphics system ggplot2 based, points refer pica points. Big points denoted LaTeX bp CSS pt. use latter notation. See https://tex.stackexchange.com//200968/19755 historical background units. conversion device units physical dimensions determined DevDesc parameter ipr. IPR stands inches per raster (native device coordinates sometimes called rasters R terminology) set 1/72 svglite. device’s physical dimensions set following DevDesc parameters (width height plot dimensions set user inches): default svglite plot surface thus 720 x 576 pt.","code":""},{"path":"https://svglite.r-lib.org/articles/scaling.html","id":"scaling-of-graphical-elements","dir":"Articles","previous_headings":"Internal notes","what":"Scaling of graphical elements","title":"Scaling Issues","text":"conventional fundamental line width (lwd = 1) correspond line width 1/96 inch svglite obeys convention. Also, like R graphics devices, svglite interprets point sizes directly big points (e.g. ps graphical parameter fontsize argument device functions). default font size 12pt. Text metrics computed systemfonts, uses freetype extract metrics glyph calculate string dimensions . Text metrics calculated 1000dpi based cex * ps font size. Base graphics system also makes use obscure cra parameter relatives (cin, cxy, csi). cra serves crude measure default character height width default fontsize provided device called (12pt svgilte). main effect parameter (specifically, height component) change relationship margin parameters mar/mai oma/omi. margins mar oma specified line units character height used measure line spacing convert margins measured lines physical margins. devices, cra[0] set 0.9 * pointsize cra[1] 1.2 * pointsize. parameters completely unused Grid graphics system.","code":""},{"path":"https://svglite.r-lib.org/articles/scaling.html","id":"svg-output","dir":"Articles","previous_headings":"Internal notes","what":"SVG output","title":"Scaling Issues","text":"SVG output sets viewBox (user coordinate system) values scaled big points. viewBox: width height set dd->right dd->bottom respectively (values determined user-supplied figure width height). Line width: 1 lwd equal 1/96 inch. svglite gets values scaled device coordinates (big points), line width multiplied 72/96. Text: gdtools returns metrics scaled big points transformation needed. need add px units work around rendering bug Firefox. Note viewBox set , pixel equals one unit user coordinate system thus actually represents big point.","code":""},{"path":"https://svglite.r-lib.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Hadley Wickham. Author. Lionel Henry. Author. Thomas Lin Pedersen. Maintainer, author. T Jake Luciani. Author. Matthieu Decorde. Author. Vaudor Lise. Author. Tony Plate. Contributor. Early line dashing code David Gohel. Contributor. Line dashing code early raster code Yixuan Qiu. Contributor. Improved styles; polypath implementation Håkon Malmedal. Contributor. Opacity code . Copyright holder, funder.","code":""},{"path":"https://svglite.r-lib.org/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Wickham H, Henry L, Pedersen T, Luciani T, Decorde M, Lise V (2024). svglite: 'SVG' Graphics Device. R package version 2.1.3.9000, https://github.com/r-lib/svglite, https://svglite.r-lib.org.","code":"@Manual{, title = {svglite: An 'SVG' Graphics Device}, author = {Hadley Wickham and Lionel Henry and Thomas Lin Pedersen and T Jake Luciani and Matthieu Decorde and Vaudor Lise}, year = {2024}, note = {R package version 2.1.3.9000, https://github.com/r-lib/svglite}, url = {https://svglite.r-lib.org}, }"},{"path":"https://svglite.r-lib.org/index.html","id":"svglite-","dir":"","previous_headings":"","what":"An SVG Graphics Device","title":"An SVG Graphics Device","text":"svglite graphics device produces clean svg output, suitable use web, hand editing. Compared built-svg(), svglite produces smaller files, leaves text , making easier edit result creation. also supports multiple nice features embedding web fonts.","code":""},{"path":"https://svglite.r-lib.org/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"An SVG Graphics Device","text":"svglite available CRAN using install.packages(\"svglite\"). can install development version github :","code":"# install.packages(\"pak\") pak::pak(\"r-lib/svglite\")"},{"path":"https://svglite.r-lib.org/index.html","id":"motivation","dir":"","previous_headings":"","what":"Motivation","title":"An SVG Graphics Device","text":"grDevices package bundled R already comes SVG device (using eponymous svg() call). development svglite motivated following considerations:","code":""},{"path":"https://svglite.r-lib.org/index.html","id":"speed","dir":"","previous_headings":"Motivation","what":"Speed","title":"An SVG Graphics Device","text":"svglite() considerably faster svg(). rendering SVGs dynamically serve web can quite important:","code":"library(svglite) x <- runif(1e3) y <- runif(1e3) tmp1 <- tempfile() tmp2 <- tempfile() svglite_test <- function() { svglite(tmp1) plot(x, y) dev.off() } svg_test <- function() { svg(tmp2, onefile = TRUE) plot(x, y) dev.off() } bench::mark(svglite_test(), svg_test(), min_iterations = 250, check = FALSE) #> # A tibble: 2 × 6 #> expression min median `itr/sec` mem_alloc `gc/sec` #> #> 1 svglite_test() 2.08ms 2.23ms 438. 691KB 7.13 #> 2 svg_test() 6.07ms 6.26ms 159. 179KB 0.638"},{"path":"https://svglite.r-lib.org/index.html","id":"file-size","dir":"","previous_headings":"Motivation","what":"File size","title":"An SVG Graphics Device","text":"Another point high relevance serving SVGs web size. svglite() produces much smaller files cases, compressing make .svgz (gzipped svg) worthwhile. svglite supports compressed output directly triggered provided path \".svgz\" (\".svg.gz\") extension.","code":"# svglite fs::file_size(tmp1) #> 75K # svg fs::file_size(tmp2) #> 321K tmp3 <- tempfile(fileext = \".svgz\") svglite(tmp3) plot(x, y) invisible(dev.off()) # svglite - svgz fs::file_size(tmp3) #> 9.42K"},{"path":"https://svglite.r-lib.org/index.html","id":"editability","dir":"","previous_headings":"Motivation","what":"Editability","title":"An SVG Graphics Device","text":"One main reasons size difference size output svglite() svg() fact svglite() encodes text styled elements, whereas svg() converts glyphs polygons renders . latter approach means output svg() require font present system displays SVG makes less impossible edit text fact. svglite focuses providing maximal editability output, can open result vector drawing program Inkscape Illustrator polish output choose.","code":""},{"path":"https://svglite.r-lib.org/index.html","id":"font-support","dir":"","previous_headings":"Motivation","what":"Font support","title":"An SVG Graphics Device","text":"svglite uses systemfonts font discovery means installed fonts system available use. systemfonts foundation means fonts registered register_font() register_variant() also available. contains non-standard weights OpenType features (e.g. ligatures tabular numerics) correctly encoded style block. systemfonts also allows embed webfont @imports file ensure file looks expected even systems without used font installed.","code":""},{"path":"https://svglite.r-lib.org/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"An SVG Graphics Device","text":"Please note svglite project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://svglite.r-lib.org/reference/create_svgz.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an svg file to svgz, overwriting the old file — create_svgz","title":"Convert an svg file to svgz, overwriting the old file — create_svgz","text":"Convert svg file svgz, overwriting old file","code":""},{"path":"https://svglite.r-lib.org/reference/create_svgz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an svg file to svgz, overwriting the old file — create_svgz","text":"","code":"create_svgz(file)"},{"path":"https://svglite.r-lib.org/reference/create_svgz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an svg file to svgz, overwriting the old file — create_svgz","text":"file path file convert","code":""},{"path":"https://svglite.r-lib.org/reference/editSVG.html","id":null,"dir":"Reference","previous_headings":"","what":"Run plotting code and open svg in OS/system default svg viewer or editor. — editSVG","title":"Run plotting code and open svg in OS/system default svg viewer or editor. — editSVG","text":"useful primarily testing post-processing SVG.","code":""},{"path":"https://svglite.r-lib.org/reference/editSVG.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run plotting code and open svg in OS/system default svg viewer or editor. — editSVG","text":"","code":"editSVG(code, ..., width = NA, height = NA)"},{"path":"https://svglite.r-lib.org/reference/editSVG.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run plotting code and open svg in OS/system default svg viewer or editor. — editSVG","text":"code Plotting code execute. ... arguments passed svglite. height, width Height width inches.","code":""},{"path":"https://svglite.r-lib.org/reference/editSVG.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run plotting code and open svg in OS/system default svg viewer or editor. — editSVG","text":"","code":"if (interactive()) { editSVG(plot(1:10)) editSVG(contour(volcano)) }"},{"path":"https://svglite.r-lib.org/reference/font_face.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a font-face specification — font_face","title":"Create a font-face specification — font_face","text":"Webfonts SVG HTML can either specified manually using @font-face -rule, imported e.g. Google Fonts using @import -rule. font_face() helps create valid @font-face block web_fonts argument svglite() svgstring() functions.","code":""},{"path":"https://svglite.r-lib.org/reference/font_face.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a font-face specification — font_face","text":"","code":"font_face( family, woff2 = NULL, woff = NULL, ttf = NULL, otf = NULL, eot = NULL, svg = NULL, local = NULL, weight = NULL, style = NULL, range = NULL, variant = NULL, stretch = NULL, feature_setting = NULL, variation_setting = NULL )"},{"path":"https://svglite.r-lib.org/reference/font_face.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a font-face specification — font_face","text":"family font family name font respond . woff2, woff, ttf, otf, eot, svg URLs font different formats. least one must given. Best browser support provided woff format. local One font names local installations font may . local font found either given names used download happen. weight optional value font-weight descriptor style optional value font-style descriptor range optional value unicode-range descriptor give range unicode values font support variant optional value font-variant descriptor stretch optional value font-stretch descriptor feature_setting optional value font-feature-settings descriptor recommended avoid using possible variation_setting optional value font-variation-settings descriptor.","code":""},{"path":"https://svglite.r-lib.org/reference/font_face.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a font-face specification — font_face","text":"character string @font-face block.","code":""},{"path":"https://svglite.r-lib.org/reference/font_face.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a font-face specification — font_face","text":"","code":"font_face( family = \"MyHelvetica\", ttf = \"MgOpenModernaBold.ttf\", local = c(\"Helvetica Neue Bold\", \"HelveticaNeue-Bold\"), weight = \"bold\" ) #> @font-face { #> font-family: \"MyHelvetica\"; #> src: local(\"Helvetica Neue Bold\"), #> local(\"HelveticaNeue-Bold\"), #> url(\"MgOpenModernaBold.ttf\") format(\"truetype\"); #> font-weight: bold; #> }"},{"path":"https://svglite.r-lib.org/reference/htmlSVG.html","id":null,"dir":"Reference","previous_headings":"","what":"Run plotting code and view svg in RStudio Viewer or web browser. — htmlSVG","title":"Run plotting code and view svg in RStudio Viewer or web browser. — htmlSVG","text":"useful primarily testing. Requires htmltools package.","code":""},{"path":"https://svglite.r-lib.org/reference/htmlSVG.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run plotting code and view svg in RStudio Viewer or web browser. — htmlSVG","text":"","code":"htmlSVG(code, ...)"},{"path":"https://svglite.r-lib.org/reference/htmlSVG.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run plotting code and view svg in RStudio Viewer or web browser. — htmlSVG","text":"code Plotting code execute. ... arguments passed svglite.","code":""},{"path":"https://svglite.r-lib.org/reference/htmlSVG.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run plotting code and view svg in RStudio Viewer or web browser. — htmlSVG","text":"","code":"if (interactive() && require(\"htmltools\")) { htmlSVG(plot(1:10)) htmlSVG(hist(rnorm(100))) }"},{"path":"https://svglite.r-lib.org/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. systemfonts font_feature, register_font, register_variant","code":""},{"path":"https://svglite.r-lib.org/reference/stringSVG.html","id":null,"dir":"Reference","previous_headings":"","what":"Run plotting code and return svg as string — stringSVG","title":"Run plotting code and return svg as string — stringSVG","text":"useful primarily testing can used alternative svgstring().","code":""},{"path":"https://svglite.r-lib.org/reference/stringSVG.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run plotting code and return svg as string — stringSVG","text":"","code":"stringSVG(code, ...)"},{"path":"https://svglite.r-lib.org/reference/stringSVG.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run plotting code and return svg as string — stringSVG","text":"code Plotting code execute. ... arguments passed svglite.","code":""},{"path":"https://svglite.r-lib.org/reference/stringSVG.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run plotting code and return svg as string — stringSVG","text":"","code":"stringSVG(plot(1:10)) #> Saving 7\" x 7\" image #> #> #> #> #>