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

fix(fonts): correct width of \cong glyph, fix \boldsymbol{\cong} #3206

Merged
merged 10 commits into from Oct 30, 2021

Conversation

edemaine
Copy link
Member

@edemaine edemaine commented Aug 28, 2021

This PR is currently based on #2866 for build purposes. I'll rebase once #2866 is merged. Rebased.

What is the previous behavior before this PR?
\cong had the default advanceWidth of 1000

What is the new behavior after this PR?
\cong has the correct advanceWidth, matching = that it's based on (and many other binary operators).

Fixes #2199

image

@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 2021

Codecov Report

Merging #3206 (9bcc7a1) into master (4df1922) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3206   +/-   ##
=======================================
  Coverage   93.54%   93.54%           
=======================================
  Files          88       88           
  Lines        6557     6557           
  Branches     1513     1513           
=======================================
  Hits         6134     6134           
  Misses        393      393           
  Partials       30       30           

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 005ca79...9bcc7a1. Read the comment docs.

@ylemkimon ylemkimon added the build fonts WARNING: this grants write access to the PR label Aug 28, 2021
@github-actions github-actions bot removed the build fonts WARNING: this grants write access to the PR label Aug 28, 2021
@ylemkimon ylemkimon self-assigned this Aug 28, 2021
@ylemkimon ylemkimon added the build fonts WARNING: this grants write access to the PR label Aug 28, 2021
@github-actions github-actions bot removed the build fonts WARNING: this grants write access to the PR label Aug 28, 2021
ylemkimon
ylemkimon previously approved these changes Aug 28, 2021
@edemaine edemaine changed the title fix(fonts): correct width of \cong glyph fix(fonts): correct width of \cong glyph, fix \boldsymbol{\cong} Aug 28, 2021
@ylemkimon ylemkimon added fonts and removed fonts labels Aug 28, 2021
@ylemkimon ylemkimon removed their assignment Aug 28, 2021
@ylemkimon ylemkimon added the build fonts WARNING: this grants write access to the PR label Aug 28, 2021
@github-actions github-actions bot removed the build fonts WARNING: this grants write access to the PR label Aug 28, 2021
@edemaine
Copy link
Member Author

edemaine commented Aug 28, 2021

Hmm, there seems to be something wrong with the fonts now: the space has gotten bigger:

image

@ylemkimon Any ideas? I thought the fonts were maybe not updated, but I see you just updated them.

Update: I think the SetRBearing needs to be a bunch smaller than the width... hmm...

@ylemkimon
Copy link
Member

ylemkimon commented Aug 28, 2021

I wonder we should fix the date of fonts to a specific date in the past. Currently, a change in a font requires updating all the fonts.

(done in #3370)

@edemaine edemaine marked this pull request as draft August 28, 2021 22:52
@ylemkimon ylemkimon marked this pull request as ready for review August 28, 2021 22:58
@ylemkimon ylemkimon marked this pull request as draft August 28, 2021 22:58
@edemaine
Copy link
Member Author

I found a fix. Patch incoming.

@edemaine
Copy link
Member Author

Here's a screenshot of the fixed version:

image

x\cong y\\
x = y \\
x \boldsymbol {\cong} y \\
x \boldsymbol {=} y \\

@edemaine edemaine marked this pull request as ready for review August 28, 2021 23:06
@edemaine
Copy link
Member Author

@ylemkimon I updated this to use the new font versioning. Would you be able to review it (again)?

Here's a demo from the Netlify build:

image

@ylemkimon ylemkimon added the build fonts WARNING: this grants write access to the PR label Oct 30, 2021
@github-actions github-actions bot removed the build fonts WARNING: this grants write access to the PR label Oct 30, 2021
Copy link
Member

@ylemkimon ylemkimon left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this and sorry for the delayed review.

@ylemkimon ylemkimon enabled auto-merge (squash) October 30, 2021 07:11
@ylemkimon ylemkimon merged commit 35db4ff into master Oct 30, 2021
@ylemkimon ylemkimon deleted the cong-width branch October 30, 2021 07:13
KaTeX-bot added a commit that referenced this pull request Oct 30, 2021
## [0.13.23](v0.13.22...v0.13.23) (2021-10-30)

### Bug Fixes

* **fonts:** correct width of \cong glyph, fix \boldsymbol{\cong} ([#3206](#3206)) ([35db4ff](35db4ff)), closes [#2199](#2199)
@KaTeX-bot
Copy link
Member

🎉 This PR is included in version 0.13.23 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

\cong has extra trailing space
4 participants