1

I have got a custom font from a professor which contains a character I need. I got the following files: crystp.pfb, crystp.afm and crystp.tmf.

I also got the following instructions on how to install this font.

  1. copy the .tfm file into $miktexroot\fonts\ftm\public\cryst1
  2. copy the .afm file into $miktexroot\fonts\afm\public\cryst1
  3. copy the .pfb file into $miktexroot\fonts\type1\public\cryst1
  4. Append "p +cryst1.map" to $miktex\dvips\config\config.ps
  5. Create file cryst1.map in $miktexroot\dvips\cryst1 and append the line "cryst cryst1
  6. execute initexmf -u
  7. in the tex file I use: \DeclareFontFamily{U}{cry}{\hyphenchar\font=-1} \DeclareFontShape{U}{cry}{m}{n}{ <-> cryst}{} \newcommand{\cry}1{{\usefont{U}{cry}{m}{n} \symbol{#1}}}
  8. to use the character I use \cry{167}
  9. to create the pdf file I run pdflatex test.tex

Alas, this does not work. The character is not printed. The log file tells me that this character is missing:

Missing character: There is no § in font cryst!

I used the program fontforge to take a look into the .pfb file and there I can see that my character is at the § place.

Unfortunately the professor is retired and does not work anymore. He also used this font years ago and only installed it. So he already told me, that he can not help me at all. I know that there already is a font called cryst, but it does not contain my character.

What am I missing?

@Update: The files

Martin
  • 113
  • The instructions regarding the map are outdated. See here for the current method https://docs.miktex.org/2.9/manual/advanced.html#psfonts. But this shouldn't lead to this message. Check the font table e.g. with http://www.ctan.org/pkg/fonttable. Addition: I just saw that the name seem to be crystp with a p. – Ulrike Fischer Jan 29 '17 at 22:06
  • The font is part of the MiKTeX distribution, and you should install it with MiKTeX Package Manager (Admin). However, there may be some problems due to a lacking .map file. – Bernard Jan 29 '17 at 22:07
  • @Bernard there is a cryst-font in miktex, but neither crystp nor cryst1 (I don't know which font really should be installed here). – Ulrike Fischer Jan 29 '17 at 22:18
  • @Bernard I know that that font is basically part of the distribution and it is also installed and I can use it. So \cry{41} would print the correct character. Alas the character I need (167) in NOT part of the font that is part of the distribution. Therefor I got this custom font which is identically to the distribution font but that one character. – Martin Jan 29 '17 at 22:29
  • @UlrikeFischer crystp is the actual font name. I have no idea why the instructions use cryst1 as directory names and so on. I have tried your suggestion and used the initexmf --edit-config-file updmap. But it did not help. The error is the same. Is there a way I can check whichfonts are actually loaded? – Martin Jan 29 '17 at 22:32
  • Well if your tfm is called crystp then you need \DeclareFontShape{U}{cry}{m}{n}{ <-> crystp}{}. – Ulrike Fischer Jan 29 '17 at 22:35
  • @Ulrike Fischer: On CTAN there is only a cryst font. In the README, it seems the author wanted the directories that contain the different font files (.mf, .pfb, &c.) to be called cryst1, which is not respected by MiKTeX, which simply names them cryst. I've just tested it, and adding a cryst.map file in the /fonts/map/ directory, mentioning this .map file in the local updmap.cfg makes all work fine (except perhaps the missing glyph). – Bernard Jan 29 '17 at 22:39
  • @Martin: I've just quickly tested the font. It seems to have glyphs up to slot 145. What is slot 167 supposed to be? – Bernard Jan 29 '17 at 22:47
  • I have created crystp folders in the afm/public, tfm/public and type1/public folders and copied the corresponding crystp.* files into these directories. I have created a crystp.map file in fonts/map/crystp (and for test reasons in dvips/crystp). The map file contains "cryst crystp <crypst.pfb" (I have also testet "crystp crystp <crystp.pfb"). Then I changed my tex file the way @UlrikeFischer said. The new error I get now is: Couldn't open `crys.cfg' Sorry, but miktex-maketfm did not succeed for the following reason: No creation rule for font crystp. – Martin Jan 30 '17 at 05:14
  • @Bernard As I said, the standard cryst font which comes with miktex works just fine. Miktex downloaded and installed this font automatically and I can use it. The problem is, that my needed glyph is NOT part of that font. The symbol is a nicely drawn p. In german this represents a "Balkengruppe" (sorry but I don't know the english term, might be Rod group). One big secrets to me is the content of the map file. I've tried some variations with no success. – Martin Jan 30 '17 at 05:21
  • I have uploaded the files. Maybe this helps. – Martin Jan 30 '17 at 05:55

1 Answers1

1

The map-file is not in the files you uploaded. But here an installation /use instruction without it:

  1. undo what you have done
  2. If you haven't a localtexmf-tree yet then create one: Create a folder (outside miktex) called e.g. localtexmf
  3. Put the tfm in localtexmf/fonts/tfm/crystp
  4. Put the pfb in localtexmf/fonts/type1/crystp
  5. Attach these localtexmf as new root in miktex settings or if you used an existing localtexmf update its FNDB with initexmf -u

Then run this document with pdflatex (it won't work with latex + dvips):

\documentclass{article}
\usepackage{fonttable}
\pdfmapline{=crystp crystp <crystp.pfb}
\DeclareFontFamily{U}{cry}{\hyphenchar\font=-1}
\DeclareFontShape{U}{cry}{m}{n}{ <-> crystp}{}
\newcommand{\cry}[1]{{\usefont{U}{cry}{m}{n} \symbol{#1}}}
\begin{document}
\cry{167}
\xfonttable{U}{cry}{m}{n}

\end{document}

It should give a document with p and a fonttable.

enter image description here

You can later move the map-file line crystp crystp <crystp.pfb to a map crystp.map and add this map with initexmf --edit-config-file updmap to updmap.cfg and then run updmap.

Ulrike Fischer
  • 327,261