egui_zhcn_fonts

Crates.ioegui_zhcn_fonts
lib.rsegui_zhcn_fonts
version0.1.1
created_at2025-02-24 06:42:55.082461+00
updated_at2025-02-24 06:48:29.4275+00
descriptionload system zhcn fonts automatically for egui
homepagehttps://github.com/AllenDang/egui_zhcn_fonts
repositoryhttps://github.com/AllenDang/egui_zhcn_fonts
max_upload_size
id1567051
size24,390
Allen Dang (AllenDang)

documentation

README

egui_zhcn_fonts

Loads simplified chinese fonts to egui, currently works for windows/macos/linux.

Installation

Add to your Cargo.toml:

[dependencies]
egui_zhcn_fonts = "0.1"

Usage

Basic usage:

struct App {
  data:String
}

impl App {
  pub fn new(cc: &eframe::CreationContext<'_>) -> Self {
    // Add this to your app's initialize
    egui_zhcn_fonts::add_sys_ui_fonts(&cc.egui_ctx);

    Self {
      data: "你好啊"
    }
  }
}

Compatibility egui versions

egui_zhcn_fonts Egui
0.1 0.31

Supported Platforms

macOS

  • Loads "PingFang" and "Songti"

Windows

  • Loads "MSYH"

linux

  • Loads "wqy-microhei" and "SourceHanSansCN"

Contributing

Contributions are welcome! Please open an issue or PR for:

  • Platform-specific enhancements

License

MIT/Apache

Commit count: 8

cargo fmt