#glyph #name #font

glyph-names

Mapping of characters to glyph names according to the Adobe Glyph List Specification

2 unstable releases

0.2.0 Feb 8, 2023
0.1.0 Mar 5, 2020

#161 in Text processing

Download history 138/week @ 2022-12-03 141/week @ 2022-12-10 150/week @ 2022-12-17 73/week @ 2022-12-24 117/week @ 2022-12-31 126/week @ 2023-01-07 75/week @ 2023-01-14 105/week @ 2023-01-21 107/week @ 2023-01-28 137/week @ 2023-02-04 118/week @ 2023-02-11 261/week @ 2023-02-18 473/week @ 2023-02-25 264/week @ 2023-03-04 100/week @ 2023-03-11 125/week @ 2023-03-18

1,007 downloads per month
Used in 9 crates (3 directly)

BSD-3-Clause

68KB
1K SLoC

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.

No runtime deps