Skip to content

Commit

Permalink
Use JetBrains Sans as default font
Browse files Browse the repository at this point in the history
  • Loading branch information
zoobestik committed May 30, 2023
1 parent f182a0a commit f539511
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Project Settings
dokka_version=1.9.0-SNAPSHOT
dokka_version=1.9.99-SNAPSHOT
org.jetbrains.dokka.javaToolchain.mainCompiler=8
org.jetbrains.dokka.javaToolchain.testLauncher=8
org.jetbrains.dokka.kotlinLanguageLevel=1.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ class StylesInstaller(private val dokkaContext: DokkaContext) : PageTransformer
"styles/style.css",
"styles/main.css",
"styles/prism.css",
"styles/logo-styles.css"
"styles/logo-styles.css",
"styles/font-jb-sans-auto.css"
)

override fun invoke(input: RootPageNode): RootPageNode =
Expand Down
32 changes: 32 additions & 0 deletions plugins/base/src/main/resources/dokka/styles/font-jb-sans-auto.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* Light weight */
@font-face {
font-family: 'JetBrains Sans';
src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Light.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Light.woff') format('woff');
font-weight: 300;
font-style: normal;
}
/* Regular weight */
@font-face {
font-family: 'JetBrains Sans';
src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Regular.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Regular.woff') format('woff');
font-weight: 400;
font-style: normal;
}
/* SemiBold weight */
@font-face {
font-family: 'JetBrains Sans';
src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-SemiBold.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-SemiBold.woff') format('woff');
font-weight: 600;
font-style: normal;
}

@supports (font-variation-settings: normal) {
@font-face {
font-family: 'JetBrains Sans';
src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans.woff2') format('woff2 supports variations'),
url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans.woff2') format('woff2-variations'),
url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans.woff') format('woff-variations');
font-weight: 100 900;
font-style: normal;
}
}
11 changes: 8 additions & 3 deletions plugins/base/src/main/resources/dokka/styles/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import url('./font-jb-sans-auto.css');
@import url('https://fonts.googleapis.com/css?family=JetBrains+Mono');

/* --- root styles --- */
Expand All @@ -24,7 +25,7 @@
--background-color: var(--default-white);
--dark-mode-and-search-icon-color: var(--default-white);
--color-dark: #27282c;
--default-font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Arial, sans-serif;
--default-font-family: JetBrains Sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI,Roboto, Oxygen, Ubuntu,Cantarell, Droid Sans, Helvetica Neue, Arial, sans-serif;
--default-monospace-font-family: JetBrains Mono, SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
--default-font-size: 15px;
--average-color: var(--color-dark);
Expand Down Expand Up @@ -144,7 +145,7 @@ pre {

dt {
color: #444;
font-weight: 700;
font-weight: 530;
}

img {
Expand Down Expand Up @@ -482,6 +483,10 @@ td:first-child {
margin: 30px 0;
border-top: 3px double #8c8b8b;
}

.main-content :is(h1, h2) {
font-weight: 530;
}
/* /--- Main Content styles --- */

/* /--- Breadcrumbs styles --- */
Expand Down Expand Up @@ -1428,7 +1433,7 @@ div.runnablesample {
display: flex;
align-items: center;
color: #fff;
font-weight: 700;
font-weight: 530;
}

.library-name--link::before {
Expand Down

0 comments on commit f539511

Please sign in to comment.