diff --git a/src/tags.rs b/src/tags.rs index 6e3b1fb8..faf301d4 100644 --- a/src/tags.rs +++ b/src/tags.rs @@ -137,18 +137,18 @@ pub fn textarea_highlighter(text: String) -> LayoutJob { 0.0, match highlight { HighlightType::Nothing => TextFormat { - font_id: FontId::new(14.0, FontFamily::Proportional), + font_id: FontId::new(12.0, FontFamily::Proportional), color: Color32::BLACK, ..Default::default() }, HighlightType::PublicKey => TextFormat { - font_id: FontId::new(16.0, FontFamily::Monospace), + font_id: FontId::new(12.0, FontFamily::Monospace), background: Color32::LIGHT_GRAY, color: Color32::DARK_GREEN, ..Default::default() }, HighlightType::Event => TextFormat { - font_id: FontId::new(16.0, FontFamily::Monospace), + font_id: FontId::new(12.0, FontFamily::Monospace), background: Color32::LIGHT_GRAY, color: Color32::DARK_RED, ..Default::default() diff --git a/src/ui/style.rs b/src/ui/style.rs index dfd40f4d..d3e712fe 100644 --- a/src/ui/style.rs +++ b/src/ui/style.rs @@ -110,7 +110,7 @@ pub(super) fn text_styles() -> BTreeMap { text_styles.insert( TextStyle::Button, FontId { - size: 13.5, + size: 13.0, family: FontFamily::Proportional, }, ); @@ -118,7 +118,7 @@ pub(super) fn text_styles() -> BTreeMap { text_styles.insert( TextStyle::Heading, FontId { - size: 18.0, + size: 17.0, family: FontFamily::Proportional, }, ); @@ -132,12 +132,18 @@ pub(super) fn font_definitions() -> FontDefinitions { font_data.insert( "DejaVuSans".to_owned(), - FontData::from_static(include_bytes!("../../fonts/DejaVuSans.ttf")), + FontData::from_static(include_bytes!("../../fonts/DejaVuSans.ttf")) ); font_data.insert( "Inconsolata".to_owned(), - FontData::from_static(include_bytes!("../../fonts/Inconsolata-Regular.ttf")), + FontData::from_static(include_bytes!("../../fonts/Inconsolata-Regular.ttf")).tweak( + FontTweak { + scale: 1.22, // This font is smaller than DejaVuSans + y_offset_factor: -0.21, // and too low + y_offset: 0.0, + }, + ), ); // Some good looking emojis. Use as first priority: @@ -145,8 +151,8 @@ pub(super) fn font_definitions() -> FontDefinitions { "NotoEmoji-Regular".to_owned(), FontData::from_static(include_bytes!("../../fonts/NotoEmoji-Regular.ttf")).tweak( FontTweak { - scale: 1.1, // make them a touch larger - y_offset_factor: -0.2, // move them up + scale: 1.1, // make them a touch larger + y_offset_factor: -0.26, // move them up y_offset: 0.0, }, ),