-
Notifications
You must be signed in to change notification settings - Fork 1.1k
use-tabler-icons:0.22.0 #4774
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
use-tabler-icons:0.22.0 #4774
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,61 @@ | ||
| > **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"> | ||
| </h2> | ||
|
Check warning on line 7 in packages/preview/use-tabler-icons/0.22.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.22.0": * | ||
| ``` | ||
|
|
||
| #### Manually Install | ||
| Just copy all files under [`src`](https://github.com/zyf722/typst-tabler-icons/tree/main/src) to your project and rename them to avoid naming conflicts. | ||
|
Check warning on line 27 in packages/preview/use-tabler-icons/0.22.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/tree/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.22.0/README.md
|
||
|
|
||
| ## Contributing | ||
| [Pull Requests](https://github.com/zyf722/typst-tabler-icons/pulls) are welcome! | ||
|
|
||
| It is strongly recommended to follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification when writing commit messages and creating pull requests. | ||
|
|
||
| ### Github Actions Workflow | ||
| This package uses a daily run [Github Actions workflow](https://github.com/zyf722/typst-tabler-icons/tree/main/.github/workflows/build.yml) to keep the library up-to-date with the latest version of Tabler Icons, which internally runs [`scripts/generate.mjs`](https://github.com/zyf722/typst-tabler-icons/tree/main/scripts/generate.mjs) to generate Typst source code of the library and gallery. | ||
|
Check warning on line 58 in packages/preview/use-tabler-icons/0.22.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. You don't have to do this, but I'd consider putting this section inside a deciated |
||
|
|
||
| ## License | ||
| [MIT](https://github.com/zyf722/typst-tabler-icons/tree/main/LICENSE) | ||
|
Check warning on line 61 in packages/preview/use-tabler-icons/0.22.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. This could just link to the local file |
||
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.
Could you use a perma link or a link to a specific branch for all linked resources? This will ensure they will always match this version of the package.