1
0
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:
源文雨
2023-02-26 19:53:36 +08:00
parent f3265280e3
commit e57b2b9ace
4 changed files with 68 additions and 3 deletions

View File

@@ -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`)