Crates.io | glyph-names |
lib.rs | glyph-names |
version | 0.2.0 |
source | src |
created_at | 2020-03-05 05:43:09.854222 |
updated_at | 2023-02-08 00:27:35.511009 |
description | Mapping of characters to glyph names according to the Adobe Glyph List Specification |
homepage | https://github.com/yeslogic/glyph-names |
repository | https://github.com/yeslogic/glyph-names |
max_upload_size | |
id | 215609 |
size | 186,150 |
Mapping of characters to glyph names according to the Adobe Glyph List Specification. This crate is no-std compatible.
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);
}
git submodule update --init
).make
.