glyph-names 0.2.0

Mapping of characters to glyph names according to the Adobe Glyph List Specification
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented1 out of 2 items with examples
  • Size
  • Source code size: 185.82 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.34 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • yeslogic/glyph-names
    16 7 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • wezm github:yeslogic:developers-prince

glyph-names

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.