Add regular variant of Fontin font
This commit is contained in:
1 parent
bf588528ca
commit
cf518a2c40
4 files changed
+19
-2
No files matched your search
+5
-1
@@ -2,6 +2,10 @@
|
||||
|
||||
## [Unreleased] - ReleaseDate
|
||||
|
||||
### Added
|
||||
|
||||
- Add regular variant of Fontin font
|
||||
|
||||
## [0.2.5] - 2025-10-30
|
||||
|
||||
### Added
|
||||
@@ -93,8 +97,8 @@
|
||||
- First release
|
||||
|
||||
<!-- next-url -->
|
||||
[Unreleased]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.5...HEAD
|
||||
|
||||
[Unreleased]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.5...HEAD
|
||||
[0.2.5]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.4...v0.2.5
|
||||
[0.2.4]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.3...v0.2.4
|
||||
[0.2.3]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.2...v0.2.3
|
||||
|
||||
Binary file not shown.
@@ -476,6 +476,7 @@ fn build_layout_job<'a>(
|
||||
font_weight = Some(700.0);
|
||||
FontFamily::Named(Cow::Borrowed("Liberation Sans"))
|
||||
}
|
||||
PoBFontType::Fontin => FontFamily::Named(Cow::Borrowed("Fontin")),
|
||||
PoBFontType::FontinItalic => FontFamily::Named(Cow::Borrowed("Fontin")),
|
||||
PoBFontType::FontinSmallcaps => FontFamily::Named(Cow::Borrowed("Fontin SmallCaps")),
|
||||
PoBFontType::FontinSmallcapsItalic => {
|
||||
@@ -634,6 +635,7 @@ enum PoBFontType {
|
||||
VarBold,
|
||||
FontinSmallcaps,
|
||||
FontinSmallcapsItalic,
|
||||
Fontin,
|
||||
FontinItalic,
|
||||
}
|
||||
|
||||
@@ -647,6 +649,7 @@ impl std::str::FromStr for PoBFontType {
|
||||
"VAR BOLD" => Ok(Self::VarBold),
|
||||
"FONTIN SC" => Ok(Self::FontinSmallcaps),
|
||||
"FONTIN SC ITALIC" => Ok(Self::FontinSmallcapsItalic),
|
||||
"FONTIN" => Ok(Self::Fontin),
|
||||
"FONTIN ITALIC" => Ok(Self::FontinItalic),
|
||||
_ => Err(anyhow::anyhow!(
|
||||
"'{}' is not a valid TextFontType variant",
|
||||
|
||||
+11
-1
@@ -299,6 +299,12 @@ fn pob_font_definitions() -> FontDefinitions {
|
||||
"../fonts/LiberationSans-Bold.ttf"
|
||||
))),
|
||||
);
|
||||
definitions.font_data.insert(
|
||||
"fontin-regular".to_owned(),
|
||||
Arc::new(FontData::from_static(include_bytes!(
|
||||
"../fonts/fontin-regular.ttf"
|
||||
))),
|
||||
);
|
||||
definitions.font_data.insert(
|
||||
"fontin-italic".to_owned(),
|
||||
Arc::new(FontData::from_static(include_bytes!(
|
||||
@@ -327,7 +333,11 @@ fn pob_font_definitions() -> FontDefinitions {
|
||||
|
||||
definitions.generic_families.insert(
|
||||
parley::GenericFamily::Serif,
|
||||
vec!["fontin-italic".to_owned(), "fontin-smallcaps".to_owned()],
|
||||
vec![
|
||||
"fontin-regular".to_owned(),
|
||||
"fontin-italic".to_owned(),
|
||||
"fontin-smallcaps".to_owned(),
|
||||
],
|
||||
);
|
||||
|
||||
definitions
|
||||
|
||||
Reference in new issue
Block a user