-
Notifications
You must be signed in to change notification settings - Fork 1.1k
use-tabler-icons:0.23.0 #4824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
use-tabler-icons:0.23.0 #4824
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2024-2025 zyf722 | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| > **Note** | ||
| > | ||
| > This project is greatly inspired by and mainly edited based on [typst-fontawesome](https://github.com/duskmoon314/typst-fontawesome). | ||
|
|
||
| <h2 align="center"> | ||
| <img alt="use-tabler-icons" src="assets/banner.svg" title="use-tabler-icons banner"> | ||
| </h2> | ||
|
Check warning on line 7 in packages/preview/use-tabler-icons/0.23.0/README.md
|
||
|
|
||
| A Typst library for [Tabler Icons](https://github.com/tabler/tabler-icons), a set of over 5800 free MIT-licensed high-quality SVG icons. | ||
|
|
||
| ## Usage | ||
| ### Install Font | ||
| Install [the webfont for Tabler Icons](https://docs.tabler.io/icons/libraries/webfont) before using this library. Or, if you are using Typst web app, simply upload the font file to your project. | ||
|
|
||
| > **Note** | ||
| > | ||
| > Since Tabler Icons v3.36.0, filled icons have been separated into a different font file. If you want to use filled icons, make sure to install both the regular ` tabler-icons.ttf` and filled `tabler-icons-filled.ttf` font files. | ||
|
|
||
| ### Import the Library | ||
| #### Using the Typst Packages | ||
| You can install the library using the typst packages: | ||
| ```typst | ||
| #import "@preview/use-tabler-icons:0.23.0": * | ||
| ``` | ||
|
|
||
| #### Manually Install | ||
| Just copy all files under [`src`](https://github.com/zyf722/typst-tabler-icons/blob/main/src) to your project and rename them to avoid naming conflicts. | ||
|
Check warning on line 27 in packages/preview/use-tabler-icons/0.23.0/README.md
|
||
|
|
||
| Then, import `lib.typ` to use the library: | ||
| ```typst | ||
| #import "lib.typ": * | ||
| ``` | ||
|
|
||
| ### Use the Icons | ||
| You can use the `tabler-icon` function to create an icon with its name: | ||
| ```typst | ||
| #tabler-icon("calendar") | ||
| ``` | ||
|
|
||
| Or you can directly use the `ti-` prefix : | ||
| ```typst | ||
| #ti-calendar() | ||
| ``` | ||
|
|
||
| As these icons are actually text with custom font, you can pass any text attributes to the function: | ||
| ```typst | ||
| #tabler-icon("calendar", fill: blue) | ||
| ``` | ||
|
|
||
| Refer to [`gallery.pdf`](https://github.com/zyf722/typst-tabler-icons/blob/main/gallery/gallery.pdf) and [Tabler Icons website](https://tabler.io/icons) for all available icons. | ||
|
Check warning on line 50 in packages/preview/use-tabler-icons/0.23.0/README.md
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
|
|
||
| ## License | ||
| [MIT](LICENSE) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in the previous review, links to the original repository should either be perma-links or links to a specific branch/tag. Otherwise this will always point to the newest version, or even become an invalid link, when the structure of your repository changes.