python pptx制作的演示文稿中的字体大小
如何更改幻灯片上文本的大小。 我不知道为什么,但是默认情况下文本大小是32。对不起,我的英语不好。 这是我的密码:python pptx制作的演示文稿中的字体大小,python,python-pptx,Python,Python Pptx,如何更改幻灯片上文本的大小。 我不知道为什么,但是默认情况下文本大小是32。对不起,我的英语不好。 这是我的密码: TEXT = ['''Help on method shuffle in module random: shuffle(x, random=None) method of random.Random instance Shuffle list x in place, and return None. Optional argume
TEXT = ['''Help on method shuffle in module random:
shuffle(x, random=None) method of random.Random instance
Shuffle list x in place, and return None.
Optional argument random is a 0-argument function returning a
random float in [0.0, 1.0); if it is the default None, the
standard random.random will be used.''', '''Help on method choice in
module random:
choice(seq) method of random.Random instance
Choose a random element from a non-empty sequence.''', '''Help on
method randint in module random:
randint(a, b) method of random.Random instance
Return random integer in range [a, b], including both end
points.''']
NAMES = ['shuffle', 'choice', 'randint']
from pptx import Presentation
prs = Presentation()
slide_layout = prs.slide_layouts[1]
for i in range(3):
slide = prs.slides.add_slide(slide_layout)
title = slide.placeholders[0]
content = slide.placeholders[1]
title.text = NAMES[i]
content.text = TEXT[i]
prs.save('test.pptx')
此主题包含在此处的文档中:
简短的版本是,如果您想要控制文本格式(字体属性),您需要在运行级别(段落下方的一个级别)工作,这是应用文本格式的地方