husseinalhammad / fontawesomesvg-php Goto Github PK
View Code? Open in Web Editor NEWAdd inline SVG Font Awesome icons in PHP
License: MIT License
Add inline SVG Font Awesome icons in PHP
License: MIT License
The get_svg()
method tasks 2 arguments: a string representing the FA classes and an array of options. This is great and could work for many people. However, I wonder if it is worth adding another method to parse <i></i>
tags:
$FA->render('<i class="fa-solid fa-user"></i>');
$FA->render('<i class="fa-duotone fa-camera fa-swap-opacity"></i>');
Or perhaps the same get_svg()
function could accept <i></i>
tags too?
$FA->get_svg('<i class="fa-solid fa-user"></i>');
$FA->get_svg('<i class="fa-duotone fa-camera fa-swap-opacity"></i>');
The motivation for this would be:
At the moment, this supports the old style class names (e.g. fas
, far
, fab
). These are still supported by Font Awesome's libraries too. However, the new style class names (e.g. fa-solid
, fa-regular
, fa-brands
) is the new default and is used throughout their documentation so it makes sense to support these too.
It's been a while since I used this myself. I would like to check its compatibility with Font Awesome 6 when I have the time.
I am also interested to know which FA features cannot be used with FontAwesomeSVG-PHP
right now.
This is a nice project, but it's currently unlicensed.
It would be nice if you could set a license for it so we know if it's something we can use or not.
Are there any plans to add duotone support?
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.