#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

#1640 in Text processing

Download history 671/week @ 2024-10-24 1192/week @ 2024-10-31 775/week @ 2024-11-07 984/week @ 2024-11-14 893/week @ 2024-11-21 876/week @ 2024-11-28 894/week @ 2024-12-05 784/week @ 2024-12-12 457/week @ 2024-12-19 228/week @ 2024-12-26 490/week @ 2025-01-02 1042/week @ 2025-01-09 1932/week @ 2025-01-16 840/week @ 2025-01-23 1004/week @ 2025-01-30 845/week @ 2025-02-06

4,923 downloads per month
Used in 8 crates (2 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