Repository navigation
Align text on a common baseline and keep the line strut - #272
Merged
Merged
Conversation
- Put text of different sizes in a line on one baseline instead of aligning it to the top - Make a line with text at least as tall as the block's own font, also through pagination - Update the five baselines with mixed font sizes in a line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While going through the updated "Line break" baseline from #270, the two "Release" lines in the heading looked off. Compared against Edge, the spacing itself is right, every line in the
<h1>is as tall as the heading's font, but two things weren't:ApplyVerticalAlignmentcalled the highest top of the line the "baseline", so mixed font sizes were effectively top aligned.Text words of a line now share one baseline, taken from the largest ascent of the words and the block's own font, and a line with text is at least as tall as the block's font. The line box keeps the strut, so it also survives the pagination pass and
OffsetTop. Words insidesub/superkeep their existing handling, and images and image-only lines aren't touched for now, to keep the change contained.With the same heading, Edge renders four lines of 43px with the "Release" lines at 66-81 and 150-167, HTML Renderer now renders four lines of 40px with them at 62-73 and 140-154.
Five baselines changed, all of them lines with mixed font sizes:
|separators line up with the@font-facetextHow to test this PR?
CI should succeed.
LineBaselineIntegrationTestscovers the baseline and the strut, and fails on master.