Mathtype生成EPS转SVG时特殊字符(àâä等)未转换问题求助
Let's break down why those accented characters are getting lost and walk through actionable fixes:
Root Cause
Mathtype-generated EPS files often don’t fully embed the subset of Arial that includes accented Latin characters—even if your system has Arial installed. Ghostscript/Inkscape can’t map the characters correctly if they’re not embedded or if the font lookup has inconsistencies across Windows/Unix.
Fix 1: Convert Text to Paths (Quickest Solution)
Force Inkscape to render text as vector paths instead of relying on system fonts. This guarantees all characters (including accents) are preserved, though the text won’t be editable in the final SVG:
inkscape -z -f in.eps --export-text-to-path -l out.svg
Fix 2: Re-Embed Fonts in the EPS First
Use Ghostscript to fully embed Arial (and all required character subsets) into the EPS before converting with Inkscape:
- Process the original EPS to embed fonts:
gs -dNOPAUSE -dBATCH -sDEVICE=eps2write -dEmbedAllFonts=true -sOutputFile=embedded_in.eps in.eps - Convert the font-embedded EPS to SVG:
inkscape -z -f embedded_in.eps -l out.svg
This ensures Inkscape has access to all the characters it needs directly from the EPS file, no system font lookup required.
Fix 3: Fix Unix System Font Cache & Lookup
On Unix systems, even if you installed Arial, the font cache might not recognize the full character set:
- Refresh the font cache:
fc-cache -fv - Verify Arial is properly detected:
Make sure the output points to the full Arial font file (not a stripped-down version) before re-running your original Inkscape command.fc-list | grep Arial
Bonus Check: Inspect the EPS Font Declarations
Looking at your EPS content, confirm the font reference uses the full Arial family (e.g., /ArialMT with proper encoding) instead of a restricted subset. If it’s referencing a partial font, the re-embedding step above will resolve this.
If none of these work, double-check your Ghostscript and Inkscape versions—older releases had known issues with Latin-1 character encoding in EPS files. Updating to the latest stable versions often fixes edge cases.
内容的提问来源于stack exchange,提问作者Thomas Grockowiak

