This plugin only works on tauri v2, if you need the v1 plugin, feel free to submit a PR!
Support getting all fonts installed on your system.
| Platform | Supported |
|---|---|
| Windows | ✅ |
| macOS | ✅ |
| Linux | ✅ |
| Android | ❌ |
| iOS | ❌ |
cargo add tauri-plugin-system-fontsYou can install the JavaScript Guest bindings using your preferred JavaScript package manager:
pnpm add tauri-plugin-system-fonts-apisrc-tauri/src/lib.rs
pub fn run() {
tauri::Builder::default()
+ .plugin(tauri_plugin_system_fonts::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}src-tauri/capabilities/default.json
{
...
"permissions": [
...
+ "system-fonts:default"
]
}Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
import { getSystemFonts } from "tauri-plugin-system-fonts-api";
const fonts = await getSystemFonts();| Method | Description |
|---|---|
getSystemFonts |
Get all fonts installed on the system. |
git clone https://github.com/ayangweb/tauri-plugin-system-fonts.gitpnpm install
pnpm build
cd examples/tauri-app
pnpm install
pnpm tauri dev- Use fontdb to get all fonts installed on your system.
- EcoPaste - Open source cross-platform clipboard management tool.
