Skip to content

Commit

Permalink
fix(fonts): correct width of \cong glyph, fix \boldsymbol{\cong} (#3206)
Browse files Browse the repository at this point in the history
* fix(fonts): correct width of \cong glyph

Fixes #2199

* Update metrics

* Update fonts

* Fix \boldsymbol{\cong}

* SetWidth instead of SetRBearing

* Update metrics

Co-authored-by: ylemkimon <y@ylem.kim>
  • Loading branch information
edemaine and ylemkimon committed Oct 30, 2021
1 parent 005ca79 commit 35db4ff
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 1 deletion.
Binary file modified fonts/KaTeX_Main-Bold.ttf
Binary file not shown.
Binary file modified fonts/KaTeX_Main-Bold.woff
Binary file not shown.
Binary file modified fonts/KaTeX_Main-Bold.woff2
Binary file not shown.
Binary file modified fonts/KaTeX_Main-Regular.ttf
Binary file not shown.
Binary file modified fonts/KaTeX_Main-Regular.woff
Binary file not shown.
Binary file modified fonts/KaTeX_Main-Regular.woff2
Binary file not shown.
3 changes: 2 additions & 1 deletion src/fontMetricsData.js
Expand Up @@ -582,6 +582,7 @@ export default {
"8764": [-0.10889, 0.39111, 0, 0, 0.89444],
"8768": [0.19444, 0.69444, 0, 0, 0.31944],
"8771": [0.00222, 0.50222, 0, 0, 0.89444],
"8773": [0.027, 0.638, 0, 0, 0.894],
"8776": [0.02444, 0.52444, 0, 0, 0.89444],
"8781": [0.00222, 0.50222, 0, 0, 0.89444],
"8801": [0.00222, 0.50222, 0, 0, 0.89444],
Expand Down Expand Up @@ -1099,7 +1100,7 @@ export default {
"8764": [-0.13313, 0.36687, 0, 0, 0.77778],
"8768": [0.19444, 0.69444, 0, 0, 0.27778],
"8771": [-0.03625, 0.46375, 0, 0, 0.77778],
"8773": [-0.022, 0.589, 0, 0, 1.0],
"8773": [-0.022, 0.589, 0, 0, 0.778],
"8776": [-0.01688, 0.48312, 0, 0, 0.77778],
"8781": [-0.03625, 0.46375, 0, 0, 0.77778],
"8784": [-0.133, 0.673, 0, 0, 0.778],
Expand Down
2 changes: 2 additions & 0 deletions src/fonts/makeFF
Expand Up @@ -1311,6 +1311,7 @@ $extra{'Main-Regular'} = {
'Select(0u3D)','Copy()',
'Select(0u2245)',
'PasteWithOffset(0,-111)',
'SetWidth(778)',
],

bowtie => [
Expand Down Expand Up @@ -1607,6 +1608,7 @@ $extra{'Main-Bold'} = {
'Select(0u3D)','Copy()',
'Select(0u2245)',
'PasteWithOffset(0,-136)',
'SetWidth(894)',
],

bowtie => [
Expand Down
3 changes: 3 additions & 0 deletions src/metrics/extract_ttfs.py
Expand Up @@ -44,6 +44,9 @@
u"\u21aa": None, # \hookrightarrow
u"\u21cc": None, # \rightleftharpoons
},
"Main-Bold": {
u"\u2245": None, # \cong
},
"Size1-Regular": {
u"\u222c": u"\u222b", # \iint, based on \int
u"\u222d": u"\u222b", # \iiint, based on \int
Expand Down

0 comments on commit 35db4ff

Please sign in to comment.