;;; svg-lib.el --- SVG tags, progress bars & icons -*- lexical-binding: t -*-
;; Copyright (C) 2021 Free Software Foundation, Inc.
;; Maintainer: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
;; URL: https://github.com/rougier/svg-lib
;; Version: 0.2.5
;; Package-Requires: ((emacs "27.1"))
;; Keywords: svg, icons, tags, convenience
;; This file is not part of GNU Emacs.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; For a full copy of the GNU General Public License
;; see <https://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; Usage example:
;;
;; (insert-image (svg-lib-tag "TODO"))
;; (insert-image (svg-lib-progress-bar 0.33))
;; (insert-image (svg-lib-icon "star"))
;;
;; Icons ares created by parsing remote collections whose license are
;; compatibles with GNU Emacs:
;;
;; - Boxicons (https://github.com/atisawd/boxicons), available under a
;; Creative Commons 4.0 license. As of version 2.07 (December 2020),
;; this collection offers 1500 icons in two styles (regular & solid).
;; Gallery is available at https://boxicons.com/
;;
;; - Octicons (https://github.com/primer/octicons), available under a
;; MIT License with some usage restriction for the GitHub logo. As of
;; version 11.2.0 (December 2020), this collection offers 201 icons.
;; Gallery available at https://primer.style/octicons/
;;
;; - Material (https://github.com/google/material-design-icons),
;; available under an Apache 2.0 license. As of version 4.0.0
;; (December 2020), this collection offers 500+ icons in 4 styles
;; (filled, outlined, rounded, sharp). Gallery available at
;; https://material.io/resources/icons/?style=baseline
;;
;; - Bootstrap (https://github.com/twbs/icons), available under a MIT
;; license. As of version 1.2.1 (December 2020), this collection
;; offers 1200+ icons in 2 styles (regular & filled). Gallery
;; available at https://icons.getbootstrap.com/
;;
;; The default size of an icon is exactly 2x1 characters such that it
;; can be inserted inside a text without disturbing alignment.
;;
;; Note: Each icon is cached locally to speed-up loading the next time
;; you use it. If for some reason the cache is corrupted you can
;; force reload using the svg-icon-get-data function.
;;
;; If you want to add new collections (i.e. URL), make sure the icons
;; are monochrome and that their size is consistent.
;;; NEWS:
;; Version 0.2.5
;; - Bug fix in text size computation
;; Version 0.2.4
;; - Better error handling if SVG support is missing
;; Version 0.2.2
;; - Added a left/righ crop style argument to allow for tags collage.
;; Version 0.2.1
;; - Added an alignment parameter for moving tags inside margins.
;; Version 0.2
;; - Fix most of the warnings.
;; Version 0.1:
;; - Submission to ELPA
;;; Code:
;; Check if Emacs has been compiled with svg support
;; Default icon collections
;; ---------------------------------------------------------------------
;; Default style for all objects
;; Convert Emacs color to SVG color
;; SVG Library style build from partial specification
;; Create an image displaying LABEL in a rounded box.
;; Create a progress pie
;; Create a progress bar
;; Create a rounded box icon
;; Create an image displaying LABEL in a rounded box.
;;; svg-lib.el ends here