6

I would like to make fonts used by latex (xelatex to be precise) available as system font.

Since I only find a lot of questions asking the reverse, I am not sure if it is possible at all.

My precise problem is that I convert a pdf file, which I compiled with xelatex,to svg using inkscape. The fonts in the resulting svg file are not the ones used in the pdf file and it looks cluttered. At least in inkscape and also if I open the file with firefox or chromium not I am on Ubuntu 15.10.

There is a related question here: How do I install fonts? but I need to know where to find the names and the files for the xelatex fonts etc.

  • 2
    Possible duplicate of How do I install fonts? – mikewhatever Jan 9 '16 at 16:48
  • Maybe related, but that does not seem to be tex related. I need to know where to find the names and the files for the xelatex fonts... – highsciguy Jan 9 '16 at 16:59
  • It would have been a good idea to actually ask what you wanted to know. Detailed questions usually get detailed answers, as opposed to vague ones. – mikewhatever Jan 9 '16 at 17:04
  • Possible duplicate of Use CM Roman (latex font) in Inkscape? – Aoeuid Feb 1 '16 at 19:07
  • No, not a duplicate, but I think to understand the problem now. – highsciguy Feb 1 '16 at 21:15
0

Latex fonts installed via font packages should be automatically available in inkscape. It may be necessary to run sudo fc-cache in the font directory /usr/share/fonts to update the font cache.

An obstacle is that the latex name for the font may differ from the system name. When a pdf file is imported in inkscape, the font name are (depending on the options) not replaced or not necessarily replaced by the proper name for the system font (the 'most similar' name is chosen in this case).

Fonts can be selected in latex with, e.g,

\usepackage{fontspec}
\usepackage{tgpagella}
\setmainfont[
  Ligatures=TeX,
  Extension=.otf,
  UprightFont=*-regular,
  ItalicFont=*-italic,
  BoldFont=*-bold,
  BoldItalicFont=*-bolditalic,
]{texgyrepagella}

However, there is no system font called texgyrepagella. The corresponding font name is TeX Gyre Pagella. This is why

\usepackage{fontspec}
\usepackage{tgpagella}
\setmainfont{TeX Gyre Pagella}

may work for the imported pdf file where the above does not.

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.