scanny / python-pptx

Create Open XML PowerPoint documents in Python
MIT License
2.35k stars 510 forks source link

How to use custom font (.otf) with python-pptx #830

Open leej11 opened 2 years ago

leej11 commented 2 years ago

Hey,

I'm currently building a template python script for making presentations at the company I work at. As is probably common to most large companies, they have a custom font.

I have access to the .otf file of this custom font, and I'm wondering how, if at all possible, I can use this when writing:

para.font.name = "Name_of_custom_font"

I've seen this question asked in a previous issue here as well: https://github.com/scanny/python-pptx/issues/337#issuecomment-660912568

Alexey-Smetanov commented 1 year ago

Have you found a solution?