Skip to content

[text2png] Respect font's intended line spacing - #98

Open
wmedrano wants to merge 1 commit into
mainfrom
wm-spacing
Open

[text2png] Respect font's intended line spacing#98
wmedrano wants to merge 1 commit into
mainfrom
wm-spacing

Conversation

@wmedrano

@wmedrano wmedrano commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Users can now specify LineHeight::FontSizeRelative (equivalent to previous), LineHeight::Normal, and LineHeight::Absolute.

/// Specifies how line height is determined for text rendering and measurement.
#[derive(Debug, Clone, Default, Copy, PartialEq)]
pub enum LineHeight {
    /// Automatically determine line height from the font's
    /// typographic metrics (`ascent - descent + leading`).
    #[default]
    Normal,
    /// Line height proportional to the font size (e.g., 1.0 means line height equals `font_size`).
    FontSizeRelative(f32),
    /// Explicit line height in pixels.
    Absolute(f32),
}

@wmedrano
wmedrano force-pushed the wm-spacing branch 6 times, most recently from 9bd2951 to 6eaac4b Compare August 24, 2026 22:02
@wmedrano
wmedrano requested a review from tomasdev August 24, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant