Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
555 views
in Technique[技术] by (71.8m points)

Use Google Font with R's Reactable Table

Following the example here (Custom fonts) I chose a font that is different enough I could easily see whether it was working or not. Redressed.

Why isn't the body of this table using Google's 'Redressed' font?

library("reactable")

# Add a custom font from Google Fonts
# https://fonts.google.com/specimen/Redressed?selection.family=Redressed&query=redress&preview.text=1234567890&preview.text_type=custom
# https://glin.github.io/reactable/articles/cookbook/cookbook.html

htmltools::tags$link(href = "https://fonts.googleapis.com/css?family=Redressed:400&display=fallback",
                     rel = "stylesheet")

reactable(
  iris[1:5, ],
  style = list(fontFamily = "Redressed", fontSize = "44px"),
  defaultSorted = "Species"
)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...