#tauri-plugin #size #font #android #tauri #plugin

sys tauri-plugin-android-fix-font-size

Fix font size on Tauri app for Android

3 stable releases

new 1.0.2 Mar 6, 2025
1.0.0 Feb 26, 2025

#24 in #tauri

Download history 113/week @ 2025-02-22 234/week @ 2025-03-01

347 downloads per month

MIT/Apache

39KB
106 lines

Overview

On Android, the system font size settings can cause the text size set in the frontend to become unintended. Even if you specify 14px, the actual size may become 20px or 10px, and this cannot be avoided on the frontend.

This plugin prevents that and ensures that the correct font size is always used.

Setup

All you need to do is register this plugin with your Tauri project:

src-tauri/src/lib.rs

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .plugin(tauri_plugin_android_fix_font_size::init()) // This
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

License

MIT OR Apache-2.0

Dependencies

~17–54MB
~880K SLoC