orbtk_theme/fonts/
mod.rs

1// The 'Material Design Icons' provide an icon set developed by Google.
2// Desing guidelines document the underlying structure.
3// orbtk uses an activly maintained successor project called 'Material Icons'.
4// Supported are 'ttf' and 'woff2' fonts.
5
6// Project root: https://github.com/material-icons/material-icons-font
7// Package-Info: package.json
8
9// TL;DR
10// https://stackoverflow.com/questions/11002820/why-should-we-include-ttf-eot-woff-svg-in-a-font-face
11// ... woff2 gets drafted and accepted, which improves the compression
12// leading to even smaller files, along with the ability to load a single font
13// "in parts" so that a font that supports 20 scripts can be stored as "chunks"
14// on disk instead, with browsers automatically able to load the font "in parts"
15// as needed, rather than needing to transfer the entire font up front, further
16// improving the typesetting experience.
17// If you don't want to support IE 8 and lower, and iOS 4 and lower,
18// and android 4.3 or earlier, then you can just use WOFF
19// (and WOFF2, a more highly compressed WOFF, for the newest browsers that support it.)
20
21/// The `regular` TrueType font, offering glyphs maintained in the `Material Incos Font` project.
22pub const MATERIAL_ICONS_FONT: &[u8] = include_bytes!("MaterialIcons.ttf");
23
24/// The baseline variant of the woff2 encoded font, offering glyphs maintained in the `Material Incos Font` project.
25pub const MATERIAL_ICONS_BASELINE_FONT: &[u8] = include_bytes!("MaterialIcons-Baseline.woff2");
26
27/// The 'outlined' variant of the woff2 encoded font, offering glyphs maintained in the `Material Incos Font` project.
28pub const MATERIAL_ICONS_OUTLINED_FONT: &[u8] = include_bytes!("MaterialIcons-Outlined.woff2");
29
30/// The `round` variant of the woff2 encoded font, offering glyphs maintained in the `Material Incos Font` project.
31pub const MATERIAL_ICONS_ROUND_FONT: &[u8] = include_bytes!("MaterialIcons-Round.woff2");
32
33/// The `sharp` variant of the woff2 encoded font, offering glyphs maintained in the `Material Incos Font` project.
34pub const MATERIAL_ICONS_SHARP_FONT: &[u8] = include_bytes!("MaterialIcons-Sharp.woff2");
35
36/// The `twotone` variant of the woff2 encoded font, offering glyphs maintained in the `Material Incos Font` project.
37pub const MATERIAL_ICONS_TWOTONE_FONT: &[u8] = include_bytes!("MaterialIcons-TwoTone.woff2");
38
39/// The `regular` variant of the `Roboto` font family.
40pub const ROBOTO_REGULAR_FONT: &[u8] = include_bytes!("Roboto-Regular.ttf");
41
42/// The `medium` variant of the `Roboto` font family.
43pub const ROBOTO_MEDIUM_FONT: &[u8] = include_bytes!("Roboto-Medium.ttf");
44
45/// Use fixed `font size` of 12pt.
46pub const FONT_SIZE_12: f64 = 12.0;
47
48/// Use fixed `icon font size` of 12pt.
49pub const ICON_FONT_SIZE_12: f64 = 12.0;