Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0264fde

Browse files
committed
text: Fetch line height metrics from the used font itself
We follow the process from [the CSS Inline Layout module](https://www.w3.org/TR/css-inline-3/), specifically: 1. The default ascent and descent come from the `OS/2` font table, or failing that, the `hhea` table, with final fallback to the measurement we used to do. 2. If `linespacing` (cf line height in CSS) is normal, then we do as before and size each line based on the maximum ascent/descent of its contents. Additionally, apply the line gap from the font metrics as half-leading around each line. 3. If `linespacing` is a float, then scale it by font size of the first available font, and keep it fixed for each line.
1 parent b1cf5d4 commit 0264fde

689 files changed

Lines changed: 16643 additions & 16039 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
72 Bytes
Loading
514 Bytes
Loading
-51 Bytes
Loading
-41 Bytes
Loading
20 Bytes
Loading
116 Bytes
Loading
132 Bytes
Loading
69 Bytes
Loading
-30 Bytes
Loading
-400 Bytes
Loading

0 commit comments

Comments
 (0)