Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent gaps in tall delimiters #1986

Merged
merged 8 commits into from
Jul 5, 2019
Merged

Prevent gaps in tall delimiters #1986

merged 8 commits into from
Jul 5, 2019

Conversation

ronkok
Copy link
Collaborator

@ronkok ronkok commented May 27, 2019

Fixes #1975 by typesetting tall delimiters with a small (0.005em) overlap where glyphs meet.

As evidence, I offer two screenshots. The first one is before this PR:
gap

The second screenshot is after this PR:
nogap

The value of 0.005em is entirely a guess on my part and may need later adjustment.

@ronkok
Copy link
Collaborator Author

ronkok commented May 27, 2019

@kevinbarabash This PR does several vertical alignment calculations and the screenshotter tests declare several errors. It appears to me that all of them are sub-pixel issues except the Array test, in which the diff shows one thin green line.

I'm willing to declare this PR as good to go, but I'll leave the screenshotter tests as is for now. If you agree that the PR is okay, I'll replace the screenshots with new ones.

@ronkok
Copy link
Collaborator Author

ronkok commented May 28, 2019

I went ahead and updated the screenshots.

@codecov-io
Copy link

Codecov Report

Merging #1986 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1986      +/-   ##
==========================================
+ Coverage   93.36%   93.38%   +0.01%     
==========================================
  Files          79       79              
  Lines        4931     4942      +11     
  Branches      860      860              
==========================================
+ Hits         4604     4615      +11     
  Misses        287      287              
  Partials       40       40
Flag Coverage Δ
#screenshotter 89.15% <100%> (+0.02%) ⬆️
#test 86.58% <50%> (-0.1%) ⬇️
Impacted Files Coverage Δ
src/delimiter.js 87.31% <100%> (+0.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1dfd88...cb48411. Read the comment docs.

1 similar comment
@codecov-io
Copy link

Codecov Report

Merging #1986 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1986      +/-   ##
==========================================
+ Coverage   93.36%   93.38%   +0.01%     
==========================================
  Files          79       79              
  Lines        4931     4942      +11     
  Branches      860      860              
==========================================
+ Hits         4604     4615      +11     
  Misses        287      287              
  Partials       40       40
Flag Coverage Δ
#screenshotter 89.15% <100%> (+0.02%) ⬆️
#test 86.58% <50%> (-0.1%) ⬇️
Impacted Files Coverage Δ
src/delimiter.js 87.31% <100%> (+0.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1dfd88...cb48411. Read the comment docs.

Copy link
Member

@kevinbarabash kevinbarabash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay in reviewing. LGTM. Thanks for figuring out a simple fix for this issue and implementing it.

// at a position that juts 0.005 above the bottom of the top element.
inners.push({type: "kern", size: shiftOfExtraElement});
inners.push(makeInner(repeat, font, mode));
inners.push(lap);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the else branch we do the same thing. Do we need to insert two extra repeat elements? I see, there's two for loops in the else block.

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.

Break in tall delimiters
3 participants