From 456fb276d66dea4bb1c62238b74d2e7a6985667e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 18 Nov 2022 10:58:41 +0200 Subject: [PATCH] Revert "Update for pango API changes" This reverts commit 6e54d3cea92ade06970c779b8c261d3bc24a7180. The change was wrong and the pango bindings work the same as before again. --- net/onvif/src/onvifmetadataoverlay/imp.rs | 2 +- video/closedcaption/src/cea608overlay/imp.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/onvif/src/onvifmetadataoverlay/imp.rs b/net/onvif/src/onvifmetadataoverlay/imp.rs index 98f14973..fc114aa9 100644 --- a/net/onvif/src/onvifmetadataoverlay/imp.rs +++ b/net/onvif/src/onvifmetadataoverlay/imp.rs @@ -295,7 +295,7 @@ impl OnvifMetadataOverlay { if state.layout.is_none() { let fontmap = pangocairo::FontMap::new(); let context = fontmap.create_context(); - context.set_language(Some(&pango::Language::from_string(Some("en_US")).unwrap())); + context.set_language(Some(&pango::Language::from_string("en_US"))); context.set_base_dir(pango::Direction::Ltr); let layout = pango::Layout::new(&context); layout.set_alignment(pango::Alignment::Left); diff --git a/video/closedcaption/src/cea608overlay/imp.rs b/video/closedcaption/src/cea608overlay/imp.rs index 2ecd9e0b..13a03b56 100644 --- a/video/closedcaption/src/cea608overlay/imp.rs +++ b/video/closedcaption/src/cea608overlay/imp.rs @@ -100,7 +100,7 @@ impl Cea608Overlay { let video_info = state.video_info.as_ref().unwrap(); let fontmap = pangocairo::FontMap::new(); let context = fontmap.create_context(); - context.set_language(Some(&pango::Language::from_string(Some("en_US")).unwrap())); + context.set_language(Some(&pango::Language::from_string("en_US"))); context.set_base_dir(pango::Direction::Ltr); let layout = pango::Layout::new(&context); layout.set_alignment(pango::Alignment::Left);