-
-
Save sway/3101743 to your computer and use it in GitHub Desktop.
% FontAwesome (http://fortawesome.github.com/Font-Awesome/) bindings for (Xe)LaTeX | |
% Author: Honza Ustohal <honza@egoistic.biz> | |
% | |
% Translation of FontAwesome's private range characters into XeTeX symbols. All icons are camel-cased and prefixed with 'fa', i.e. what was .icon-align-center the CSS version of FontAwesome becomes \faAlignCenter | |
% This might be reworked into a full blown package in the near future | |
% | |
% Prerequisite: | |
% XeLaTeX, FontAwesome installed as a system font accessible by XeLaTeX | |
% | |
% Usage: | |
% 1. Save this into your project folder as fontawesome.sty | |
% 2. Put \usepackage{fontawesome} into the preamble | |
% 3. Define command for FontAwesome: \newfontfamily{\FA}{FontAwesome Regular} | |
% 4. Redefine required characters (optional): \def\twitter{{\FA \faTwitter}} | |
% 5. Use: \href{http://twitter.com/swaycz}{\twitter\ swaycz} | |
\def\faGlass{\symbol{"F000}} | |
\def\faMusic{\symbol{"F001}} | |
\def\faSearch{\symbol{"F002}} | |
\def\faEnvelope{\symbol{"F003}} | |
\def\faHeart{\symbol{"F004}} | |
\def\faStar{\symbol{"F005}} | |
\def\faStarEmpty{\symbol{"F006}} | |
\def\faUser{\symbol{"F007}} | |
\def\faFilm{\symbol{"F008}} | |
\def\faThLarge{\symbol{"F009}} | |
\def\faTh{\symbol{"F00A}} | |
\def\faThList{\symbol{"F00B}} | |
\def\faOk{\symbol{"F00C}} | |
\def\faRemove{\symbol{"F00D}} | |
\def\faZoomIn{\symbol{"F00E}} | |
\def\faZoomOut{\symbol{"F010}} | |
\def\faOff{\symbol{"F011}} | |
\def\faSignal{\symbol{"F012}} | |
\def\faCog{\symbol{"F013}} | |
\def\faTrash{\symbol{"F014}} | |
\def\faHome{\symbol{"F015}} | |
\def\faFile{\symbol{"F016}} | |
\def\faTime{\symbol{"F017}} | |
\def\faRoad{\symbol{"F018}} | |
\def\faDownloadAlt{\symbol{"F019}} | |
\def\faDownload{\symbol{"F01A}} | |
\def\faUpload{\symbol{"F01B}} | |
\def\faInbox{\symbol{"F01C}} | |
\def\faPlayCircle{\symbol{"F01D}} | |
\def\faRepeat{\symbol{"F01E}} | |
\def\faRefresh{\symbol{"F021}} | |
\def\faListAlt{\symbol{"F022}} | |
\def\faLock{\symbol{"F023}} | |
\def\faFlag{\symbol{"F024}} | |
\def\faHeadphones{\symbol{"F025}} | |
\def\faVolumeOff{\symbol{"F026}} | |
\def\faVolumeDown{\symbol{"F027}} | |
\def\faVolumeUp{\symbol{"F028}} | |
\def\faQrcode{\symbol{"F029}} | |
\def\faBarcode{\symbol{"F02A}} | |
\def\faTag{\symbol{"F02B}} | |
\def\faTags{\symbol{"F02C}} | |
\def\faBook{\symbol{"F02D}} | |
\def\faBookmark{\symbol{"F02E}} | |
\def\faPrint{\symbol{"F02F}} | |
\def\faCamera{\symbol{"F030}} | |
\def\faFont{\symbol{"F031}} | |
\def\faBold{\symbol{"F032}} | |
\def\faItalic{\symbol{"F033}} | |
\def\faTextHeight{\symbol{"F034}} | |
\def\faTextWidth{\symbol{"F035}} | |
\def\faAlignLeft{\symbol{"F036}} | |
\def\faAlignCenter{\symbol{"F037}} | |
\def\faAlignRight{\symbol{"F038}} | |
\def\faAlignJustify{\symbol{"F039}} | |
\def\faList{\symbol{"F03A}} | |
\def\faIndentLeft{\symbol{"F03B}} | |
\def\faIndentRight{\symbol{"F03C}} | |
\def\faFacetimeVideo{\symbol{"F03D}} | |
\def\faPicture{\symbol{"F03E}} | |
\def\faPencil{\symbol{"F040}} | |
\def\faMapMarker{\symbol{"F041}} | |
\def\faAdjust{\symbol{"F042}} | |
\def\faTint{\symbol{"F043}} | |
\def\faEdit{\symbol{"F044}} | |
\def\faShare{\symbol{"F045}} | |
\def\faCheck{\symbol{"F046}} | |
\def\faMove{\symbol{"F047}} | |
\def\faStepBackward{\symbol{"F048}} | |
\def\faFastBackward{\symbol{"F049}} | |
\def\faBackward{\symbol{"F04A}} | |
\def\faPlay{\symbol{"F04B}} | |
\def\faPause{\symbol{"F04C}} | |
\def\faStop{\symbol{"F04D}} | |
\def\faForward{\symbol{"F04E}} | |
\def\faFastForward{\symbol{"F050}} | |
\def\faStepForward{\symbol{"F051}} | |
\def\faEject{\symbol{"F052}} | |
\def\faChevronLeft{\symbol{"F053}} | |
\def\faChevronRight{\symbol{"F054}} | |
\def\faPlusSign{\symbol{"F055}} | |
\def\faMinusSign{\symbol{"F056}} | |
\def\faRemoveSign{\symbol{"F057}} | |
\def\faOkSign{\symbol{"F058}} | |
\def\faQuestionSign{\symbol{"F059}} | |
\def\faInfoSign{\symbol{"F05A}} | |
\def\faScreenshot{\symbol{"F05B}} | |
\def\faRemoveCircle{\symbol{"F05C}} | |
\def\faOkCircle{\symbol{"F05D}} | |
\def\faBanCircle{\symbol{"F05E}} | |
\def\faArrowLeft{\symbol{"F060}} | |
\def\faArrowRight{\symbol{"F061}} | |
\def\faArrowUp{\symbol{"F062}} | |
\def\faArrowDown{\symbol{"F063}} | |
\def\faShareAlt{\symbol{"F064}} | |
\def\faResizeFull{\symbol{"F065}} | |
\def\faResizeSmall{\symbol{"F066}} | |
\def\faPlus{\symbol{"F067}} | |
\def\faMinus{\symbol{"F068}} | |
\def\faAsterisk{\symbol{"F069}} | |
\def\faExclamationSign{\symbol{"F06A}} | |
\def\faGift{\symbol{"F06B}} | |
\def\faLeaf{\symbol{"F06C}} | |
\def\faFire{\symbol{"F06D}} | |
\def\faEyeOpen{\symbol{"F06E}} | |
\def\faEyeClose{\symbol{"F070}} | |
\def\faWarningSign{\symbol{"F071}} | |
\def\faPlane{\symbol{"F072}} | |
\def\faCalendar{\symbol{"F073}} | |
\def\faRandom{\symbol{"F074}} | |
\def\faComment{\symbol{"F075}} | |
\def\faMagnet{\symbol{"F076}} | |
\def\faChevronUp{\symbol{"F077}} | |
\def\faChevronDown{\symbol{"F078}} | |
\def\faRetweet{\symbol{"F079}} | |
\def\faShoppingCart{\symbol{"F07A}} | |
\def\faFolderClose{\symbol{"F07B}} | |
\def\faFolderOpen{\symbol{"F07C}} | |
\def\faResizeVertical{\symbol{"F07D}} | |
\def\faResizeHorizontal{\symbol{"F07E}} | |
\def\faBarChart{\symbol{"F080}} | |
\def\faTwitterSign{\symbol{"F081}} | |
\def\faFacebookSign{\symbol{"F082}} | |
\def\faCameraRetro{\symbol{"F083}} | |
\def\faKey{\symbol{"F084}} | |
\def\faCogs{\symbol{"F085}} | |
\def\faComments{\symbol{"F086}} | |
\def\faThumbsUp{\symbol{"F087}} | |
\def\faThumbsDown{\symbol{"F088}} | |
\def\faStarHalf{\symbol{"F089}} | |
\def\faHeartEmpty{\symbol{"F08A}} | |
\def\faSignout{\symbol{"F08B}} | |
\def\faLinkedinSign{\symbol{"F08C}} | |
\def\faPushpin{\symbol{"F08D}} | |
\def\faExternalLink{\symbol{"F08E}} | |
\def\faSignin{\symbol{"F090}} | |
\def\faTrophy{\symbol{"F091}} | |
\def\faGithubSign{\symbol{"F092}} | |
\def\faUploadAlt{\symbol{"F093}} | |
\def\faLemon{\symbol{"F094}} | |
\def\faPhone{\symbol{"F095}} | |
\def\faCheckEmpty{\symbol{"F096}} | |
\def\faBookmarkEmpty{\symbol{"F097}} | |
\def\faPhoneSign{\symbol{"F098}} | |
\def\faTwitter{\symbol{"F099}} | |
\def\faFacebook{\symbol{"F09A}} | |
\def\faGithub{\symbol{"F09B}} | |
\def\faUnlock{\symbol{"F09C}} | |
\def\faCreditCard{\symbol{"F09D}} | |
\def\faRss{\symbol{"F09E}} | |
\def\faHdd{\symbol{"F0A0}} | |
\def\faBullhorn{\symbol{"F0A1}} | |
\def\faBell{\symbol{"F0A2}} | |
\def\faCertificate{\symbol{"F0A3}} | |
\def\faHandRight{\symbol{"F0A4}} | |
\def\faHandLeft{\symbol{"F0A5}} | |
\def\faHandUp{\symbol{"F0A6}} | |
\def\faHandDown{\symbol{"F0A7}} | |
\def\faCircleArrowLeft{\symbol{"F0A8}} | |
\def\faCircleArrowRight{\symbol{"F0A9}} | |
\def\faCircleArrowUp{\symbol{"F0AA}} | |
\def\faCircleArrowDown{\symbol{"F0AB}} | |
\def\faGlobe{\symbol{"F0AC}} | |
\def\faWrench{\symbol{"F0AD}} | |
\def\faTasks{\symbol{"F0AE}} | |
\def\faFilter{\symbol{"F0B0}} | |
\def\faBriefcase{\symbol{"F0B1}} | |
\def\faFullscreen{\symbol{"F0B2}} | |
\def\faGroup{\symbol{"F0C0}} | |
\def\faLink{\symbol{"F0C1}} | |
\def\faCloud{\symbol{"F0C2}} | |
\def\faBeaker{\symbol{"F0C3}} | |
\def\faCut{\symbol{"F0C4}} | |
\def\faCopy{\symbol{"F0C5}} | |
\def\faPaperClip{\symbol{"F0C6}} | |
\def\faSave{\symbol{"F0C7}} | |
\def\faSignBlank{\symbol{"F0C8}} | |
\def\faReorder{\symbol{"F0C9}} | |
\def\faListUl{\symbol{"F0CA}} | |
\def\faListOl{\symbol{"F0CB}} | |
\def\faStrikethrough{\symbol{"F0CC}} | |
\def\faUnderline{\symbol{"F0CD}} | |
\def\faTable{\symbol{"F0CE}} | |
\def\faMagic{\symbol{"F0D0}} | |
\def\faTruck{\symbol{"F0D1}} | |
\def\faPinterest{\symbol{"F0D2}} | |
\def\faPinterestSign{\symbol{"F0D3}} | |
\def\faGooglePlusSign{\symbol{"F0D4}} | |
\def\faGooglePlus{\symbol{"F0D5}} | |
\def\faMoney{\symbol{"F0D6}} | |
\def\faCaretDown{\symbol{"F0D7}} | |
\def\faCaretUp{\symbol{"F0D8}} | |
\def\faCaretLeft{\symbol{"F0D9}} | |
\def\faCaretRight{\symbol{"F0DA}} | |
\def\faColumns{\symbol{"F0DB}} | |
\def\faSort{\symbol{"F0DC}} | |
\def\faSortDown{\symbol{"F0DD}} | |
\def\faSortUp{\symbol{"F0DE}} | |
\def\faEnvelopeAlt{\symbol{"F0E0}} | |
\def\faLinkedin{\symbol{"F0E1}} | |
\def\faUndo{\symbol{"F0E2}} | |
\def\faLegal{\symbol{"F0E3}} | |
\def\faDashboard{\symbol{"F0E4}} | |
\def\faCommentAlt{\symbol{"F0E5}} | |
\def\faCommentsAlt{\symbol{"F0E6}} | |
\def\faBolt{\symbol{"F0E7}} | |
\def\faSitemap{\symbol{"F0E8}} | |
\def\faUmbrella{\symbol{"F0E9}} | |
\def\faPaste{\symbol{"F0EA}} | |
\def\faUserMd{\symbol{"F200}} |
\def\faStackOverflow{\symbol{"F16C}}
\def\faMobile{\symbol{"F10B}}
Other codes are available at http://fortawesome.github.io/Font-Awesome/cheatsheet/
THANKYOU!!! Although I do have to define the symbols for some reason, nonetheless a great fix for using FontAwesome with XeLateX. Installation of FontAwesome was easy on a mac, just drag the fontawesome.otf file into font book
Wow, this is awesome, I did not even notice someone else was using this:) I never realized people would like to collaborate on this so upon request of mc-suchecki I've moved the gist into a separate repo, so feel free to fork and PR away!
Thanks much! I forked and updated this to match FontAwesome v4.5.0 including the aliases at https://gist.github.com/jasonkhanlar/edeeead44c4bd7ca1895
This is super clever. I gave it a little bump for Font Awesome 5 Pro: https://gist.github.com/phyllisstein/b790f853dac935060087f78839043b36.
Thanks so much!
This is awesome, thanks for compiling it. Do you have any ideas about how to make the icons fixed-width in a LaTeX document (ie what you would normally do with the fa-fw class)?