I have an external font and be able to use it in my documents on my desktop computer with MiKTeX 2.9.

Now I try to use the same font with portable MiKTeX 2.9. The external font is located in my local TeXFM. With normal MiKTeX I need to call

initexmf --edit-config-file updmap

to open the local file updmap.cfg for inserting Map thefont.map. Portable MiKTeX (starting from the Command Prompt you get from the taskbar entry for MiKTeX portable) opens the system updmap.cfg in <portable-MiKTeX>\miktex\config, which is changed always you update portable MiKTeX.

It is a quick and very dirty workaround to change the system file until the next update, but how can I tell portable MiKTeX to use the external font and remember it over the next update?

For me this is an unwanted behavior, I would tend to see it as a bug.


It may be an unwanted/unexpected behaviour, but it is the consequence of setting all MiKTeX variables (see also “Additional Note” in my answer to “Create a local texmf tree in MiKTeX”) to one folder to be in portable mode. You can check this yourself by executing initexmf --report from the command prompt provided by MiKTeX portable from its taskbar entry.

So, for MiKTeX portable the approach must be a bit different from my answer to “Manual font installation”. Some remarks:

  1. Exactly as in “normal” MiKTeX the local TeXMF directory must be outside of the directory structure of MiKTeX itself. It must be on the same drive, of course. The path is saved relative then.

  2. OpenType/TrueType fonts: No problems with installation in local TeXMF path here, but the execution of fc-cache will always scan the system fonts, usually in C:\Windows\Fonts. So when you use MiKTeX portable in the way, as it is originally thought for (on a removable drive), you have to refresh the font-cache each time you plug the removable drive on another computer.

  3. After adding all Type1 fonts and relatives in your portable local TeXMF do not execute initexmf --edit-config-file=updmap.cfg or the slightly shorter form: This will open MiKTeX’ main updmap.cfg, that will be overwritten on your next update!

    Instead, create an empty file updmap.cfg by hand in <MiKTeX-portable_localtexmf>\miktex\config, open this with your favorite text editor, and add the needed Map entries there (you can _look _ into the main updmap.cfg to see how this has to be done). Do not forget to refresh the filename database and format files. It may be necessary to add the --force option (it was not for me, but was reported by others and does not hurt): initexmf --update-fndb --force (or shorter initexmf -u --force), followed by initexmf --mkmaps --force (or shorter updmap --force).

  • Thank you so very much! I had to run ´texhash --force --update-fndb´, then ´updmap --force´ and then ´texhash --force --update-fndb´ again, before it worked. But it was your description that put me in right direction. – Sveinung Mar 31 '14 at 21:33
  • @Sveinung: texhash is just an alias for initexmf. – Speravir Mar 31 '14 at 23:31

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.