#glyph #font #name #character

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

#1646 in Text processing

Download history 900/week @ 2024-09-02 729/week @ 2024-09-09 385/week @ 2024-09-16 620/week @ 2024-09-23 600/week @ 2024-09-30 621/week @ 2024-10-07 705/week @ 2024-10-14 553/week @ 2024-10-21 1128/week @ 2024-10-28 915/week @ 2024-11-04 828/week @ 2024-11-11 882/week @ 2024-11-18 1137/week @ 2024-11-25 729/week @ 2024-12-02 851/week @ 2024-12-09 612/week @ 2024-12-16

3,367 downloads per month
Used in 9 crates (3 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