https://github.com/sedwards2009/nodegui-plugin-font-icon
Use icon fonts with QIcon and NodeGui
https://github.com/sedwards2009/nodegui-plugin-font-icon
nodegui plugin
Last synced: 20 days ago
JSON representation
Use icon fonts with QIcon and NodeGui
- Host: GitHub
- URL: https://github.com/sedwards2009/nodegui-plugin-font-icon
- Owner: sedwards2009
- License: mit
- Created: 2021-07-28T08:50:43.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-02-07T18:54:14.000Z (20 days ago)
- Last Synced: 2026-02-07T18:59:52.828Z (20 days ago)
- Topics: nodegui, plugin
- Language: TypeScript
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nodegui-plugin-font-icon
Use icon fonts inside QIcon with [NodeGui](https://github.com/nodegui/nodegui).
TypeScript example:
```typescript
//...
import { createFontIcon } from 'nodegui-plugin-font-icon';
//...
// Load in our custom icon font
const extraicons = path.join(__dirname, "../resources/extraicons.ttf");
QFontDatabase.addApplicationFont(extraicons);
//...
const button = new QPushButton();
const icon = createFontIcon(font, "\uEA09"); // Pocketknife icon
button.setIcon(icon);
button.setText('Font Icon');
//...
```
Install via NPM:
```
npm install nodegui-plugin-font-icon
```
For the API see [src/index.ts](src/index.ts)
For a complete demo see [src/demo.ts](src/demo.ts)
# Maintainer
Simon Edwards
# License
MIT
# Release Process (for maintainers)
* Make sure the version in `package.json` is correct.
* Tag the version with git (format: v1.2.3).
* Push the tag to origin.
* Wait for GitHub Action to build and release to NPM.