translate question
This commit is contained in:
parent
1dfe835587
commit
78609dec9a
2 changed files with 11 additions and 17 deletions
|
@ -3,7 +3,7 @@ use fontconfig::Fontconfig;
|
|||
use harfbuzz_rs::{Face, Font, Owned, UnicodeBuffer};
|
||||
use std::sync::OnceLock;
|
||||
use svgwriter::{
|
||||
tags::{Group, Path, Rect, TSpan, TagWithPresentationAttributes as _, Text},
|
||||
tags::{Group, Path, TSpan, TagWithPresentationAttributes as _, Text},
|
||||
Data, Graphic, Transform
|
||||
};
|
||||
|
||||
|
@ -122,7 +122,7 @@ impl Question {
|
|||
.with_dominant_baseline("middle")
|
||||
.with_text_anchor("middle")
|
||||
.with_font_weight(600)
|
||||
.append("Question")
|
||||
.append(lang.question.to_owned())
|
||||
);
|
||||
g.push(text);
|
||||
|
||||
|
@ -138,15 +138,3 @@ impl Question {
|
|||
svg
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[test]
|
||||
fn question() {
|
||||
let svg = Question::new(
|
||||
Resolution::FullHD,
|
||||
&Language::default(),
|
||||
"Hallo Welt! Dies ist eine sehr kluge Frage aus dem Publikum. Die Frage ist nämlich: Was ist eigentlich die Frage?".into()
|
||||
)
|
||||
.finish();
|
||||
std::fs::write("question.svg", svg.to_string_pretty()).unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue