Add kittest snapshot test of italics (#7603)
This commit is contained in:
parent
9cb4e6a54e
commit
683214bfe8
|
|
@ -24,3 +24,28 @@ fn test_kerning() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_italics() {
|
||||||
|
for pixels_per_point in [1.0, 2.0_f32.sqrt(), 2.0] {
|
||||||
|
for theme in [egui::Theme::Dark, egui::Theme::Light] {
|
||||||
|
let mut harness = Harness::builder()
|
||||||
|
.with_pixels_per_point(pixels_per_point)
|
||||||
|
.with_theme(theme)
|
||||||
|
.build_ui(|ui| {
|
||||||
|
ui.label(egui::RichText::new("Small italics").italics().small());
|
||||||
|
ui.label(egui::RichText::new("Normal italics").italics());
|
||||||
|
ui.label(egui::RichText::new("Large italics").italics().size(22.0));
|
||||||
|
});
|
||||||
|
harness.run();
|
||||||
|
harness.fit_contents();
|
||||||
|
harness.snapshot(format!(
|
||||||
|
"image_blending/image_{theme}_x{pixels_per_point:.2}",
|
||||||
|
theme = match theme {
|
||||||
|
egui::Theme::Dark => "dark",
|
||||||
|
egui::Theme::Light => "light",
|
||||||
|
}
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:23be15ddddc13f9628a4dc15cdc32132274a0db5e16c6b1df5cadae3d5ba55ce
|
||||||
|
size 7125
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:abfa00ef9385d380bbd188d6254f92d6839a94f368100e75a2780337438f969f
|
||||||
|
size 11068
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:5e5c9015e2005429ba83a407ed1f7d4dfbf30624f666152e82079c6ed3b3cda5
|
||||||
|
size 17238
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3319a8bca1213fc3a2dd91ead155be1e25045bc614701250bc961848cfc42176
|
||||||
|
size 7327
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:5172aa12f07b4abf4bb217b8952b4cf5cf61b688455751964a1b54433d8c05b1
|
||||||
|
size 11709
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:5e3eedd952d4416af73179451c0c90bcb76635c9c3c94d37f42bdd228ddbdd03
|
||||||
|
size 18802
|
||||||
Loading…
Reference in New Issue