Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::LineMetrics Struct Reference

A text run's primary-font ascent and descent in CSS px, as the browser rounded and adjusted them when it built the run's content area. More...

#include <design_line_metrics.hpp>

Public Member Functions

bool valid () const
 Finite, with a positive ascent and a non-negative descent.

Public Attributes

float ascent = 0.0f
float descent = 0.0f

Detailed Description

A text run's primary-font ascent and descent in CSS px, as the browser rounded and adjusted them when it built the run's content area.

A captured line box exactly ascent + descent tall is the text fragment itself, so its baseline sits ascent below the box top.

Member Function Documentation

◆ valid()

bool pulp::view::LineMetrics::valid ( ) const
inline

Finite, with a positive ascent and a non-negative descent.

Every producer and consumer of captured metrics gates on this one check.

Member Data Documentation

◆ ascent

float pulp::view::LineMetrics::ascent = 0.0f

◆ descent

float pulp::view::LineMetrics::descent = 0.0f

The documentation for this struct was generated from the following file: