Skip to content

Commit

Permalink
katex math font
Browse files Browse the repository at this point in the history
  • Loading branch information
nbonamy committed Nov 2, 2024
1 parent 89210f2 commit 3f62d0c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
Binary file added assets/STIXTwoMath-Regular.otf
Binary file not shown.
Binary file added assets/STIXTwoMath-Regular.ttf
Binary file not shown.
Binary file added assets/STIXTwoMath-Regular.woff2
Binary file not shown.
7 changes: 7 additions & 0 deletions css/index.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

@font-face {
font-family: 'STIX Two Math';
src: url(../assets/STIXTwoMath-Regular.woff2) format('woff2'),
url(../assets/STIXTwoMath-Regular.otf) format('opentype'),
url(../assets/STIXTwoMath-Regular.ttf) format('truetype');
}

:root {

--background-color: #fff;
Expand Down
6 changes: 6 additions & 0 deletions src/components/MessageItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,15 @@ defineExpose({
</style>
<style>
.message .body .katex-mathml {
font-family: 'STIX Two Math';
}
.message .body .katex-html {
display: none;
}
</style>
<style scoped>
Expand Down

0 comments on commit 3f62d0c

Please sign in to comment.