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

  • The instructions regarding the map are outdated. See here for the current method docs.miktex.org/2.9/manual/advanced.html#psfonts. But this shouldn't lead to this message. Check the font table e.g. with 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 <code>initexmf --edit-config-file updmap</code>. 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
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.

  • This works like a charm. Just want to add that I needed to run initexmf --mkmaps at the very end to use the map file. – Martin Jan 30 '17 at 10:09
  • initexmf --mkmaps and updmap are synonyms. As updmap is shorter I prefer it. – Ulrike Fischer Jan 30 '17 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.