Skip to content

Use current font for accents#2066

Merged
ylemkimon merged 5 commits intoKaTeX:masterfrom
edemaine:accent-font
Aug 20, 2019
Merged

Use current font for accents#2066
ylemkimon merged 5 commits intoKaTeX:masterfrom
edemaine:accent-font

Conversation

@edemaine
Copy link
Member

@edemaine edemaine commented Aug 2, 2019

Fix #353 using buildCommon.makeSymbol to automatically determine font for the accent symbol.

I'd forgotten about this issue but @kevinbarabash's recent post in it caused me to look at it again. I believe the fix is quite simple with the current code (much revised since the issue was first raised).

Example:

\acute a\text{\'a}\textit{\'a}\texttt{\'a}\mathbf{\acute a}\boldsymbol{\acute a}

image

As a bonus, this also fixes #1099: turns out the issue there was not using the italic-font accents within \textit.

\textit{\r{A}\H{A}\.A\'A\"A}

image

The screenshot diffs highlight the improvements (green is new):

MathIt: MathIt-chrome-diff
MathBf: MathBf-chrome-diff
MathSf: MathSf-chrome-diff
MathTt: MathTt-chrome-diff

Fix KaTeX#353 using `buildCommon.makeSymbol` to automatically determine font
for the accent symbol.
@codecov-io
Copy link

Codecov Report

Merging #2066 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2066      +/-   ##
==========================================
+ Coverage   94.81%   94.81%   +<.01%     
==========================================
  Files          81       81              
  Lines        5281     5282       +1     
  Branches      923      923              
==========================================
+ Hits         5007     5008       +1     
  Misses        250      250              
  Partials       24       24
Flag Coverage Δ
#screenshotter 89.67% <100%> (ø) ⬆️
#test 88.47% <100%> (ø) ⬆️
Impacted Files Coverage Δ
src/functions/accent.js 100% <100%> (ø) ⬆️

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 151376e...da5757c. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Aug 2, 2019

Codecov Report

Merging #2066 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2066      +/-   ##
==========================================
+ Coverage   94.82%   94.83%   +<.01%     
==========================================
  Files          81       81              
  Lines        5280     5281       +1     
  Branches      923      923              
==========================================
+ Hits         5007     5008       +1     
  Misses        249      249              
  Partials       24       24
Flag Coverage Δ
#screenshotter 89.67% <100%> (ø) ⬆️
#test 88.56% <100%> (ø) ⬆️
Impacted Files Coverage Δ
src/functions/accent.js 100% <100%> (ø) ⬆️

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 96e1156...d87355c. Read the comment docs.

@edemaine
Copy link
Member Author

@ylemkimon Thanks for the review!

@ylemkimon
Copy link
Member

@edemaine Thank you for tackling the long-standing problem!

@ylemkimon ylemkimon merged commit 081b44a into KaTeX:master Aug 20, 2019
@k4b7
Copy link
Member

k4b7 commented Aug 20, 2019

This is awesome! 🚀

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.

accents on characters inside \textit{} are incorrectly positioned fonts for accents don't match base font

4 participants