Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yeslogic/glyph-names
Rust crate for mapping to glyph names according to the Adobe Glyph List Specification
https://github.com/yeslogic/glyph-names
agl-specification font rust
Last synced: 2 months ago
JSON representation
Rust crate for mapping to glyph names according to the Adobe Glyph List Specification
- Host: GitHub
- URL: https://github.com/yeslogic/glyph-names
- Owner: yeslogic
- License: bsd-3-clause
- Created: 2020-02-20T05:50:59.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-21T06:56:38.000Z (over 1 year ago)
- Last Synced: 2024-10-31T11:53:54.626Z (3 months ago)
- Topics: agl-specification, font, rust
- Language: Rust
- Size: 45.9 KB
- Stars: 15
- Watchers: 13
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
glyph-names
===========
Mapping of characters to glyph names according to the [Adobe Glyph List
Specification][agl-specification]. This crate is no-std compatible.Usage
-----```rust
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`.[ucd-generate]: https://github.com/BurntSushi/ucd-generate
[agl-specification]: https://github.com/adobe-type-tools/agl-specification