2

So I get the following error with some of my fonts and not the others:

xdvipdfmx:fatal: Type2 Charstring Parser: Parsing charstring failed: (status=-1, stack=5)

Output file removed.

Is there a way to fix this? All the fonts I am using are .otf files.

Hesam
  • 1,971
  • 6
    You know the drill: Please post an MWE, and do sure to mention at least one font for which the MWE compiles correctly and another font for which the MWE crashes with the error message you've stated above. Please also indicate which version of XeLaTeX and which version of fontspec you use. – Mico Aug 04 '14 at 19:06
  • The fontspec version is: "2014/06/21 v2.4a Font selection for XeLaTeX and LuaLaTeX". I can't figure out the XeLaTeX package but I assume it is the latest version since I updated with TeX Live Utility just now. I will post MWEs later today. – Hesam Aug 04 '14 at 19:18
  • 2
    That is an issue in xdvipdfmx, without a MWE and the actual fonts used, little help can be offered. – خالد حسني Aug 06 '14 at 03:00

1 Answers1

0

It could be because your document calls for glyphs that are unavailable in some of the fonts. If that is the problem and you absolutely have to use a font that doesn't have the required glyph, one solution is to substitute that glyph from a similar font that has it, as described at Using another font for a glyph that is not available in the current font

Corrigendum: see comments below for the actual cause of the error.

Lin Yangchen
  • 153
  • 8
  • 1
    Using characters that the font do not support would not trigger such an error (or any errors at all, for that matter); XeTeX will just show the default glyph for unsupported characters (usually an empty box) and issue a warning in the log. – خالد حسني Sep 05 '14 at 12:08
  • @KhaledHosny I did get an error doing that, calling the unavailable \'{n} while using the font IM Fell English Pro via fontspec and compiling with XeLaTeX: ** ERROR ** Type2 Charstring Parser: Parsing charstring failed: (status=-1, stack=5); Output file removed. I have no idea why that happened and would be happy to provide more details. – Lin Yangchen Sep 05 '14 at 19:43
  • 1
    This error does not indicate that a glyph is missing, but rather that xdvpdfmx failed to parse a certain glyph in the font, so like the OP, a MWE is needed for further debugging. – خالد حسني Sep 06 '14 at 04:09
  • @KhaledHosny thanks for the correction. Here's the MWE with the error if anyone wishes to look into it: \documentclass{minimal} \usepackage{fontspec} \setmainfont{IM FELL English PRO} \begin{document} \'{n} \end{document}. XeTeX version 3.1415926-2.4-0.9998, fontspec version 2.2b. I used the OpenType font downloadable here from the official website. Changing the font in the MWE to Arial makes the error go away. – Lin Yangchen Sep 06 '14 at 10:22
  • p.s. After updating to XeTeX version 3.14159265-2.6-0.99991 and fontspec version 2.4a my MWE now gives an identical error to the OP's. – Lin Yangchen Sep 06 '14 at 10:59
  • The problem is not specific to xetex: with @YangchenLin’s MWE, I too get the same error as the OP, with an up-to-date luatex as well as with xetex. – Thérèse Sep 06 '14 at 13:08
  • The font seems to be broken, but it is not entirely clear if this is the same issue as the OP (the "Type2 Charstring Parser" can fail for many reasons and he does not provide enough context), so I think this should be a question of its own. – خالد حسني Sep 08 '14 at 05:56
  • @KhaledHosny thanks, I have started the question here. – Lin Yangchen Sep 09 '14 at 21:32