The font processing/embedding when exporting vector graphics from the Matlab session started via the MCP server is faulty. This causes multiple issues, e.g, exportgraphics does not use the defined font, ticklabels and secondarylabels are often not correctly aligned, font size is wrong.
Minimal example to reproduce:
figure;
plot([1 2],[3 4]);
exportgraphics(gcf,"test.pdf",ContentType="vector");
When you then inspect the resulting pdf file, the font embedding is wrong. It is exported in my case using "AdobeArabic-Regular" which seems to be some kind of fallback (this font is the first one in alphabetic order installed on my Windows PC) . Default would be "Helvetica" in the minimal example but the result is the same with different fonts (as defined using FontName properties).
Similar problems also arise for other vector formats (svg, emf) and for the related function copygraphics as well as the usage of these via the figure toolstrip/axes toolbar.
(I inspected the font embedding using Acrobat Reader: document properties > fonts)
My setup currently:
- Matlab 2025b Update 4
- Matlab MCP Server v0.5.1
- Windows 11
The font processing/embedding when exporting vector graphics from the Matlab session started via the MCP server is faulty. This causes multiple issues, e.g, exportgraphics does not use the defined font, ticklabels and secondarylabels are often not correctly aligned, font size is wrong.
Minimal example to reproduce:
When you then inspect the resulting pdf file, the font embedding is wrong. It is exported in my case using "AdobeArabic-Regular" which seems to be some kind of fallback (this font is the first one in alphabetic order installed on my Windows PC) . Default would be "Helvetica" in the minimal example but the result is the same with different fonts (as defined using FontName properties).
Similar problems also arise for other vector formats (svg, emf) and for the related function copygraphics as well as the usage of these via the figure toolstrip/axes toolbar.
(I inspected the font embedding using Acrobat Reader: document properties > fonts)
My setup currently:
It looks like Codex doesn't forward environment variables to child processes in the same way as other coding agents. Can you try adding
env_vars = ["WINDIR"]to your settings TOML file. e.g.