1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-26 06:42:12 +03:00

Ugh, meant to amend this into the prior commit

This commit is contained in:
Wez Furlong 2018-03-01 08:18:19 -08:00
parent 82164ba783
commit 022083ffde

View File

@ -95,6 +95,11 @@ impl Default for TextStyle {
}
impl TextStyle {
/// Make a version of this style with bold enabled.
/// Semi-lame: we just append fontconfig style settings
/// to the string blindly. We could get more involved
/// but it would mean adding in the fontsystem stuff here
/// and this is probably good enough.
fn make_bold(&self) -> Self {
Self {
fontconfig_pattern: format!("{}:weight=bold", self.fontconfig_pattern),
@ -102,6 +107,11 @@ impl TextStyle {
}
}
/// Make a version of this style with italic enabled.
/// Semi-lame: we just append fontconfig style settings
/// to the string blindly. We could get more involved
/// but it would mean adding in the fontsystem stuff here
/// and this is probably good enough.
fn make_italic(&self) -> Self {
Self {
fontconfig_pattern: format!("{}:style=Italic", self.fontconfig_pattern),