Here are ttf and tcpdf font files of official French government font « Marianne ». I share this work because I spend a lots of time with online converters from otf to tff with this font and each time the resulting tff files was messing my generated pdf.
I only way I found in order to fix my problem described above is to download FontForge, create a new font, a copy only the glyphes I need from the otf file opened also in another windows of FontForge. Then a simply done a "Generate font" to ttf format.
There are several tutorials to do so like this one. But you can also put the files in the directory tcpdf of this repository to the directory
fonts` of tcpdf.
To use them you just have to set the right font-family
:
- For Marianne-Bold :
font-family: 'marianneb'
- For Marianne-Light :
font-family: 'mariannelight'
- For Marianne-Regular :
font-family: 'marianne'
- For Marianne-RegularItalic :
font-family: 'mariannei'
All the set of Marianne font is copyrighted to the French government information service. To have more information about this font, consult this website. You can download the originals' font files here.
- FontForge : https://fontforge.org/en-US/
- Custom TCPDF font : https://queirozf.com/entries/adding-a-custom-font-to-tcpdf#new-way
- Wikipedia about Marianne font : https://fr.wikipedia.org/wiki/Marianne_(police_d%27%C3%A9criture)
- French government page about Marianne font : https://www.gouvernement.fr/charte/charte-graphique-les-fondamentaux/la-typographie
- Official Design system page (dev oriented) of Marianne font : https://gouvfr.atlassian.net/wiki/spaces/DB/pages/223019527/Typographie+-+Typography