tauri-plugin-android-fix-font-size

Crates.iotauri-plugin-android-fix-font-size
lib.rstauri-plugin-android-fix-font-size
version1.0.2
created_at2025-02-26 13:45:14.787015+00
updated_at2025-03-06 13:55:02.118489+00
descriptionFix font size on Tauri app for Android.
homepage
repositoryhttps://github.com/aiueo13/tauri-plugin-android-fix-font-size
max_upload_size
id1570468
size146,474
(aiueo13)

documentation

README

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

Commit count: 5

cargo fmt