Skip to content

Rust crate for mapping to glyph names according to the Adobe Glyph List Specification

License

Apache-2.0, BSD-3-Clause licenses found

Licenses found

Apache-2.0
LICENSE
BSD-3-Clause
LICENSE.original
Notifications You must be signed in to change notification settings

MFEK/glifnames.rlib

 
 

glifnames.rlib v0.2.0 (2022-12-25)


Mapping of characters to glyph names according to the Adobe Glyph List Specification.

This is a fork

This is MFEK's fork of glyph-names.

Notable differences:

  • Completely redone API.
  • Support for the other files in the Adobe Glyph List format and in Adobe's AGL repository.

Planned changes

  • Support for user-provided files (nom parser).

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.

License

Like all MFEK modules, our forked version is relicensed as Apache-2.0 only.

The original version is 3-clause BSD. See LICENSE.original file.

Copyright 2022 Fredrick R. Brennan <copypaste@kittens.ph>
Copyright 2020 YesLogic Pty. Ltd.
Copyright 2002-2019 Adobe (http://www.adobe.com/).

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Rust crate for mapping to glyph names according to the Adobe Glyph List Specification

Resources

License

Apache-2.0, BSD-3-Clause licenses found

Licenses found

Apache-2.0
LICENSE
BSD-3-Clause
LICENSE.original

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 98.8%
  • Other 1.2%