Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rougier/emacs-svg-icon
An emacs library to create SVG icons on the fly
https://github.com/rougier/emacs-svg-icon
emacs icons svg
Last synced: 3 months ago
JSON representation
An emacs library to create SVG icons on the fly
- Host: GitHub
- URL: https://github.com/rougier/emacs-svg-icon
- Owner: rougier
- License: gpl-3.0
- Created: 2020-12-23T18:44:20.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-22T07:45:57.000Z (about 2 years ago)
- Last Synced: 2024-05-02T01:12:38.731Z (6 months ago)
- Topics: emacs, icons, svg
- Language: Emacs Lisp
- Homepage:
- Size: 1.53 MB
- Stars: 91
- Watchers: 3
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
### Introduction
This library allows you to create SVG icons by parsing remote collections,
whose license are compatible with GNU Emacs. The default size of an
icon is exactly 2x1 characters, such that it can be inserted into
text, without disturbing alignment. Note that 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.### Usage
```lisp
;; Direct insertion
(insert-image (svg-icon "material" "attachment"))
(insert-image (svg-icon "bootstrap" "alarm"))
(insert-image (svg-icon "octicons" "alert"))
(insert-image (svg-icon "boxicons" "dizzy"));; Defining a "string icon"
(setq material-attach (propertize "--"
'display (svg-icon "material" "attachment")))(insert (format "[%s]" material-attach))
```**Output**
![](screenshot.png)
### Available collections:
If you want to add a new collections (i.e. URL), make sure the icons are
monochrome and that their sizes are consistent.The built-in collections are:
- [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).
[Browse gallery](https://boxicons.com)
![](boxicons.png)
- [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.
[Browse gallery](https://primer.style/octicons)
![](octicons.png)- [Material](https://github.com/Templarian/MaterialDesign),
available under an Apache 2.0 license. As of version 4.0.0
(December 2020), this collection offers 5000+ icons in 4 styles
(filled, outlined, rounded, sharp).
[Browse gallery](https://materialdesignicons.com)![](material.png)
- [Bootstrap](https://github.com/twbs/icons), available under an MIT
license. As of version 1.2.1 (December 2020), this collection
offers 1200+ icons in 2 styles (regular & filled).
[Browse gallery](https://icons.getbootstrap.com)![](bootstrap.png)