GithubHelp home page GithubHelp logo

fontawesome-latex's Introduction

#fontawesome: high quality web icons#

The fontawesome package grants access to 634 web-related icons provided by the included Font Awesome free font, designed by Dave Gandy and released under the open SIL Open Font License (available at http://scripts.sil.org/OFL). See http://www.fontawesome.io for more details about the font itself.

This package works both with Xe(La)TeX and Lua(La)TeX (using fontspec to load the included original otf font), as well as pdf(La)TeX (using an included type1 conversion and character mapping of the font).

Once the package is loaded, icons can be accessed through the general \faicon command, which takes as argument the name of the desired icon, or through direct commands specific to each icon. The full list of icon designs, names and direct commands is showcased in the manual.

Font Awesome font
Author: Dave Gandy
Licence: SIL Open Font License, version 1.1
URL: http://www.fontawesome.io

fontawesome LaTeX package
Author: Xavier Danaux ([email protected])
Licence: The LaTeX Project Public License, version 1.3c
URL: https://github.com/xdanaux/fontawesome-latex

fontawesome-latex's People

Contributors

xdanaux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fontawesome-latex's Issues

Package overwrites definition of \faHourglass and \faHourglass no longer works

Ref.: http://tex.stackexchange.com/questions/309780/hourglass-in-fontawesome-package

The following code fails with the error because the use of \faHourglass does not match its definition.

\documentclass{article}
\usepackage{fontawesome}
\begin{document}
\faHourglass
\end{document}

Writing \faHourglass3 compiles correctly.

The problem is due to the following lines from fontawesomesymbols-generic.tex:

\def\faHourglass1{\faicon{hourglass-1}}\expandafter\def\csname faicon@hourglass-1\endcsname{\faicon{hourglass-start}}
\def\faHourglass2{\faicon{hourglass-2}}\expandafter\def\csname faicon@hourglass-2\endcsname{\faicon{hourglass-half}}
\def\faHourglass3{\faicon{hourglass-3}}\expandafter\def\csname faicon@hourglass-3\endcsname{\faicon{hourglass-end}}

Because these lines come after the definition of \faHourglass

\def\faHourglass{\faicon{hourglass}}

each one overwrites the previous definition. The result is that \faHourglass must be immediately followed by a 3 and will produce the symbol corresponding to hourglass-end.

TeX macros cannot include numerals in their names so an alternative approach is required here. The same problem applies to all other cases where names are defined with numbers e.g. the battery symbols etc.

FontAwesome and Xelatex

The following does not work in XeLaTeX on the current MiKTeX version:

\documentclass[border=10pt, multi]{standalone}
\usepackage{fontawesome}
\standaloneenv{sym}
\begin{document}
\begin{sym}\faUserPlus\end{sym}
\end{document}

XeLaTex stops on the following error:

xdvipdfmx:warning: Invalid CMap
xdvipdfmx:fatal: pdf_ref_obj(): passed invalid object.
Output file removed.

The symbol itself is not relevant; the example does not work on most symbols. This has recently been discussed here by someone else. There a workaround is given to insert the following before \usepackage{fontawesome}:

\usepackage{fontspec}
\defaultfontfeatures{Extension = .otf}

I don't know if this is a bug, but it is certainly confusing, because there is no hint on how to fix the problem.

Error caused by `\defaultfontfeatures{Scale=MatchLowercase}`

Minimal example:

\documentclass{article}
\usepackage{fontspec}
\defaultfontfeatures{Scale=MatchLowercase}
\usepackage{fontawesome}
\begin{document}
test
\end{document}

Output:

$ lulatex main.tex
This is LuaTeX, Version 0.95.0 (TeX Live 2016)                                               [29/636]
 restricted system commands enabled.
(./main.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 1 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2016/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/l3pdfmode.def))
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/local/texlive/2016/texmf-dist/tex/luatex/luaotfload/luaotfload.sty(using
write cache: /Users/xucheng/Library/texlive/2016/texmf-var/luatex-cache/generic
)(using read cache: /usr/local/texlive/2016/texmf-var/luatex-cache/generic /Use
rs/xucheng/Library/texlive/2016/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.134 seconds)
(/usr/local/texlive/2016/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/euenc/eu2enc.def)
(/usr/local/texlive/2016/texmf-dist/tex/latex/euenc/eu2lmr.fd)(compiling luc: /
usr/local/texlive/2016/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regul
ar.luc)(load luc: /Users/xucheng/Library/texlive/2016/texmf-var/luatex-cache/ge
neric/fonts/otl/lmroman10-regular.luc))
(/usr/local/texlive/2016/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/tipa/t3enc.def(compiling luc: /us
r/local/texlive/2016/texmf-var/luatex-cache/generic/fonts/otl/lmromanslant10-re
gular.luc)(load luc: /Users/xucheng/Library/texlive/2016/texmf-var/luatex-cache
/generic/fonts/otl/lmromanslant10-regular.luc)(compiling luc: /usr/local/texliv
e/2016/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-italic.luc)(load luc:
 /Users/xucheng/Library/texlive/2016/texmf-var/luatex-cache/generic/fonts/otl/l
mroman10-italic.luc)(compiling luc: /usr/local/texlive/2016/texmf-var/luatex-ca
che/generic/fonts/otl/lmroman10-bold.luc)(load luc: /Users/xucheng/Library/texl
ive/2016/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-bold.luc)
(/usr/local/texlive/2016/texmf-dist/tex/latex/euenc/eu2lmss.fd)(compiling luc:
/usr/local/texlive/2016/texmf-var/luatex-cache/generic/fonts/otl/lmsans10-regul
ar.luc)(load luc: /Users/xucheng/Library/texlive/2016/texmf-var/luatex-cache/ge
neric/fonts/otl/lmsans10-regular.luc))
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/local/texlive/2016/texmf-dist/tex/lualatex/luatex-def/luatex.def
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)))))
(/usr/local/texlive/2016/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(/usr/local/texlive/2016/texmf-dist/tex/latex/fontawesome/fontawesome.sty
(/usr/local/texlive/2016/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/fontawesome/fontawesomesymbols-ge
neric.tex)(compiling luc: /usr/local/texlive/2016/texmf-var/luatex-cache/generi
c/fonts/otl/fontawesome.luc)(load luc: /Users/xucheng/Library/texlive/2016/texm
f-var/luatex-cache/generic/fonts/otl/fontawesome.luc)
! Undefined control sequence.
<argument> ...font }\rmfamily \l_fontspec_font \int_case:nnn
                                                  5{{5}{x}{8}{X}}{?}
l.45 \newfontfamily{\FA}{FontAwesome}

? 

Minimal working example for PDFLaTeX?

I'm looking for a minaml working example for Miktex+PDFLaTeX showing Fontawesome symbol.
Would be very helpful to have this in documentation...

\documentclass{article}
\usepackage{fontawesome}
\begin{document}
\section{test-section}
Test-text \faCheck test
\end{document}

is producing no pdf:

...
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\fontawesome\fontawesomesymbols-ge
neric.tex")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\fontawesome\fontawesomesymbols-pd
ftex.tex")) (Latex-Fontawsome-Test.aux)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\fontawesome\ufontawesometwo.fd")
[1{C:/Users/AdminMobil/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
(Latex-Fontawsome-Test.aux)Trying to make PK font FontAwesome--fontawesometwo at 600 DPI...
Running miktex-makemf.exe...

Sorry, but miktex-makemf did not succeed for the following reason:

  The FontAwesome--fontawesometwo source file could not be found.

The log file hopefully contains the information to get MiKTeX going again:

  C:/Users/AdminMobil/AppData/Local/MiKTeX/2.9/miktex/log/miktex-makemf.log

You may want to visit the MiKTeX project page, if you need help.

Running ttf2pk.exe...

Sorry, but miktex-makepk did not succeed for the following reason:

  PK font FontAwesome--fontawesometwo could not be created.

The log file hopefully contains the information to get MiKTeX going again:

  C:/Users/AdminMobil/AppData/Local/MiKTeX/2.9/miktex/log/miktex-makepk.log

You may want to visit the MiKTeX project page, if you need help.
 )
!pdfTeX error: pdflatex.exe (file FontAwesome--fontawesometwo): Font FontAwesom
e--fontawesometwo at 600 not found
 ==> Fatal error occurred, no output PDF file produced!

_____________________________________________________________________

 PDFLaTeX Compilation Report (Pages: 0)

 Errors: 1   Warnings: 0   Bad Boxes: 0
_____________________________________________________________________`

with
miktex-makepk.log

2016-08-03 16:12:53,178+0200 INFO  makex - Trying to make PK font FontAwesome--fontawesometwo at 600 DPI...
2016-08-03 16:12:53,200+0200 INFO  makex - Running miktex-makemf.exe...
2016-08-03 16:12:53,394+0200 INFO  makex - Running ttf2pk.exe...
2016-08-03 16:12:53,726+0200 FATAL miktex-makepk - PK font FontAwesome--fontawesometwo could not be created.

hmm are there any ideas on this?

Miktex is uptodate...

\fa500px does not work

The following example does not work:

\documentclass{standalone}
\usepackage{fontawesome}
\begin{document}
\fa500px
\end{document}

The error is

Use of \fa doesn't match its definition \fa500p

Skype icon

I'm having trouble using the Skype icon. Here's an MWE that produces the problem

\documentclass{article}
\usepackage{fontawesome}
\begin{document}
\faGithub
\faSkype
\end{document}

When I do latexmk -xelatex mwe.tex I get the GitHub logo in the PDF as expected, but a blank rectangle where the Skype icon should be which suggests to me that the correct glyph isn't being found. I have version 4.4.0 of the Fontawesome font installed.

LaTeX Error: Option clash for package {xparse,fontspec}

I'm not used to installing packages outside of a canned TeXLive distro, so I'm not sure if I messed something up or what the standard way to structure packages dependencies is. But if I try to use packages with options (like fontspec) in my document, I get errors like:

! LaTeX Error: Option clash for package fontspec.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

If I comment out one of the usepackage declarations than it seems to work.

Update to FA 5

FA 5.0 is out since a while, the new icons would be really nice to have!

Kaggle icon

Please, consider adding the Kaggle icon into this marvelous list.

Using fontawesome with moderncv: "Encoding scheme `TU' unknown."

When I try to enable fontawesome icons in moderncv, I get this error in the pdflatex log:

! LaTeX Error: Encoding scheme `TU' unknown.

A minimal example:

\documentclass[11pt,a4paper,sans]{moderncv}                                                                          
                                                                                                                     
\moderncvstyle{casual}                                                                                               
\moderncvcolor{blue}                                                                                                 
                                                                                                                     
\usepackage[utf8]{inputenc}                                                                                          
\usepackage[T1]{fontenc}                                                                                             
\usepackage{lmodern}                                                                                                 
                                                                                                                     
\usepackage{babel}                                                                                                   
                                                                                                                     
\name{John}{Doe}                                                                                                
\title{C/C++ Development}                                                                                            
\phone[mobile]{+1~xxx-yyyy}                                                                                       
\email{[email protected]}                                                                                    
\homepage{www.tractor.com}                                                                                      
                                                                                                                     
\social[linkedin]{johndoe}                                                                                      
\social[github]{john-doe}                                                                                       
\social[stackoverflow]{012345/johndoe}                                                                         
\social[orcid]{0000-0001-2345-6778}                                                                                  
\social[researchgate]{John-Doe}                                                                                 
\social[googlescholar]{ADFIE89AD}                                                                                 
                                                                                                                     
\moderncvicons{awesome}                                                                                              
                                                                                                                     
\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}                                                            
                                                                                                                     
\begin{document}                                                                                                     

\makecvtitle                                                                                                         
                                                                                                                     
foo                          
                                                                                    
\end{document}  

In fontawesomebrands.fd and fontawesomepro.fd there are many references to TU, so it appears to be some kind of central element. But without any hint from pdflatex, and nothing in google searches, I don't have a way to figure out what's missing or configured wrong.

Fontawesom icons not displayed with moderncv

Hi there!

Using 4.4.0 font-awesome package with moderncv 2.0.0 does not displayed icons. Here a sample:

\documentclass[11pt,a4paper,sans]{moderncv}
\usepackage{fontspec}
\usepackage{fontawesome}
\moderncvtheme[blue]{classic}                
\usepackage[english]{babel}
\moderncvicons{awesome}

\firstname{XXXX}
\familyname{XXXX}

\mobile{+XXX (0)XXXXXX}                    
\email{[email protected]}                
\social[linkedin]{www.linkedin.com/in/XXXXX}
\social[github]{Rapster}

\begin{document}
\makecvtitle
\section{Objective}
This a pair of glass: \faGlass
\end{document}

It does not display icons, or you can test with "template.tex" provided in moderncv :/ I'm runnning under Miktex 2.9 and Windows 7 (64 bits)

gitlab didn't work

Thanks for your work, but I get some troubles.
Anything is OK, but gitlab,

preview:

screen shot 2018-06-13 at 20 50 17

code:

\faGithub \faGitlab something else

Fontawesome 5.0 with new icons and new features

Would be awesome if one could use fontawesome 5.0 's new icons and most interesting features:-)

What's new and interesting on this for usage in Latex documents:

  1. of course: more icons, see https://fontawesome.com/icons?d=gallery
  2. optimized shape of each icon
  3. SVG of Icons as alternative to font icons (maybe interesting on technical side of implementation)
  4. "Power Transforms" https://fontawesome.com/how-to-use/svg-with-js#power-transforms
    • Scaling
    • Positioning
    • Rotating
    • Flipping
  5. Masking (Background show through) https://fontawesome.com/how-to-use/svg-with-js#masking
  6. Layering of several icons, text or counter (= highly optimized "stacking" (v4)) https://fontawesome.com/how-to-use/svg-with-js#layering
  7. there is a pro version which bring some even more interesting things:
    • 3 different versions of each icon which would help to match appearance of document / used fonts
      • solid
      • regular
      • light
    • more icons

Linkedin command changed

I recently upgrade my Tex distribution from 2013 to 2015. Now many of my documents won't compile, because the \faLinkedinSign command has been renamed as \faLinkedinSquare.

Now I need to go through all my documents to rename them, which is a hassle.

Please add \faLinkedinSign again, and just define it as equal to \faLinkedinSquare.

In future, please don't rename the user facing commands.

List of supported icons

I'm using the fontawesome package and I managed to get some icons, e.g. \faApple. However, I can't get \faComputerMouse and others. Is there a list of supported icons and the matching TeX command?

how to create the mapping?

I can't figure out where the keys in the pdftex mapping are coming from:
e.g.:

"_620" : "percent", #f295

The percent symbol/icon is unicode point f295, but what has _620 to do with that?

fontawesome and sharelatex

I suppose we do not need to add the package in ShareLateX project. We can just import the package.

  1. \usepackage{fontawesome}
  2. using LuaLateX compiler.

The problem

  1. \faTwitter or \faicon{Twitter} works fine, but \faUniversity \faicon{university} does not.

Is there any chance that I am hitting an older version of the package?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.