Compare commits

..
4 Commits
Author SHA1 Message Date
meehl 54b454f8b9 chore: Release rusty-path-of-building version 0.2.6
Release / create-release (push) Successful in 7s
2025-10-31 01:06:18 +01:00
meehl 6d0975fe15 Update CHANGELOG 2025-10-31 01:05:49 +01:00
meehl 64960b8c3c Add stubs for DPI scale overrides 2025-10-31 00:17:50 +01:00
meehl cf518a2c40 Add regular variant of Fontin font 2025-10-31 00:07:49 +01:00
8 changed files with 47 additions and 5 deletions

No files matched your search

+9 -1
View File
@@ -2,6 +2,13 @@
## [Unreleased] - ReleaseDate
## [0.2.6] - 2025-10-31
### Added
- Add regular variant of Fontin font
- Add stubs for DPI scale overrides
## [0.2.5] - 2025-10-30
### Added
@@ -93,8 +100,9 @@
- 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.6...HEAD
[0.2.6]: https://github.com/meehl/rusty-path-of-building/compare/v0.2.5...v0.2.6
[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
Generated
+1 -1
View File
@@ -2530,7 +2530,7 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
[[package]]
name = "rusty-path-of-building"
version = "0.2.5"
version = "0.2.6"
dependencies = [
"ahash",
"anyhow",
+1 -1
View File
@@ -4,7 +4,7 @@ authors = ["meehl"]
description = "Cross-platform runtime for Path of Building"
repository = "https://github.com/meehl/rusty-path-of-building"
license = "MIT"
version = "0.2.5"
version = "0.2.6"
edition = "2024"
publish = false
Binary file not shown.
+12 -1
View File
@@ -13,7 +13,10 @@ use crate::{
},
rendering::PoBString,
search_handle::new_search_handle,
window::{get_screen_scale, get_screen_size, set_foreground, set_window_title},
window::{
get_dpi_scale_override, get_screen_scale, get_screen_size, set_dpi_scale_override,
set_foreground, set_window_title,
},
},
lua::ContextSocket,
};
@@ -88,6 +91,14 @@ pub fn register_globals(lua: &Lua) -> LuaResult<()> {
globals.set("GetScreenScale", lua.create_function(get_screen_scale)?)?;
globals.set("SetWindowTitle", lua.create_function(set_window_title)?)?;
globals.set("SetForeground", lua.create_function(set_foreground)?)?;
globals.set(
"SetDPIScaleOverridePercent",
lua.create_function(set_dpi_scale_override)?,
)?;
globals.set(
"GetDPIScaleOverridePercent",
lua.create_function(get_dpi_scale_override)?,
)?;
// lua
globals.set("PCall", lua.create_function(protected_call)?)?;
+3
View File
@@ -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",
+10
View File
@@ -32,3 +32,13 @@ pub fn set_foreground(l: &Lua, _: ()) -> LuaResult<()> {
socket.window().focus();
Ok(())
}
pub fn set_dpi_scale_override(_: &Lua, _percent: i32) -> LuaResult<()> {
// TODO:
Ok(())
}
pub fn get_dpi_scale_override(_: &Lua, _: ()) -> LuaResult<i32> {
// TODO:
Ok(0)
}
+11 -1
View File
@@ -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