Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54b454f8b9 | ||
|
|
6d0975fe15 | ||
|
|
64960b8c3c | ||
|
|
cf518a2c40 |
No files matched your search
+9
-1
@@ -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
@@ -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
@@ -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
@@ -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)?)?;
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
@@ -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