GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
Remove text line height scaling multiplier (set to 1.0) in cce-ui
src/backend/window_runner.rs | 2 +-
src/layout.rs | 2 +-
src/main.rs | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/backend/window_runner.rs b/src/backend/window_runner.rs
index 3237f83..3f5a5fb 100644
--- a/src/backend/window_runner.rs
+++ b/src/backend/window_runner.rs
@@ -102,7 +102,7 @@ pub fn get_text_buffer(fs: &mut FontSystem, text: &str, size: f32, font: Option<
let line_height = if is_vertical {
physical_size * 1.05
} else {
- physical_size * 1.4
+ physical_size * 1.0
};
let metrics = Metrics::new(physical_size, line_height);
let mut buf = Buffer::new(fs, metrics);
diff --git a/src/layout.rs b/src/layout.rs
index dd1b715..b5b7e8e 100644
--- a/src/layout.rs
+++ b/src/layout.rs
@@ -309,7 +309,7 @@ static TEXTBOX_MULTILINE_BORDER_WIDTH: RwLock<f32> = RwLock::new(1.0);
/// Standard line height multiplier for text layout in cce-ui.
-pub const TEXT_LINE_HEIGHT_MULTIPLIER: f32 = 1.4;
+pub const TEXT_LINE_HEIGHT_MULTIPLIER: f32 = 1.0;
/// Standard line height based on font size.
pub fn line_height(font_size: f32) -> f32 {
diff --git a/src/main.rs b/src/main.rs
index c3b4047..6017919 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -401,7 +401,7 @@ fn make_text_buffer_with_font(font_system: &mut FontSystem, text: &str, size: f3
return buf;
}
- let metrics = Metrics::new(physical_size, physical_size * 1.4);
+ let metrics = Metrics::new(physical_size, physical_size * 1.0);
let mut buffer = Buffer::new(font_system, metrics);
let mut attrs = Attrs::new();
if let Some(font_name) = family_name.as_deref() {