Loading...
 
Skip to main content
(Cached)

Icons SVG or Fonts

Resources

Some SVG libraries

Discussion

There are hundreds of icons in Tiki. Right now, jpeg/png/gif. The opportunity is to move them progressively to a vector format. This permits scaling, styling, saving bandwidth, etc.
There are 2 options: SVG vs fonts
It would be a shame to maintain both if there is one that could address the needs. It would be a shame to invest migration time in one of the solutions only to do the work in double later if a change is decided.

Feeling is that Tiki should pick the best future-thinking solution between SVG & fonts:

Futureproof - SVG or FONT

svg -> No Unnecessary HTTP Requests


I just started to look into the possibility to use .SVG instead of FONT and so far I did find a bunch of discussion WHY to use SVG or not to use SVG instead of FONT when it goes to vector-icons.
I have mainly heard about possible issues in respect of browser compatibility towards SVG, but I did NOT find ANY VG icon sets for possible integration (with a very limited! time on research).
At the bottom of the wiki page I added the licenses for the icon FONTs mentioned on the wiki page.
http://www.webhostinghub.com/glyphs shows an example how to possibly achieve switchable "icon-sets", as they use the Bootstrap Glyphicon-Halfling names for their icons.
Finally the PNG fallback seems to be already sorted in Tiki for FONT thanks to our Bootstrap activists.
For a convenient way of a PNG fallback for SVG I did not find further helpful information.

=> Conclusion=> In my mind, if no serious arguments will be brought up, the actual path to FONT seems the best to do.
In the end, when reviewing the licenses, I see only Fontawesome and Glyphicon-Halflings so far (both already implemented) and optionally Monosocialiconsfont as "add-on".

Maybe somebody digs out additional resources and projects?

Semantic Icon Names

Use semantic names for icon names
Maybe based on names from here (removing "fa-" from the beginning): http://fontawesome.io/cheatsheet

Overwriting Icons

Make it possible for themes to override icons
Questions looking for an answer:

  • how can you easily change icon if you don't like what is shipped by Tiki? Can it be maintained simply by adding the image path to your preferred icon in the custom css file?
  • Would it be possible, if that made any sense, to use something like "icon sets" to replace icons for a Tiki site globally? How much effort that would be?
    Example: http://www.webhostinghub.com/glyphs/bootstrap/ same name - different glyphs (license see below)

Source - Guideline - License

Pick some preferred icon source(s) so community has guidelines for consistency and make sure licensing is OK

Fallback

Have a Smarty function (or something) so vectorial is chosen if supported by the browser, and use png as a fallback

  • The icon sources will surely have a png fallback available
  • If no fallback is available give an error message "Please use a modern browser"
  • some glyphicons come with bootstrap (http://getbootstrap.com/components/), but the variety is not enough, we need more icons
  • font-awesome seems to be a good addition both from variety and licensing point
  • both glyphicons and font-awesome icons are managed now with smarty functions (lib/smarty_tiki/), so in the tpl files you only need to add the name of the icon, e.g.:

Copy to clipboard
{glyph name="plus"} or {fa name="automobile"}

Licenses

Also see https://dev.tiki.org/Icons

alias

Page last modified on Thursday 21 of November, 2024 06:03:24 GMT-0000