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/). |
@ -1,96 +1,96 @@ |
|||
------------------------------- |
|||
UBUNTU FONT LICENCE Version 1.0 |
|||
------------------------------- |
|||
|
|||
PREAMBLE |
|||
This licence allows the licensed fonts to be used, studied, modified and |
|||
redistributed freely. The fonts, including any derivative works, can be |
|||
bundled, embedded, and redistributed provided the terms of this licence |
|||
are met. The fonts and derivatives, however, cannot be released under |
|||
any other licence. The requirement for fonts to remain under this |
|||
licence does not require any document created using the fonts or their |
|||
derivatives to be published under this licence, as long as the primary |
|||
purpose of the document is not to be a vehicle for the distribution of |
|||
the fonts. |
|||
|
|||
DEFINITIONS |
|||
"Font Software" refers to the set of files released by the Copyright |
|||
Holder(s) under this licence and clearly marked as such. This may |
|||
include source files, build scripts and documentation. |
|||
|
|||
"Original Version" refers to the collection of Font Software components |
|||
as received under this licence. |
|||
|
|||
"Modified Version" refers to any derivative made by adding to, deleting, |
|||
or substituting -- in part or in whole -- any of the components of the |
|||
Original Version, by changing formats or by porting the Font Software to |
|||
a new environment. |
|||
|
|||
"Copyright Holder(s)" refers to all individuals and companies who have a |
|||
copyright ownership of the Font Software. |
|||
|
|||
"Substantially Changed" refers to Modified Versions which can be easily |
|||
identified as dissimilar to the Font Software by users of the Font |
|||
Software comparing the Original Version with the Modified Version. |
|||
|
|||
To "Propagate" a work means to do anything with it that, without |
|||
permission, would make you directly or secondarily liable for |
|||
infringement under applicable copyright law, except executing it on a |
|||
computer or modifying a private copy. Propagation includes copying, |
|||
distribution (with or without modification and with or without charging |
|||
a redistribution fee), making available to the public, and in some |
|||
countries other activities as well. |
|||
|
|||
PERMISSION & CONDITIONS |
|||
This licence does not grant any rights under trademark law and all such |
|||
rights are reserved. |
|||
|
|||
Permission is hereby granted, free of charge, to any person obtaining a |
|||
copy of the Font Software, to propagate the Font Software, subject to |
|||
the below conditions: |
|||
|
|||
1) Each copy of the Font Software must contain the above copyright |
|||
notice and this licence. These can be included either as stand-alone |
|||
text files, human-readable headers or in the appropriate machine- |
|||
readable metadata fields within text or binary files as long as those |
|||
fields can be easily viewed by the user. |
|||
|
|||
2) The font name complies with the following: |
|||
(a) The Original Version must retain its name, unmodified. |
|||
(b) Modified Versions which are Substantially Changed must be renamed to |
|||
avoid use of the name of the Original Version or similar names entirely. |
|||
(c) Modified Versions which are not Substantially Changed must be |
|||
renamed to both (i) retain the name of the Original Version and (ii) add |
|||
additional naming elements to distinguish the Modified Version from the |
|||
Original Version. The name of such Modified Versions must be the name of |
|||
the Original Version, with "derivative X" where X represents the name of |
|||
the new work, appended to that name. |
|||
|
|||
3) The name(s) of the Copyright Holder(s) and any contributor to the |
|||
Font Software shall not be used to promote, endorse or advertise any |
|||
Modified Version, except (i) as required by this licence, (ii) to |
|||
acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with |
|||
their explicit written permission. |
|||
|
|||
4) The Font Software, modified or unmodified, in part or in whole, must |
|||
be distributed entirely under this licence, and must not be distributed |
|||
under any other licence. The requirement for fonts to remain under this |
|||
licence does not affect any document created using the Font Software, |
|||
except any version of the Font Software extracted from a document |
|||
created using the Font Software may only be distributed under this |
|||
licence. |
|||
|
|||
TERMINATION |
|||
This licence becomes null and void if any of the above conditions are |
|||
not met. |
|||
|
|||
DISCLAIMER |
|||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF |
|||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF |
|||
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE |
|||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL |
|||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER |
|||
DEALINGS IN THE FONT SOFTWARE. |
|||
------------------------------- |
|||
UBUNTU FONT LICENCE Version 1.0 |
|||
------------------------------- |
|||
|
|||
PREAMBLE |
|||
This licence allows the licensed fonts to be used, studied, modified and |
|||
redistributed freely. The fonts, including any derivative works, can be |
|||
bundled, embedded, and redistributed provided the terms of this licence |
|||
are met. The fonts and derivatives, however, cannot be released under |
|||
any other licence. The requirement for fonts to remain under this |
|||
licence does not require any document created using the fonts or their |
|||
derivatives to be published under this licence, as long as the primary |
|||
purpose of the document is not to be a vehicle for the distribution of |
|||
the fonts. |
|||
|
|||
DEFINITIONS |
|||
"Font Software" refers to the set of files released by the Copyright |
|||
Holder(s) under this licence and clearly marked as such. This may |
|||
include source files, build scripts and documentation. |
|||
|
|||
"Original Version" refers to the collection of Font Software components |
|||
as received under this licence. |
|||
|
|||
"Modified Version" refers to any derivative made by adding to, deleting, |
|||
or substituting -- in part or in whole -- any of the components of the |
|||
Original Version, by changing formats or by porting the Font Software to |
|||
a new environment. |
|||
|
|||
"Copyright Holder(s)" refers to all individuals and companies who have a |
|||
copyright ownership of the Font Software. |
|||
|
|||
"Substantially Changed" refers to Modified Versions which can be easily |
|||
identified as dissimilar to the Font Software by users of the Font |
|||
Software comparing the Original Version with the Modified Version. |
|||
|
|||
To "Propagate" a work means to do anything with it that, without |
|||
permission, would make you directly or secondarily liable for |
|||
infringement under applicable copyright law, except executing it on a |
|||
computer or modifying a private copy. Propagation includes copying, |
|||
distribution (with or without modification and with or without charging |
|||
a redistribution fee), making available to the public, and in some |
|||
countries other activities as well. |
|||
|
|||
PERMISSION & CONDITIONS |
|||
This licence does not grant any rights under trademark law and all such |
|||
rights are reserved. |
|||
|
|||
Permission is hereby granted, free of charge, to any person obtaining a |
|||
copy of the Font Software, to propagate the Font Software, subject to |
|||
the below conditions: |
|||
|
|||
1) Each copy of the Font Software must contain the above copyright |
|||
notice and this licence. These can be included either as stand-alone |
|||
text files, human-readable headers or in the appropriate machine- |
|||
readable metadata fields within text or binary files as long as those |
|||
fields can be easily viewed by the user. |
|||
|
|||
2) The font name complies with the following: |
|||
(a) The Original Version must retain its name, unmodified. |
|||
(b) Modified Versions which are Substantially Changed must be renamed to |
|||
avoid use of the name of the Original Version or similar names entirely. |
|||
(c) Modified Versions which are not Substantially Changed must be |
|||
renamed to both (i) retain the name of the Original Version and (ii) add |
|||
additional naming elements to distinguish the Modified Version from the |
|||
Original Version. The name of such Modified Versions must be the name of |
|||
the Original Version, with "derivative X" where X represents the name of |
|||
the new work, appended to that name. |
|||
|
|||
3) The name(s) of the Copyright Holder(s) and any contributor to the |
|||
Font Software shall not be used to promote, endorse or advertise any |
|||
Modified Version, except (i) as required by this licence, (ii) to |
|||
acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with |
|||
their explicit written permission. |
|||
|
|||
4) The Font Software, modified or unmodified, in part or in whole, must |
|||
be distributed entirely under this licence, and must not be distributed |
|||
under any other licence. The requirement for fonts to remain under this |
|||
licence does not affect any document created using the Font Software, |
|||
except any version of the Font Software extracted from a document |
|||
created using the Font Software may only be distributed under this |
|||
licence. |
|||
|
|||
TERMINATION |
|||
This licence becomes null and void if any of the above conditions are |
|||
not met. |
|||
|
|||
DISCLAIMER |
|||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF |
|||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF |
|||
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE |
|||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL |
|||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER |
|||
DEALINGS IN THE FONT SOFTWARE. |
@ -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