mynameiscosmo / fontawesome-latex Goto Github PK
View Code? Open in Web Editor NEWPython utility to download and create FontAwesome LaTeX mappings
Python utility to download and create FontAwesome LaTeX mappings
Lualatex support hasn't been tested.
It may need additional templates to be created.
Reference:
Sharelatex support hasn't been tested.
It may need additional templates to be created.
Reference:
command | expansion |
---|---|
\fa | \faicon |
\fas | \textbf{\faicon} |
\fal | \textit{\faicon} |
\faThumbsUp % generates a regular Thumbs Up
\fasThumbsUp % generates a solid Thumbs Up
\falThumbsUp % generates a light Thumbs Up (pro)
To further automate this, releases should be automated using Travis CI.
Fonts should be automatically detected in fontawesome-free-5.x.xx/use-on-desktop
Currently, the following is used to declare packages to build:
packages = {
'regular': {
'name': 'fontawesomefree', # The name of the latex .sty file
'desc': 'Font Awesome 5 Free Regular', # Description of the font variant
'font': 'FontAwesome 5 Free Regular', # The font name as registered when installed
'short': 'far', # the short for FontAwesome icons, i.e. \faicon
'cmd': 'faicon', # The command for FontAwesome icons, i.e. \faicon
'file': 'fontawesomefree.sty' # The file name generated
},
... do this for Solid and Brand variants
}
Should implement pytests for the heck of it.
The current mapping is only good for Font Awesome 5 Free
The quirks that go with this is that Font Awesome 5 Pro adds a lot of icons not in Font Awesome 5 Free.
Either a diff can be generated of the icon sets (and built into the release with \ifdef) or separate .stys could be provides for pro and free mappings.
import pathlib
pathlib.Path('output_dir', 'filename').mkdir(parents=True, exist_ok=True)
PDFLatex support hasn't been tested.
It may need additional templates to be created.
Reference:
The 500px icon is currently omitted due to TeX macros cannot contain numbers.
Reference:
The \ifthen
condition should be applied to the pro icons.yml
in the release.
Currently, the release is only for Font Awesome 5 Free.
Something like:
% freeiconhere
\iffontawesome@pro
% proiconhere
\fi
% freeiconhere
This is also pending some licensing inquiries about the metadata included in the Font Awesome 5 Pro package.
All mappings could be put into one file
The FontAwesome font can be set to use solid and light fonts when the font weight is set to bold or italic respectively, like so: \textbf\faThumbsUp
\textit\faThumbsUp
The mappings could follow Font Awesome's Icon Prefixes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.