Revert "Update for pango API changes"

This reverts commit 6e54d3cea9.

The change was wrong and the pango bindings work the same as before
again.
This commit is contained in:
Sebastian Dröge 2022-11-18 10:58:41 +02:00
parent 6e54d3cea9
commit 456fb276d6
2 changed files with 2 additions and 2 deletions

View file

@ -295,7 +295,7 @@ impl OnvifMetadataOverlay {
if state.layout.is_none() { if state.layout.is_none() {
let fontmap = pangocairo::FontMap::new(); let fontmap = pangocairo::FontMap::new();
let context = fontmap.create_context(); 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); context.set_base_dir(pango::Direction::Ltr);
let layout = pango::Layout::new(&context); let layout = pango::Layout::new(&context);
layout.set_alignment(pango::Alignment::Left); layout.set_alignment(pango::Alignment::Left);

View file

@ -100,7 +100,7 @@ impl Cea608Overlay {
let video_info = state.video_info.as_ref().unwrap(); let video_info = state.video_info.as_ref().unwrap();
let fontmap = pangocairo::FontMap::new(); let fontmap = pangocairo::FontMap::new();
let context = fontmap.create_context(); 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); context.set_base_dir(pango::Direction::Ltr);
let layout = pango::Layout::new(&context); let layout = pango::Layout::new(&context);
layout.set_alignment(pango::Alignment::Left); layout.set_alignment(pango::Alignment::Left);