mirror of https://github.com/emilk/egui.git
Browse Source
This allows license checking tools to omit the OFL and UFL licenses when `default_fonts` are turned off. There was some discussion of versioning on the original issue; I have chosen to label this version as `0.28.1` to match the other crates. Happy to adjust the version as needed. <!-- Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md) before opening a Pull Request! * Keep your PR:s small and focused. * The PR title is what ends up in the changelog, so make it descriptive! * If applicable, add a screenshot or gif. * If it is a non-trivial addition, consider adding a demo for it to `egui_demo_lib`, or a new example. * Do NOT open PR:s from your `master` branch, as that makes it hard for maintainers to test and add commits to your PR. * Remember to run `cargo fmt` and `cargo clippy`. * Open the PR as a draft until you have self-reviewed it and run `./scripts/check.sh`. * When you have addressed a PR comment, mark it as resolved. Please be patient! I will review your PR, but my time is limited! --> * Closes <https://github.com/emilk/egui/issues/2321> * [X] I have followed the instructions in the PR template --------- Co-authored-by: Alex Pinkus <pinkus@amazon.com>pull/4891/head
Alex Pinkus
3 months ago
committed by
GitHub
22 changed files with 243 additions and 139 deletions
@ -0,0 +1,9 @@ |
|||
# `epaint_default_fonts` changelog |
|||
All notable changes to the `epaint_default_fonts` crate will be documented in this file. |
|||
|
|||
This file is updated upon each release. |
|||
Changes since the last release can be found at <https://github.com/emilk/egui/compare/latest...HEAD> or by running the `scripts/generate_changelog.py` script. |
|||
|
|||
|
|||
## 0.28.1 - 2024-07-05 |
|||
Crate added. |
@ -0,0 +1,29 @@ |
|||
[package] |
|||
name = "epaint_default_fonts" |
|||
version.workspace = true |
|||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] |
|||
description = "Default fonts for use in epaint / egui" |
|||
edition.workspace = true |
|||
rust-version.workspace = true |
|||
homepage = "https://github.com/emilk/egui/tree/master/crates/epaint_default_fonts" |
|||
license = "(MIT OR Apache-2.0) AND OFL-1.1 AND LicenseRef-UFL-1.0" # OFL and UFL are from the font files themselves. |
|||
readme = "README.md" |
|||
repository = "https://github.com/emilk/egui/tree/master/crates/epaint_default_fonts" |
|||
categories = ["graphics", "gui"] |
|||
keywords = ["graphics", "gui", "egui"] |
|||
include = [ |
|||
"../LICENSE-APACHE", |
|||
"../LICENSE-MIT", |
|||
"**/*.rs", |
|||
"Cargo.toml", |
|||
"fonts/*.ttf", |
|||
"fonts/*.txt", |
|||
"fonts/OFL.txt", |
|||
"fonts/UFL.txt", |
|||
] |
|||
|
|||
[lints] |
|||
workspace = true |
|||
|
|||
[package.metadata.docs.rs] |
|||
all-features = true |
@ -0,0 +1,11 @@ |
|||
# `epaint_default_fonts` - fonts for epaint and egui |
|||
|
|||
[![Latest version](https://img.shields.io/crates/v/epaint_default_fonts.svg)](https://crates.io/crates/epaint_default_fonts) |
|||
[![Documentation](https://docs.rs/epaint_default_fonts/badge.svg)](https://docs.rs/epaint_default_fonts) |
|||
[![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/) |
|||
![MIT](https://img.shields.io/badge/license-MIT-blue.svg) |
|||
![Apache](https://img.shields.io/badge/license-Apache-blue.svg) |
|||
|
|||
Default fonts that are used in `epaint` and `egui`. Not intended for use as a standalone library. |
|||
|
|||
Made for [`egui`](https://github.com/emilk/egui/). |
@ -0,0 +1,47 @@ |
|||
//! A library containing built-in fonts for `epaint`, embedded as bytes.
|
|||
//!
|
|||
//! This is intended to be consumed through the `epaint` crate.
|
|||
|
|||
/// A typeface designed for source code.
|
|||
///
|
|||
/// Hack is designed to be a workhorse typeface for source code. It has deep
|
|||
/// roots in the free, open source typeface community and expands upon the
|
|||
/// contributions of the [Bitstream Vera](https://www.gnome.org/fonts/) and
|
|||
/// [DejaVu](https://dejavu-fonts.github.io/) projects. The large x-height +
|
|||
/// wide aperture + low contrast design make it legible at commonly used source
|
|||
/// code text sizes with a sweet spot that runs in the 8 - 14 range.
|
|||
///
|
|||
/// See [the Hack repository](https://github.com/source-foundry/Hack) for more
|
|||
/// information.
|
|||
pub const HACK_REGULAR: &[u8] = include_bytes!("../fonts/Hack-Regular.ttf"); |
|||
|
|||
/// A typeface containing emoji characters as designed for the Noto font family.
|
|||
///
|
|||
/// Noto is a collection of high-quality fonts with multiple weights and widths
|
|||
/// in sans, serif, mono, and other styles, in more than 1,000 languages and
|
|||
/// over 150 writing systems. Noto Emoji contains black-and-white emoji
|
|||
/// characters that match Google's emoji designs.
|
|||
///
|
|||
/// See [Google Fonts](https://fonts.google.com/noto/specimen/Noto+Emoji) for
|
|||
/// more information.
|
|||
pub const NOTO_EMOJI_REGULAR: &[u8] = include_bytes!("../fonts/NotoEmoji-Regular.ttf"); |
|||
|
|||
/// A typeface designed for use by Ubuntu.
|
|||
///
|
|||
/// The Ubuntu typeface has been specially created to complement the Ubuntu tone
|
|||
/// of voice. It has a contemporary style and contains characteristics unique to
|
|||
/// the Ubuntu brand that convey a precise, reliable and free attitude.
|
|||
///
|
|||
/// See [Ubuntu design](https://design.ubuntu.com/font) for more information.
|
|||
pub const UBUNTU_LIGHT: &[u8] = include_bytes!("../fonts/Ubuntu-Light.ttf"); |
|||
|
|||
/// An experimental typeface that uses standardized
|
|||
/// [UNICODE planes](http://en.wikipedia.org/wiki/Plane_(Unicode))
|
|||
/// for icon fonts.
|
|||
///
|
|||
/// The icons in this font are designed to be styled with minimal effort. Each
|
|||
/// icon is solid, which is useful for changing icon colors.
|
|||
///
|
|||
/// See [the `emoji-icon-font` repository](https://github.com/jslegers/emoji-icon-font)
|
|||
/// for more information.
|
|||
pub const EMOJI_ICON: &[u8] = include_bytes!("../fonts/emoji-icon-font.ttf"); |
Loading…
Reference in new issue