I would like to be able to use a LaTeX math mode-like font for some plots. (I'm running Octave 5.1.0 on Windows 10.) The documentation at
suggests using the fontname property for this, but its instructions do not specify
Two suggestions came up when I searched. The first was just to use a font name, like
set(gca,"This Is A Font","defaulttextfontname","Helvetica")
This works, which is great.
The second was to give the directory and file like this:
title("This Is A Font","fontname","C:\Windows\Fonts\cambria.ttc")
While this doesn't return an error, it just prints the title with the default font.
In the end, all I had to do was
title("This Is A Font","fontname","Cambria Math")
and it worked. I had forgotten that I had not tried the simple string ("Cambria Math" here) with the property "fontname" intead of "defaulttextfontname".
I was surprised and impressed that I didn't need to specify a directory for an external font. Kudos to everyone who worked on this, and on Octave in general!
Though I was able to answer my question in the end, I wanted to submit this to the mailing list archives in case it could help someone else in the future.