无法与官员更改 PPT 标题字体

jar*_*son 1 fonts r title officer

使用官员创建的 Powerpoint 中的标题字体没有变化。

我尝试将 fp_text 添加到 ph_with 中,虽然它不运行任何内容,但它从中生成任何内容。


library(officer)
library(magrittr)

title.font <- fp_text(font.size = 28)    

example_pp <- read_pptx() %>% 
  # LMS slide ----  
  add_slide(layout = "Title and Content", master = "Office Theme") %>% 
  ph_with(paste("Title font test"),
          location = ph_location_type(type = "title"), 
          fp_text(font.size = 28))

Run Code Online (Sandbox Code Playgroud)

Dav*_*hel 5

没有任何fp_text争论ph_with

library(officer)
library(magrittr)

example_pp <- read_pptx() %>% 
  # LMS slide ----  
add_slide(layout = "Title and Content", master = "Office Theme") %>% 
  ph_with(block_list(fpar(ftext("Title font test", prop = fp_text(font.size = 28, color = "red")))),
          location = ph_location_type(type = "title") )
Run Code Online (Sandbox Code Playgroud)

?block_list

  • 您可以查看 fpar 的文档,其中有您需要的说明:https://davidgohel.github.io/officer/reference/fpar.html#examples (2认同)