0

I want to use the same font I'm using in my LaTeX document in my plots. Is there a way to know what font files are being used for a particular font so that I can use them with the software that generates the plot?

The logs do not seem to be very helpful to know this. I'm using \usepackage{newtxtext,newtxmath} although I would like a general answer, if it exists. So far I looked at the output of pdflatex when including \expandafter\show\the\font as it is explained in this answer:

> \T1/ntxtlf/m/n/12=select font ntx-Regular-tlf-t1 at 12.0pt.
<inserted text> \T1/ntxtlf/m/n/12

and looking through the font files in the texmf-dist/fonts directory yields, (find . -type f -name '*ntx*'):

./afm/public/cm-unicode/cmuntx.afm
./afm/public/newtx/ntxtmri.afm
./afm/public/newtx/ntxtmr.afm
./afm/public/newtx/ntxsups-Regular.afm
./afm/public/newtx/ntxsups-Italic.afm
./afm/public/newtx/ntxtmb.afm
./afm/public/newtx/ntxsups-Bold.afm
./afm/public/newtx/ntxtmbi.afm
./afm/public/newtx/ntxsups-BoldItalic.afm
./type1/public/cm-unicode/cmuntx.pfb
./type1/public/newtx/ntxsybalt.pfb
./type1/public/newtx/ntxexb.pfb
./type1/public/newtx/rntxbmi5.pfb
./type1/public/newtx/ntxsyralt.pfb
./type1/public/newtx/ntxtmb.pfb
./type1/public/newtx/ntxsups-Bold.pfb
./type1/public/newtx/rntxmi5.pfb
./type1/public/newtx/ntxsups-Italic.pfb
./type1/public/newtx/rntxbmi.pfb
./type1/public/newtx/ntxsups-Regular.pfb
./type1/public/newtx/ntxbexmods.pfb
./type1/public/newtx/ntxtmri.pfb
./type1/public/newtx/rntxbmi7.pfb
./type1/public/newtx/ntxsups-BoldItalic.pfb
./type1/public/newtx/rntxmi.pfb
./type1/public/newtx/ntxtmbi.pfb
./type1/public/newtx/rntxmi7.pfb
./type1/public/newtx/ntxexmods.pfb
./type1/public/newtx/ntxtmr.pfb
./type1/public/newtx/ntxbexb.pfb
./vf/public/newtxsf/ntxsfbmia.vf
./vf/public/newtxsf/ntxsfmia.vf
./vf/public/newtxsf/ntxsfmi.vf
./vf/public/newtxsf/ntxsfbmi.vf
./vf/public/newtx/ntxbsy.vf
./vf/public/newtx/ntxbex.vf
./vf/public/newtx/ntxbmi7.vf
./vf/public/newtx/ntxbmia.vf
./vf/public/newtx/ntxbmi17.vf
./vf/public/newtx/ntxbexx.vf
./vf/public/newtx/ntxmia.vf
./vf/public/newtx/ntxbmi1x.vf
./vf/public/newtx/ntxbmi05.vf
./vf/public/newtx/ntxmi17.vf
./vf/public/newtx/ntxexa.vf
./vf/public/newtx/ntxsym.vf
./vf/public/newtx/ntxmi15.vf
./vf/public/newtx/ntxmi0.vf
./vf/public/newtx/ntxbmi1.vf
./vf/public/newtx/ntxmi05.vf
./vf/public/newtx/ntxbmi15.vf
./vf/public/newtx/ntxsy.vf
./vf/public/newtx/ntxsyc.vf
./vf/public/newtx/ntxbsyc.vf
./vf/public/newtx/ntxbmi.vf
./vf/public/newtx/ntxbexa.vf
./vf/public/newtx/ntxbmi0.vf
./vf/public/newtx/ntxbsy5.vf
./vf/public/newtx/ntxsy5.vf
./vf/public/newtx/ntxmi1.vf
./vf/public/newtx/ntxbmi5.vf
./vf/public/newtx/ntxbsym.vf
./vf/public/newtx/ntxsy7.vf
./vf/public/newtx/ntxmi5.vf
./vf/public/newtx/ntxexx.vf
./vf/public/newtx/ntxbmi07.vf
./vf/public/newtx/ntxmi07.vf
./vf/public/newtx/ntxbsy7.vf
./vf/public/newtx/ntxmi7.vf
./vf/public/newtx/ntxmi.vf
./tfm/public/newtxsf/ntxsfmia.tfm
./tfm/public/newtxsf/ntxsfbmia.tfm
./tfm/public/newtxsf/ntxsfmi.tfm
./tfm/public/newtxsf/ntxsfbmi.tfm
./tfm/public/newtx/ntx-Bold-tlf-ot1.tfm
./tfm/public/newtx/ntx-Bold-lf-sc-t1.tfm
./tfm/public/newtx/ntxbmi5.tfm
./tfm/public/newtx/ntxbmi05.tfm
./tfm/public/newtx/ntx-Regular-osf-ot1.tfm
./tfm/public/newtx/ntx-BoldItalic-tosf-sc-t1.tfm
./tfm/public/newtx/ntxsups-Bold-ot1.tfm
./tfm/public/newtx/ntxmi05.tfm
./tfm/public/newtx/ntx-Bold-tosf-ly1.tfm
./tfm/public/newtx/ntx-Regular-tosf-t1.tfm
./tfm/public/newtx/ntx-BoldItalic-lf-scl-ly1.tfm
./tfm/public/newtx/ntx-Bold-lf-sc-ot1.tfm
./tfm/public/newtx/ntx-Bold-tosf-t1.tfm
./tfm/public/newtx/ntx-Regular-osf-scl-t1.tfm
./tfm/public/newtx/ntx-Bold-osf-sc-t1.tfm
./tfm/public/newtx/ntx-BoldItalic-tlf-scl-ly1.tfm
./tfm/public/newtx/ntxbexmods.tfm
./tfm/public/newtx/ntxmi5.tfm
./tfm/public/newtx/ntx-Italic-tlf-ly1.tfm
./tfm/public/newtx/ntx-Regular-tosf-scl-t1.tfm
./tfm/public/newtx/ntx-Bold-osf-scl-ly1.tfm
./tfm/public/newtx/ntx-Italic-osf-sc-t1.tfm
./tfm/public/newtx/ntx-Regular-lf-ot1.tfm
./tfm/public/newtx/ntx-Bold-lf-ly1.tfm
./tfm/public/newtx/ntxexa.tfm
./tfm/public/newtx/ntx-BoldItalic-tlf-scl-ot1.tfm
./tfm/public/newtx/ntx-Bold-osf-sc-ot1.tfm
./tfm/public/newtx/ntxbmi1.tfm
./tfm/public/newtx/rntxmi.tfm
./tfm/public/newtx/ntx-Bold-lf-scl-ly1.tfm
./tfm/public/newtx/ntx-Bold-tosf-scl-ot1.tfm
./tfm/public/newtx/ntx-Regular-lf-scl-ly1.tfm
./tfm/public/newtx/ntx-BoldItalic-osf-scl-ot1.tfm
./tfm/public/newtx/ntx-BoldItalic-tosf-t1.tfm
./tfm/public/newtx/ntx-Italic-osf-scl-ot1.tfm
./tfm/public/newtx/ntx-Regular-tlf-scl-ly1.tfm
./tfm/public/newtx/ntxmi07.tfm
./tfm/public/newtx/ntx-Regular-osf-sc-ot1.tfm
./tfm/public/newtx/ntx-Regular-tlf-t1.tfm
./tfm/public/newtx/rntxbmi5.tfm
./tfm/public/newtx/ntxsups-Bold.tfm
./tfm/public/newtx/ntx-BoldItalic-tlf-ot1.tfm
./tfm/public/newtx/ntxsups-Regular.tfm
./tfm/public/newtx/ntx-Regular-tlf-ot1.tfm
./tfm/public/newtx/ntx-Bold-lf-scl-t1.tfm
./tfm/public/newtx/ntxmi1.tfm
./tfm/public/newtx/ntx-Italic-tosf-ly1.tfm
./tfm/public/newtx/ntx-Bold-tosf-ot1.tfm
./tfm/public/newtx/rntxmi7.tfm
./tfm/public/newtx/ntx-Regular-tlf-sc-t1.tfm
./tfm/public/newtx/ntxsups-BoldItalic-t1.tfm
./tfm/public/newtx/ntxsups-Italic-t1.tfm
./tfm/public/newtx/ntxsyralt.tfm
./tfm/public/newtx/ntx-Bold-tlf-scl-ly1.tfm
./tfm/public/newtx/ntxsy.tfm
./tfm/public/newtx/ntx-Italic-osf-ot1.tfm
./tfm/public/newtx/ntx-Italic-osf-sc-ot1.tfm
./tfm/public/newtx/ntxsups-BoldItalic.tfm
./tfm/public/newtx/ntxbexb.tfm
./tfm/public/newtx/ntxsups-Regular-ly1.tfm
./tfm/public/newtx/ntx-BoldItalic-osf-ot1.tfm
./tfm/public/newtx/ntxsups-Regular-ot1.tfm
./tfm/public/newtx/ntx-Italic-tlf-scl-t1.tfm
./tfm/public/newtx/ntxbmial1.tfm
./tfm/public/newtx/ntx-Italic-tlf-th-t1.tfm
./tfm/public/newtx/ntx-Bold-lf-sc-ly1.tfm
./tfm/public/newtx/ntx-BoldItalic-tosf-ly1.tfm
./tfm/public/newtx/ntxsym.tfm
./tfm/public/newtx/ntxsups-Bold-ly1.tfm
./tfm/public/newtx/ntx-BoldItalic-tosf-scl-ly1.tfm
./tfm/public/newtx/ntxsy5.tfm
./tfm/public/newtx/ntx-Italic-osf-scl-ly1.tfm
./tfm/public/newtx/ntx-Italic-tlf-th-ly1.tfm
./tfm/public/newtx/ntx-BoldItalic-lf-sc-t1.tfm
./tfm/public/newtx/ntx-Italic-tlf-th-ot1.tfm
./tfm/public/newtx/ntxbsyc.tfm
./tfm/public/newtx/ntxbsy7.tfm
./tfm/public/newtx/ntx-Regular-tosf-sc-ot1.tfm
./tfm/public/newtx/ntxbexa.tfm
./tfm/public/newtx/ntx-Regular-osf-ly1.tfm
./tfm/public/newtx/rntxbmi.tfm
./tfm/public/newtx/ntxsups-Regular-t1.tfm
./tfm/public/newtx/ntx-Regular-osf-scl-ly1.tfm
./tfm/public/newtx/ntx-Regular-lf-scl-t1.tfm
./tfm/public/newtx/ntx-BoldItalic-tlf-ly1.tfm
./tfm/public/newtx/ntx-Bold-osf-sc-ly1.tfm
./tfm/public/newtx/ntx-Italic-osf-ly1.tfm
./tfm/public/newtx/ntxmi17.tfm
./tfm/public/newtx/ntx-Bold-osf-scl-ot1.tfm
./tfm/public/newtx/ntx-Regular-tosf-ly1.tfm
./tfm/public/newtx/ntxbmi0.tfm
./tfm/public/newtx/ntxmi7.tfm
./tfm/public/newtx/ntxsups-BoldItalic-ot1.tfm
./tfm/public/newtx/ntxbsy.tfm
./tfm/public/newtx/ntx-Regular-tosf-scl-ly1.tfm
./tfm/public/newtx/ntx-Regular-lf-scl-ot1.tfm
./tfm/public/newtx/ntx-Bold-osf-scl-t1.tfm
./tfm/public/newtx/ntx-Italic-lf-scl-t1.tfm
./tfm/public/newtx/ntxbmi07.tfm
./tfm/public/newtx/ntx-BoldItalic-osf-sc-t1.tfm
./tfm/public/newtx/ntx-Bold-tosf-scl-t1.tfm
./tfm/public/newtx/ntxbmi15.tfm
./tfm/public/newtx/ntx-Italic-lf-sc-ot1.tfm
./tfm/public/newtx/ntx-Italic-tlf-sc-ot1.tfm
./tfm/public/newtx/ntxbex.tfm
./tfm/public/newtx/ntxbmi17.tfm
./tfm/public/newtx/ntx-Italic-lf-ot1.tfm
./tfm/public/newtx/rntxbmi7.tfm
./tfm/public/newtx/ntx-BoldItalic-tosf-sc-ot1.tfm
./tfm/public/newtx/ntx-BoldItalic-osf-ly1.tfm
./tfm/public/newtx/ntx-Italic-tosf-sc-ot1.tfm
./tfm/public/newtx/ntxmi15.tfm
./tfm/public/newtx/ntx-Bold-osf-ot1.tfm
./tfm/public/newtx/ntx-Bold-tosf-sc-ot1.tfm
./tfm/public/newtx/ntxmia.tfm
./tfm/public/newtx/ntx-Bold-lf-scl-ot1.tfm
./tfm/public/newtx/ntx-BoldItalic-osf-sc-ot1.tfm
./tfm/public/newtx/ntx-Italic-tosf-scl-t1.tfm
./tfm/public/newtx/ntx-BoldItalic-tlf-scl-t1.tfm
./tfm/public/newtx/ntxmi0.tfm
./tfm/public/newtx/ntxbmials.tfm
./tfm/public/newtx/ntx-Italic-osf-th-ot1.tfm
./tfm/public/newtx/ntxsups-Bold-t1.tfm
./tfm/public/newtx/ntx-BoldItalic-lf-scl-t1.tfm
./tfm/public/newtx/ntx-BoldItalic-tlf-t1.tfm
./tfm/public/newtx/ntx-BoldItalic-osf-sc-ly1.tfm
./tfm/public/newtx/ntx-Italic-tosf-t1.tfm
./tfm/public/newtx/ntx-Bold-tlf-sc-t1.tfm
./tfm/public/newtx/ntx-Regular-lf-ly1.tfm
./tfm/public/newtx/ntxbmi.tfm
./tfm/public/newtx/ntx-Italic-osf-sc-ly1.tfm
./tfm/public/newtx/ntx-BoldItalic-tosf-scl-ot1.tfm
./tfm/public/newtx/ntx-Regular-tosf-sc-ly1.tfm
./tfm/public/newtx/ntxsups-BoldItalic-ly1.tfm
./tfm/public/newtx/ntx-BoldItalic-lf-ly1.tfm
./tfm/public/newtx/ntx-Bold-tosf-sc-t1.tfm
./tfm/public/newtx/ntx-Bold-tlf-sc-ly1.tfm
./tfm/public/newtx/ntxbmi7.tfm
./tfm/public/newtx/ntx-Bold-tosf-sc-ly1.tfm
./tfm/public/newtx/ntx-Bold-tlf-scl-t1.tfm
./tfm/public/newtx/ntx-Italic-tosf-scl-ly1.tfm
./tfm/public/newtx/ntx-Italic-tosf-sc-ly1.tfm
./tfm/public/newtx/ntx-BoldItalic-osf-scl-t1.tfm
./tfm/public/newtx/ntxexmods.tfm
./tfm/public/newtx/ntx-Regular-osf-scl-ot1.tfm
./tfm/public/newtx/ntx-Regular-lf-sc-t1.tfm
./tfm/public/newtx/ntxsy7.tfm
./tfm/public/newtx/ntx-BoldItalic-tlf-sc-t1.tfm
./tfm/public/newtx/ntx-BoldItalic-tlf-sc-ot1.tfm
./tfm/public/newtx/ntx-Italic-tosf-sc-t1.tfm
./tfm/public/newtx/ntxbsy5.tfm
./tfm/public/newtx/ntx-Italic-tlf-t1.tfm
./tfm/public/newtx/ntx-Italic-osf-th-ly1.tfm
./tfm/public/newtx/ntx-Bold-lf-ot1.tfm
./tfm/public/newtx/ntx-Regular-lf-t1.tfm
./tfm/public/newtx/ntx-Regular-tlf-scl-t1.tfm
./tfm/public/newtx/ntx-Regular-tlf-scl-ot1.tfm
./tfm/public/newtx/ntx-Italic-tlf-scl-ly1.tfm
./tfm/public/newtx/ntxsups-Italic-ot1.tfm
./tfm/public/newtx/ntxsups-Italic-ly1.tfm
./tfm/public/newtx/ntx-Regular-tosf-sc-t1.tfm
./tfm/public/newtx/ntx-Italic-lf-scl-ot1.tfm
./tfm/public/newtx/ntx-Bold-osf-t1.tfm
./tfm/public/newtx/ntxbsym.tfm
./tfm/public/newtx/ntxsyc.tfm
./tfm/public/newtx/ntx-Bold-tlf-ly1.tfm
./tfm/public/newtx/ntx-Regular-osf-sc-ly1.tfm
./tfm/public/newtx/ntx-Regular-lf-sc-ly1.tfm
./tfm/public/newtx/ntxbmia.tfm
./tfm/public/newtx/ntx-BoldItalic-lf-ot1.tfm
./tfm/public/newtx/ntx-Italic-osf-scl-t1.tfm
./tfm/public/newtx/ntxsups-Italic.tfm
./tfm/public/newtx/ntx-BoldItalic-tlf-sc-ly1.tfm
./tfm/public/newtx/ntxsybalt.tfm
./tfm/public/newtx/ntxbexx.tfm
./tfm/public/newtx/ntx-Bold-tlf-scl-ot1.tfm
./tfm/public/newtx/ntx-Italic-lf-scl-ly1.tfm
./tfm/public/newtx/ntx-Regular-lf-sc-ot1.tfm
./tfm/public/newtx/ntx-Italic-tosf-scl-ot1.tfm
./tfm/public/newtx/ntx-BoldItalic-tosf-sc-ly1.tfm
./tfm/public/newtx/ntx-Regular-tlf-sc-ot1.tfm
./tfm/public/newtx/ntx-Regular-tosf-ot1.tfm
./tfm/public/newtx/ntx-BoldItalic-osf-t1.tfm
./tfm/public/newtx/ntx-Bold-lf-t1.tfm
./tfm/public/newtx/ntx-Italic-osf-t1.tfm
./tfm/public/newtx/ntx-Regular-osf-t1.tfm
./tfm/public/newtx/ntx-Italic-lf-ly1.tfm
./tfm/public/newtx/ntxexb.tfm
./tfm/public/newtx/ntx-Regular-tosf-scl-ot1.tfm
./tfm/public/newtx/ntx-BoldItalic-tosf-scl-t1.tfm
./tfm/public/newtx/ntx-Italic-lf-sc-ly1.tfm
./tfm/public/newtx/ntx-Bold-tosf-scl-ly1.tfm
./tfm/public/newtx/ntx-BoldItalic-lf-scl-ot1.tfm
./tfm/public/newtx/ntx-Italic-tlf-sc-ly1.tfm
./tfm/public/newtx/ntx-Italic-tlf-sc-t1.tfm
./tfm/public/newtx/ntx-Italic-tlf-ot1.tfm
./tfm/public/newtx/ntx-BoldItalic-lf-t1.tfm
./tfm/public/newtx/ntx-Regular-tlf-ly1.tfm
./tfm/public/newtx/ntx-Italic-tlf-scl-ot1.tfm
./tfm/public/newtx/ntx-Italic-osf-th-t1.tfm
./tfm/public/newtx/ntx-BoldItalic-osf-scl-ly1.tfm
./tfm/public/newtx/rntxmi5.tfm
./tfm/public/newtx/ntx-Italic-tosf-ot1.tfm
./tfm/public/newtx/ntx-Regular-osf-sc-t1.tfm
./tfm/public/newtx/ntx-Regular-tlf-sc-ly1.tfm
./tfm/public/newtx/ntx-Bold-osf-ly1.tfm
./tfm/public/newtx/ntxexx.tfm
./tfm/public/newtx/ntx-BoldItalic-lf-sc-ly1.tfm
./tfm/public/newtx/ntx-BoldItalic-lf-sc-ot1.tfm
./tfm/public/newtx/ntxbmi1x.tfm
./tfm/public/newtx/ntx-Italic-lf-sc-t1.tfm
./tfm/public/newtx/ntxmi.tfm
./tfm/public/newtx/ntx-Bold-tlf-t1.tfm
./tfm/public/newtx/ntx-BoldItalic-tosf-ot1.tfm
./tfm/public/newtx/ntx-Bold-tlf-sc-ot1.tfm
./tfm/public/newtx/ntx-Italic-lf-t1.tfm
./enc/dvips/fbb/fbb_wlmntx.enc
./enc/dvips/newtx/ntx-ot1-lf.enc
./enc/dvips/newtx/ntx-ot1-th-osf.enc
./enc/dvips/newtx/ntx-ot1-lf-sc.enc
./enc/dvips/newtx/ntx-ot1-sc.enc
./enc/dvips/newtx/ntx-ec-tlf.enc
./enc/dvips/newtx/ntxmiaalt.enc
./enc/dvips/newtx/ntx-ecth-tlf.enc
./enc/dvips/newtx/ntx-texnansi-lf.enc
./enc/dvips/newtx/ntx-texnansi-osf-sc.enc
./enc/dvips/newtx/ntx-texnansi-tosf-sc.enc
./enc/dvips/newtx/ntx-ot1-th-tlf.enc
./enc/dvips/newtx/ntx-ec-tlf-sc.enc
./enc/dvips/newtx/ntx-ec-tosf-sc.enc
./enc/dvips/newtx/ntx-ot1-osf-sc.enc
./enc/dvips/newtx/ntx-ecth-tosf.enc
./enc/dvips/newtx/ntx-texnansi-tlf-sc.enc
./enc/dvips/newtx/ntx-ot1-tosf.enc
./enc/dvips/newtx/ntx-ot1-tlf.enc
./enc/dvips/newtx/ntx-texnansi-tlf.enc
./enc/dvips/newtx/ntx-ec-lf.enc
./enc/dvips/newtx/ntx-ec-osf-sc.enc
./enc/dvips/newtx/ntx-ecth-osf.enc
./enc/dvips/newtx/ntx-texnansi-th-osf.enc
./enc/dvips/newtx/ntx-t1-sc.enc
./enc/dvips/newtx/ntx-ot1-tlf-sc.enc
./enc/dvips/newtx/ntx-texnansi-tosf.enc
./enc/dvips/newtx/ntx-texnansi-lf-sc.enc
./enc/dvips/newtx/ntx-texnansi-th-tlf.enc
./enc/dvips/newtx/ntx-ot1-tosf-sc.enc
./enc/dvips/newtx/ntx-texnansi-osf.enc
./enc/dvips/newtx/ntx-ecth-lf.enc
./enc/dvips/newtx/ntx-ec-tosf.enc
./enc/dvips/newtx/ntx-ly1-sc.enc
./enc/dvips/newtx/ntx-ot1-osf.enc
./enc/dvips/newtx/ntx-ec-lf-sc.enc
./enc/dvips/newtx/ntx-ec-osf.enc
./opentype/public/cm-unicode/cmuntx.otf

It seems that the .pfb files are the ones that contain the fonts but I didn't follow this path. I found the file /tex/latex/newtx/newtxtext.sty under the texmf-dist directory and it said that the fonts were based on TeX-Gyre Termes font. I found many files with this information (find . -type f -iname '*gyre*'):

./fonts/afm/public/newpx/TeXGyrePagellaX-Italic.afm
./fonts/afm/public/newpx/TeXGyrePagellaX-Regular.afm
./fonts/afm/public/newpx/TeXGyrePagellaX-Bold.afm
./fonts/afm/public/newpx/TeXGyrePagella-Regular.afm
./fonts/afm/public/newpx/TeXGyrePagellaX-BoldItalic.afm
./fonts/opentype/public/tex-gyre/texgyreheroscn-bold.otf
./fonts/opentype/public/tex-gyre/texgyreadventor-bold.otf
./fonts/opentype/public/tex-gyre/texgyrepagella-bold.otf
./fonts/opentype/public/tex-gyre/texgyreadventor-regular.otf
./fonts/opentype/public/tex-gyre/texgyretermes-regular.otf
./fonts/opentype/public/tex-gyre/texgyrebonum-bold.otf
./fonts/opentype/public/tex-gyre/texgyretermes-bolditalic.otf
./fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf
./fonts/opentype/public/tex-gyre/texgyrepagella-italic.otf
./fonts/opentype/public/tex-gyre/texgyrecursor-regular.otf
./fonts/opentype/public/tex-gyre/texgyrecursor-bolditalic.otf
./fonts/opentype/public/tex-gyre/texgyreheros-regular.otf
./fonts/opentype/public/tex-gyre/texgyreschola-bold.otf
./fonts/opentype/public/tex-gyre/texgyreheroscn-regular.otf
./fonts/opentype/public/tex-gyre/texgyreheros-bold.otf
./fonts/opentype/public/tex-gyre/texgyretermes-bold.otf
./fonts/opentype/public/tex-gyre/texgyreschola-bolditalic.otf
./fonts/opentype/public/tex-gyre/texgyreheros-bolditalic.otf
./fonts/opentype/public/tex-gyre/texgyreschola-italic.otf
./fonts/opentype/public/tex-gyre/texgyreheros-italic.otf
./fonts/opentype/public/tex-gyre/texgyreschola-regular.otf
./fonts/opentype/public/tex-gyre/texgyreadventor-italic.otf
./fonts/opentype/public/tex-gyre/texgyreadventor-bolditalic.otf
./fonts/opentype/public/tex-gyre/texgyrebonum-bolditalic.otf
./fonts/opentype/public/tex-gyre/texgyrecursor-italic.otf
./fonts/opentype/public/tex-gyre/texgyreheroscn-italic.otf
./fonts/opentype/public/tex-gyre/texgyretermes-italic.otf
./fonts/opentype/public/tex-gyre/texgyrechorus-mediumitalic.otf
./fonts/opentype/public/tex-gyre/texgyrebonum-regular.otf
./fonts/opentype/public/tex-gyre/texgyrebonum-italic.otf
./fonts/opentype/public/tex-gyre/texgyreheroscn-bolditalic.otf
./fonts/opentype/public/tex-gyre/texgyrecursor-bold.otf
./fonts/opentype/public/tex-gyre/texgyrepagella-bolditalic.otf
./fonts/opentype/public/newpx/TeXGyrePagellaX-Bold.otf
./fonts/opentype/public/newpx/TeXGyrePagellaX-Regular.otf
./fonts/opentype/public/newpx/TeXGyrePagellaX-BoldItalic.otf
./fonts/opentype/public/newpx/TeXGyrePagellaX-Italic.otf
./fonts/opentype/public/tex-gyre-math/texgyretermes-math.otf
./fonts/opentype/public/tex-gyre-math/texgyrepagella-math.otf
./fonts/opentype/public/tex-gyre-math/texgyredejavu-math.otf
./fonts/opentype/public/tex-gyre-math/texgyrebonum-math.otf
./fonts/opentype/public/tex-gyre-math/texgyreschola-math.otf
./fonts/opentype/public/newtx/TeXGyreTermesX-Regular.otf
./fonts/opentype/public/newtx/TeXGyreTermesX-Bold.otf
./fonts/opentype/public/newtx/TeXGyreTermesX-Italic.otf
./fonts/opentype/public/newtx/TeXGyreTermesX-BoldItalic.otf
./tex/context/fonts/mkiv/type-imp-texgyre.mkiv
./tex/context/fonts/mkiv/texgyre.lfg
./tex/latex/newpx/TeXGyrePagellaX.fontspec
./tex/latex/newtx/TeXGyreTermesX.fontspec

and I was able to make symbolic links to the TeXGyreTermesX files in /usr/share/fonts. Now I can use those fonts everywhere and in the plots text and numbers are rendered with this font as I wanted. However, I have not been able to get the same math greek characters. I made a symbolic link to the file ./fonts/opentype/public/tex-gyre-math/texgyretermes-math.otf but I don't get the same fonts (left is the plot, right is the LaTeX document, the number 2 is the same, as you can see):

enter image description here enter image description here

Any ideas? I'm using TeX Live 2017 and the program I'm using for plotting is the library matplotlib in python. (I'm aware that you can use LaTeX rendering but I would like not to use it for several reasons).

  • Did you try this: matplotlib.org/users/usetex.html ? Probably easier than faffing about with the font files. – Thruston Oct 17 '17 at 12:35
  • Or stick with Matplotlib mathtext engine, using the STIX options? matplotlib.org/users/mathtext.html#mathtext-tutorial – Thruston Oct 17 '17 at 12:41
  • The last line in my question was referring to using usetex=True. About that, I've found some issues. The first one is that choosing one of the fonts that is not one of the presets is not supported. If you put in the preamble \usepackage{newtxtext,newtxmath} it conflicts with the package textcomp. I managed to get it working by modifying the file in matplotlib that deals with the preamble. After this, the size of the figure was at least 5 times bigger as when I do not use usetex. matplotlib compiles each label independently, I think it has to do something with the bigger file size. – Nister Oct 17 '17 at 13:52
  • Ah I missed that last line first time I read it. Perhaps you could make that bit more prominent in your question. But what about regular mathtext with STIX? Is that no good either? – Thruston Oct 17 '17 at 14:00
  • I didn't try the STIX font, it may look very similar. I will try it once I get home. Having the same fonts is not very important but I would like to do it if it's possible. Next time I can try to pick a font that I know can be used both in matplotlib and LaTeX without too much hassle. I think the document looks more 'consistent' but if I don't have choice I will use the regular mathtext. – Nister Oct 17 '17 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.