0

In cmtex10.pfb we see dup 45 /minus put. How to change it to dup 45 /hyphen put? Is the following solution correct?

t1disasm `kpsewhich cmtex10.pfb` > cmtex10.pps
perl -i -pe 's!45 /minus!45 /hyphen!' cmtex10.pps
t1asm cmtex10.pps cmtex10.pfb
rm cmtex10.pps

This question is connected with this question.

Igor Liferenko
  • 7,063
  • 2
  • 14
  • 47
  • Has anyone asked barbara about it? I'm assuming you also have the AMS versions. I don't think this solution can be called 'correct' by any stretch of the imagination. Among other things, the name remains incorrect in the AFM etc. But are you sure that the name should be changed? Shouldn't the font have a glyph minus? It is, after all, full of maths symbols. What you're doing looks like a hack to superficially gloss over an issue with the PDF viewer to me, rather than a solution to a problem, let alone a correct one. – cfr Mar 23 '16 at 02:03
  • @cfr I was actually asking if it was technically correct. I'm concerned only that the search function in pdf viewer worked for me. I use it in my local setup only. Meanwhile, I have written to AMS about this issue. – Igor Liferenko Mar 23 '16 at 02:09
  • minus is part of the extended ASCII set covered by this font in MetaFont form. It is listed in tset.mf which is one of the lists used in creating this font. So I think minus is correct. (I know somebody said it was an artefact of conversion to postscript, but I don't see any evidence for that.) If you want to change it, that's one thing, but there is no correct way to do it, because the glyph name is correct as far as I can see. (Or it is a bug in Knuth's design of CM.) – cfr Mar 23 '16 at 02:10
  • @cfr OK, how to reassemble a foo.pfb file and change name of glyph with code xy from /bar to /baz correctly? – Igor Liferenko Mar 23 '16 at 02:12
  • Maybe you should make that clear in your question since, from a TeX perspective, you are trying to solve a non-problem. – cfr Mar 23 '16 at 02:12
  • Well, I'd open it in FontForge and do it that way. Or I'd use FontForge at the command line. I don't claim that is more correct than other methods. Just that's what I know ;). – cfr Mar 23 '16 at 02:14
  • @cfr: and answer would be welcome (using cmtex10.pfb as an example) – Igor Liferenko Mar 23 '16 at 02:15
  • I don't know what to add. The easiest way is to open the font in FontForge and change the name. I mean, you just do it. – cfr Mar 23 '16 at 02:33
  • @cfr: how to do it in batch mode? – Igor Liferenko Mar 23 '16 at 02:53
  • What do you mean? What are you trying to do exactly? Also, if you are on Windows, any answer I gave will be useless to you. (batch mode sounds Windowsesque.) – cfr Mar 23 '16 at 03:12
  • @cfr: under "batch mode" I mean that it should be done automatically without user interaction (i.e., in a script). BTW, if you care you may write in more detail what you have found out about tset.mf as an answer to this post: http://tex.stackexchange.com/questions/300239/incorrect-cmap-code-for-in-cmtex-font – Igor Liferenko Mar 23 '16 at 05:39
  • @cfr: you say that glyph name ("minus") for code 45 in cmtex10.pfb is determined from tset.mf. Then from which file is determined glyph name ("hyphen") for code 45 in cmtt10.pfb? – Igor Liferenko Mar 23 '16 at 13:23
  • @cfr -- the attribution of "hyphen" to cmtt and "minus" to cmtex" is intentional, and stems ultimately from the unicode/ascii conflation of the two in the code assignment. knuth wanted to provide an "extended ascii character set" withcmtex, and this wasn't a problem until the fonts were converted frommf` to type1. igor did send a report to ams tech-support, and i'm trying to work out a cogent answer. i'll post it here when it's a bit more settled. – barbara beeton Mar 29 '16 at 14:25
  • @barbarabeeton I know. ?? – cfr Mar 29 '16 at 20:46

0 Answers0