我想將自定義字體合併到我的Rshiny應用程序中。我有一個預感的代碼將在標籤$風格,但沒有實際的代碼,以包括這一點。如何在RShiny應用程序中使用自定義字體
示例代碼:
ui <- fluidPage(
tags$style(),
column(12,
dataTableOutput("testtab")
) # close column
) #close fluidpage
server <- function(input, output, session) {
output$testtab <-
DT::renderDataTable({
tab <- data.frame(a = 1:10, b = 11:20, c = 21:30)
dat.tab <- datatable(tab) %>% formatPercentage('a', 0) %>%
formatCurrency(1:ncol(tab), '$')
return(dat.tab)
}) # close renderDataTable
} # close server
shinyApp(ui=ui, server=server)
例如起見,假設我想在網絡上使用任何自定義字體在那裏。
(小備註 - 以防萬一,如果你不知道,有一個很好的包裝[shinythemes](https://rstudio.github.io/shinythemes /)其中包含7個不錯的主題) –
@UnnamedUser,謝謝。不過,我想使用特定的自定義字體,而這是我想要更改的唯一內容。 –
哪一種字體?就像你已經安裝的那個一樣?你還用什麼系統? Windows/Mac/Linux的字體內容略有不同。 –