glyph-names

Crates.ioglyph-names
lib.rsglyph-names
version0.2.0
sourcesrc
created_at2020-03-05 05:43:09.854222
updated_at2023-02-08 00:27:35.511009
descriptionMapping of characters to glyph names according to the Adobe Glyph List Specification
homepagehttps://github.com/yeslogic/glyph-names
repositoryhttps://github.com/yeslogic/glyph-names
max_upload_size
id215609
size186,150
Developers (prince) (github:yeslogic:developers-prince)

documentation

https://docs.rs/crate/glyph-names

README

glyph-names

Build Status Documentation Version License

Mapping of characters to glyph names according to the Adobe Glyph List Specification. This crate is no-std compatible.

Usage

use std::borrow::Cow;
use glyph_names::glyph_name;

fn main() {
    assert_eq!(glyph_name('a' as u32), Some(Cow::from("a")));
    assert_eq!(glyph_name('%' as u32), Some(Cow::from("percent")));
    assert_eq!(glyph_name('☺' as u32), Some(Cow::from("smileface")));
    assert_eq!(glyph_name('↣' as u32), Some(Cow::from("uni21A3")));
    assert_eq!(glyph_name('🕴' as u32), Some(Cow::from("u1F574")));
    assert_eq!(glyph_name(0x110000), None);
}

Notes

Regenerating aglfn.rs

  1. Ensure you have the agl-aglfn submodule checked out (git submodule update --init).
  2. Run make.
Commit count: 19

cargo fmt