Add PNG DPI support via pHYs chunk and fix font picker

PNG files now embed pHYs chunk for DPI when output_dpi is set, matching
the existing JPEG DPI support. Also fixed FontDialogButton signal handler
to properly unwrap the Option<FontDescription>.
This commit is contained in:
2026-03-06 17:16:43 +02:00
parent d9ce1f8731
commit fbb9cddbb8
2 changed files with 88 additions and 3 deletions

View File

@@ -443,9 +443,10 @@ pub fn build_watermark_page(state: &AppState) -> adw::NavigationPage {
{
let jc = state.job_config.clone();
font_button.connect_font_desc_notify(move |btn| {
let desc = btn.font_desc();
if let Some(family) = desc.family() {
jc.borrow_mut().watermark_font_family = family.to_string();
if let Some(desc) = btn.font_desc() {
if let Some(family) = desc.family() {
jc.borrow_mut().watermark_font_family = family.to_string();
}
}
});
}