npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

qml-fontawesome-raub

v0.1.0

Published

FontAwesome 6+ icons for QML

Readme

FontAwesome for QML

This is a part of Node3D project.

NPM

npm i -s qml-fontawesome-raub

Example

Provides FontAwesome 6+ icons and helpers for QML. It is possible but not obligatory to use this repo as NPM module.

Features

  • FontAwesome 6.7.2
  • Uses local OTF files (sync load)
  • Parses native icons.json (that comes with fonts)
  • Seamless handling of 3 separate fonts
  • Classic icon names - fa_xxxxx_o
  • Icons alias names supported

Notes

Original icons.json is altered to become the FontAwesome/webfonts/icons.js (by only prefixing const icons = ), because for QML it is easier to work with JS. Then the file is parsed on runtime to build the icon sets. Hence it should be straightforward to upgrade the fonts in future.

The icon names are taken from icons.json and prefixed with "fa_", the dashes are replaced with lo-dashes. E.g. plug-circle-bolt -> fa_plug_circle_bolt.

If the same icon exists in solid and regular styles, the regular one receives the _o suffix, so that there are 2 distinct icon names. E.g. fa_sun and fa_sun_o.

Available QML types

Importing the module automatically instantiates the FontAwesome singleton that loads fonts and provides low-level interface:

FontAwesome.icons: { [name]: string } // icon name -> unicode character
FontAwesome.list: string[] // list of all icon names, same as `Object.keys(FontAwesome.icons)`
FontAwesome.listUnique: string[] // list of unique icon names, excluding aliases
FontAwesome.fonts: { // auxilary font descriptions
	regular: { family: string, weight: number },
	solid: { family: string, weight: number },
	brands: { family: string, weight: number },
}
FontAwesome.getFamily: (name) => string // one of Font Awesome font names
FontAwesome.getWeight: (name) => number // 400 or 900 (`Font.Normal` or `Font.Black`)
FontAwesome.getText: (name) => string // icon unicode, sane as `FontAwesome.icons[name]`

Type IconAwesome wraps the above to display any icon, but it is not obligatory to use. Note that if you use raw Text { ... } instead, you should NOT alternate between 2 icons that are in different font.family. Doing that may cause errors(/crashes) and freezes on Qt font engine side. E.g. Text { font.family: FontAwesome.getFamily(test ? "fa_youtube" : "fa_sun") } - will cause issues because one icon is in "brands" and the other is in "solid".

IconAwesome {
	// var, "fa_<ICON_NAME>"/"fa_<ICON_NAME>_o", supports `"", undefined, null`
	name: ""
	// int, approximate pixel size of icon in pixels (not exactly the font size)
	size: 18
	// color, as in `Text { color }`
	color: "white"
	// color, as in `Text { styleColor }`
	styleColor: "#88000000"
	// int, as in `Text { style }`
	style: Text.Outline
}

Type IconAwesomeHelper is a full-size page displaying every available icon (including aliases). It also has a filter to only display the matching icons.

IconAwesomeHelper {}

Importing

The ./FontAwesome directory should be visible to QML engine for importing.

import FontAwesome

C++ import path

qmlEngine->addImportPath("path to qml-fontawesome-raub");

Node.js qml-raub

View.libs(require('qml-fontawesome-raub').absPath);

Manual

Copy this repo or even specifically the ./FontAwesome folder to wherever your QML is ready to grab it. Or use this repo as a submodule if you wish.

Legal notice

This software uses the FontAwesome 6 Free.

FontAwesome licensing information (a COPY) is given in a separate file, which also can be found in FontAwesome official repo.


The rest of this package is MIT licensed.