#font-glyph #glyph #name

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

#1081 in Text processing

Download history 808/week @ 2024-11-30 855/week @ 2024-12-07 689/week @ 2024-12-14 332/week @ 2024-12-21 271/week @ 2024-12-28 696/week @ 2025-01-04 1643/week @ 2025-01-11 1459/week @ 2025-01-18 625/week @ 2025-01-25 1050/week @ 2025-02-01 963/week @ 2025-02-08 650/week @ 2025-02-15 1088/week @ 2025-02-22 947/week @ 2025-03-01 1176/week @ 2025-03-08 916/week @ 2025-03-15

4,238 downloads per month
Used in 14 crates (4 directly)

BSD-3-Clause

70KB
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