# miktex-makepk: PK font Alegreya-Regular-lf-t1--base could not be created

I just want to use Alegreya font with pdflatex. i had a question about an error before and got an answer. But it gives another error now. what should i do.

error message:

miktex-makepk: PK font Alegreya-Regular-lf-t1--base could not be created.

in log file:

!pdfTeX error: pdflatex.exe (file Alegreya-Regular-lf-t1--base): Font Alegreya- Regular-lf-t1--base at 657 not found ==> Fatal error occurred, no output PDF file produced!

\documentclass[11pt,a4paper]{article}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.50cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{Alegreya} %% Option 'black' gives heavier bold face
\renewcommand*\oldstylenums[1]{{\AlegreyaOsF #1}}

\begin{document}
This is giving an error.
\end{document}

• It works fine for me in a current miktex 2.9. If your miktex is current then you probably have user map files, they are not updated when you install packages as admin. Run as user in a command line window updmap. Jan 20, 2014 at 17:09
• @Ulrike Fischer: it happens that MiKTeX installs a package without running updmap.exe. Is that due to the fact that I do have a personal updmap.cfg? I think the updmap.cfg in the main root should have been updated and updmap.exe should have run on installation. But maybe I missed something… Jan 20, 2014 at 17:55
• @Bernard: personal updmap.cfg is not a problem. But if you run (e.g. with on-the-fly) installation once updmap as user then you create user map files, and these take preference above the admin map files. From then on you will have to run updmap as user when you install a font. updmap --admin will have no effect. Jan 21, 2014 at 15:19
• @Ulrike: I must say I have some difficulties with these concepts – probably because I first installed MiKTeX as administrator, asking for an installation for any user, and so thinking that the fastest way to update for everybody was to update as administrator. Besides, I'm not sure that running updmap.exe --admin is quite the same as running updmap.exe ‘from the command line as administrator’. But maybe I'm wrong. Jan 21, 2014 at 17:51
• @Bernard: user settings wins over admins settings. If I change the background color in my account I overwrite the default settings of the admin. If the admin change the defaults later this will not affect my background color. And the same is true in miktex: if the user has overwritten the default font installation or installed a package it the user who has to manage it from there on. Check always also as user if there are updates. Jan 21, 2014 at 18:11

Dvips.map and friends do not know about Alegreya, so instead of loading type 1 fonts, MiKTeX tries to make bitmaps and doesn't know how to make them.

Check if you have a text file named updmap.cfg in C:\Users\Your_name\AppData\Roaming\MiKTeX\2.9\miktex\config. If not, create one. Add the following lines in that file:

Map Alegreya.map


Then execute as administrator this command line:

updmap.exe -verbose


The -verbose switch is there to check what's happening. That's all. You can check everything's OK by looking at the contents of psfonts.map, in C:\Users\Your_name\AppData\Local\MiKTeX\2.9\dvips\config. It should contain references to Alegreya.

Alternatively, you can compile with XeLateX or LuaLaTeX: you have to remove inputenc loading, save you document in UTF-8 format (no \usepackage[utf8]{inputenc}!) and write these lines in your preamble

\usepackage{fontspec}
\setmainfont{Alegreya}


Addendum: there seems to be a typo in line 233 of (MiKTeX's version of) alegreya.sty, which begins with:

\def*\useosf{...


and should begin with

\def\useosf{...

• Only worked when I executed updmap.exe as normal user, i.e., without --admin (for the xcharter package). Yay. Nov 19, 2014 at 0:26
• +1 for detailed explanation and pointing where to look! even after 2 years of this question, it was useful for me :-) Sep 25, 2016 at 6:34

I had the same problem but with the Classico font. My error message was

FATAL miktex-makemf - The URWClassico-Bold-lf-t1--base source file could not be found

followed by

FATAL miktex-makepk - PK font URWClassico-Bold-lf-t1--base could not be created.

I solved it by following the instructions at https://www.tug.org/fonts/fontinstall.html under "4. Font map files: telling TeX about the new font"

In short, run initexmf --edit-config-file updmap, add Map <mapfile> (in my case Map Classico.map) to the file, run initexmf --mkmaps and finally initexmf --update-fndb.

• Using this method, I was able to install other fonts as well, having assumed that FontName.map is the right syntax. Is it always the case? For instance, Gentium is the font, so Gentium.map goes into the config file?
– aiag
Sep 4, 2021 at 13:51