#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

#1191 in Text processing

Download history 246/week @ 2024-01-02 355/week @ 2024-01-09 313/week @ 2024-01-16 344/week @ 2024-01-23 262/week @ 2024-01-30 222/week @ 2024-02-06 554/week @ 2024-02-13 457/week @ 2024-02-20 627/week @ 2024-02-27 482/week @ 2024-03-05 469/week @ 2024-03-12 513/week @ 2024-03-19 528/week @ 2024-03-26 494/week @ 2024-04-02 490/week @ 2024-04-09 553/week @ 2024-04-16

2,141 downloads per month
Used in 11 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