mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-08 01:00:25 +08:00
add font to run
This commit is contained in:
@@ -59,9 +59,14 @@ func main() {
|
||||
para1.AddText("italic").Italic().AddTab()
|
||||
para1.AddText("underline").Underline("double").AddTab()
|
||||
para1.AddText("highlight").Highlight("yellow").AddTab()
|
||||
para1.AddText("font").Font("Consolas", "", "cs").AddTab()
|
||||
|
||||
para2 := w.AddParagraph().Justification("end")
|
||||
para2.AddText("test font size and color").Size("44").Color("ff0000")
|
||||
para2.AddText("test all font attrs").
|
||||
Size("44").Color("ff0000").Font("Consolas", "", "cs").
|
||||
Shade("clear", "auto", "E7E6E6").
|
||||
Bold().Italic().Underline("wave").
|
||||
Highlight("yellow")
|
||||
|
||||
nextPara := w.AddParagraph()
|
||||
nextPara.AddLink("google", `http://google.com`)
|
||||
|
||||
Reference in New Issue
Block a user