2

In this site, there are some useful web fonts for icons. I would like to use such a kind of font for designs using icons next to the usual fonts of LaTeX for the text.

Concretely, I would like to build macros that use locally the fonts juts for display one icon. How can I do that ?

  • 1
    You can include svg graphics. – Sigur Dec 23 '13 at 16:32
  • I will look at that... – projetmbc Dec 23 '13 at 16:38
  • 1
    With Xe/LuaLaTeX, the package fontawesome is available. – marczellm Dec 23 '13 at 20:18
  • Very cool. I will try, hopping that all the package I use will work well with XeLaTeX. – projetmbc Dec 23 '13 at 22:26
2

You can use this package to include SVG-graphics. SVG-fonts are handled in a different way than simple SVG-graphics, so it may or may not work this way.

In general and since I have no experience with SVG in LaTeX, I would convert SVG to EPS or PDF with Inkscape. It is a more native format for LaTeX.

In your special case, I would consider not using SVG, PDF or EPS. I would use the TTF or OTF version of Font Awesome. Depending on which LaTeX you use, you can just use the TTF or OTF version without any preparations or you have to convert them to Type1. If you have to convert them, it's easy because you need no mappings and no kerning. You can search for "otf Type1" or, which might be easier, for "TTF Type1" in tex.stackexchange.com.

In ConTeXt you can use \getglyphdirect{FontAwesome.otf}{number of the icon}]. I guess in LuaLaTeX and XeLaTeX it is similar.

  • I will test that. – projetmbc Dec 23 '13 at 22:25
  • You can also use truetype directly with pdftex if you generate some support files for it. Or, converted to type 1, you can also use it with latex, of course. – cfr Dec 26 '13 at 3:45

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.