#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

#1662 in Text processing

Download history 1126/week @ 2024-10-30 873/week @ 2024-11-06 923/week @ 2024-11-13 865/week @ 2024-11-20 948/week @ 2024-11-27 869/week @ 2024-12-04 817/week @ 2024-12-11 541/week @ 2024-12-18 206/week @ 2024-12-25 447/week @ 2025-01-01 857/week @ 2025-01-08 2087/week @ 2025-01-15 895/week @ 2025-01-22 943/week @ 2025-01-29 789/week @ 2025-02-05 874/week @ 2025-02-12

3,923 downloads per month
Used in 10 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