Figures are created in Matlab on Centos that are automatically turned into PDFs. The figures should contain text in Questrial font. Matlab seems unable to output a vector PDF with the required font embedded. The font is instead changed to Courier. This is true for the inbuilt pdf exporter (-dpdf), the 3rd party function export_fig, and printing through cups-pdf.
Instructions/code to enable the Matlab figure to be turned into a PDF with text embedded as Questrial font. Filesize must be reasonable for emailing, therefore Matlab’s “painters renderer” is preferred. The solution must be able to be implemented programmatically and not consume an unreasonable amount of system resource.
● PDF creation works perfectly in Windows using Bullzip PDF printer. Bullzip must interpret the Matlab figure differently than cups-pdf. Unfortunately cups-pdf appears to be the only PDF printer available for Linux.
● Matlab would not acknowledge the font if it was installed as a ttf or otf. It had to be installed as pfa or pfb.
● Creating the figure in Windows causes it to display the figure text (prior to printing as a PDF) in Questrial font. Although Questrial font is installed on Matlab in Linux (as evidenced by typing ‘listfonts’), the figure that is created is not displaying text in Questrial font unless the interpreter is set to Tex.
● Using OpenGL renderer instead of painters, creates either very pixilated PDFs or very large file sizes. This is also too computationally intensive and can cause the computer to become unresponsive
How to Reproduce the Problem
1. Download Questrial font and add it to CentOS system fonts
2. In Matlab, create a figure and insert a textbox containing text in Questrial font
3. Turn this figure into a PDF using cups-pdf or Matlab’s