python docx学习笔记 设置字体格式 character formatting
作者:互联网
character formatting
- 设置字体样式和大小,加粗,倾斜,下划线
font = run.font
font.name = 'Calibri'
font.size = Pt(12)
font.italic = True
font.bold = True
#下划线
font.underline = True
- 设置字体颜色
from docx.shared import RGBColor
font.color.rgb = RGBColor(0x42, 0x24, 0xE9)
标签:docx,下划线,python,character,字体,font,True 来源: https://www.cnblogs.com/feel-myself/p/16301837.html