microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.75k stars 28.72k forks source link

markdown-math: remove font variants #143372

Closed aeschli closed 2 years ago

aeschli commented 2 years ago

Our builds contain many KaTeX fonts in 3 different formats. In order to keep the number of files in our build small, can we remove some of the formats? (e.g. just use woff)

+---markdown-math +---notebook-out katex.js katex.min.css
---fonts
KaTeX_AMS-Regular.ttf
KaTeX_AMS-Regular.woff
KaTeX_AMS-Regular.woff2
KaTeX_Caligraphic-Bold.ttf
KaTeX_Caligraphic-Bold.woff
KaTeX_Caligraphic-Bold.woff2
KaTeX_Caligraphic-Regular.ttf
KaTeX_Caligraphic-Regular.woff
KaTeX_Caligraphic-Regular.woff2
KaTeX_Fraktur-Bold.ttf
KaTeX_Fraktur-Bold.woff
KaTeX_Fraktur-Bold.woff2
KaTeX_Fraktur-Regular.ttf
KaTeX_Fraktur-Regular.woff
KaTeX_Fraktur-Regular.woff2
KaTeX_Main-Bold.ttf
KaTeX_Main-Bold.woff
KaTeX_Main-Bold.woff2
KaTeX_Main-BoldItalic.ttf
KaTeX_Main-BoldItalic.woff
KaTeX_Main-BoldItalic.woff2
KaTeX_Main-Italic.ttf
KaTeX_Main-Italic.woff
KaTeX_Main-Italic.woff2
KaTeX_Main-Regular.ttf
KaTeX_Main-Regular.woff
KaTeX_Main-Regular.woff2
KaTeX_Math-BoldItalic.ttf
KaTeX_Math-BoldItalic.woff
KaTeX_Math-BoldItalic.woff2
KaTeX_Math-Italic.ttf
KaTeX_Math-Italic.woff
KaTeX_Math-Italic.woff2
KaTeX_SansSerif-Bold.ttf
KaTeX_SansSerif-Bold.woff
KaTeX_SansSerif-Bold.woff2
KaTeX_SansSerif-Italic.ttf
KaTeX_SansSerif-Italic.woff
KaTeX_SansSerif-Italic.woff2
KaTeX_SansSerif-Regular.ttf
KaTeX_SansSerif-Regular.woff
KaTeX_SansSerif-Regular.woff2
KaTeX_Script-Regular.ttf
KaTeX_Script-Regular.woff
KaTeX_Script-Regular.woff2
KaTeX_Size1-Regular.ttf
KaTeX_Size1-Regular.woff
KaTeX_Size1-Regular.woff2
KaTeX_Size2-Regular.ttf
KaTeX_Size2-Regular.woff
KaTeX_Size2-Regular.woff2
KaTeX_Size3-Regular.ttf
KaTeX_Size3-Regular.woff
KaTeX_Size3-Regular.woff2
KaTeX_Size4-Regular.ttf
KaTeX_Size4-Regular.woff
KaTeX_Size4-Regular.woff2
KaTeX_Typewriter-Regular.ttf
KaTeX_Typewriter-Regular.woff
KaTeX_Typewriter-Regular.woff2
mjbvz commented 2 years ago

Looks like woff2 is widely supported now too: https://caniuse.com/woff2

These are about half the size of the ttf files too