Skip to content

Commit

Permalink
Use Noto Sans font
Browse files Browse the repository at this point in the history
  • Loading branch information
oobabooga committed Sep 13, 2023
1 parent 1954848 commit 9f199c7
Show file tree
Hide file tree
Showing 44 changed files with 179 additions and 12 deletions.
Binary file added css/NotoSans/NotoSans-Black.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Black.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-BlackItalic.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-BlackItalic.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Bold.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Bold.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-BoldItalic.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-BoldItalic.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-ExtraBold.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-ExtraBold.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-ExtraBoldItalic.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-ExtraBoldItalic.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-ExtraLight.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-ExtraLight.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-ExtraLightItalic.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-ExtraLightItalic.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Italic.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Italic.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Light.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Light.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-LightItalic.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-LightItalic.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Medium.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Medium.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-MediumItalic.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-MediumItalic.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Regular.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Regular.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-SemiBold.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-SemiBold.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-SemiBoldItalic.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-SemiBoldItalic.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Thin.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-Thin.woff2
Binary file not shown.
Binary file added css/NotoSans/NotoSans-ThinItalic.woff
Binary file not shown.
Binary file added css/NotoSans/NotoSans-ThinItalic.woff2
Binary file not shown.
166 changes: 166 additions & 0 deletions css/NotoSans/stylesheet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
/*
Copied from https://github.com/SillyTavern/SillyTavern/tree/6c8bd06308c69d51e2eb174541792a870a83d2d6/public/webfonts/NotoSans
*/

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-Black.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-Black.woff') format('woff');
font-weight: 900;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-ExtraBoldItalic.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-ExtraBoldItalic.woff') format('woff');
font-weight: bold;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-BlackItalic.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-BlackItalic.woff') format('woff');
font-weight: 900;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-ExtraBold.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-ExtraBold.woff') format('woff');
font-weight: bold;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-ThinItalic.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-ThinItalic.woff') format('woff');
font-weight: 100;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-BoldItalic.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-BoldItalic.woff') format('woff');
font-weight: bold;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-Bold.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-Bold.woff') format('woff');
font-weight: bold;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-LightItalic.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-LightItalic.woff') format('woff');
font-weight: 300;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-Italic.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-Italic.woff') format('woff');
font-weight: normal;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-ExtraLightItalic.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-ExtraLightItalic.woff') format('woff');
font-weight: 200;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-Light.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-Light.woff') format('woff');
font-weight: 300;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-ExtraLight.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-ExtraLight.woff') format('woff');
font-weight: 200;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-Medium.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-Medium.woff') format('woff');
font-weight: 500;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-Regular.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-MediumItalic.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-MediumItalic.woff') format('woff');
font-weight: 500;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-SemiBoldItalic.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-SemiBoldItalic.woff') format('woff');
font-weight: 600;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-SemiBold.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-SemiBold.woff') format('woff');
font-weight: 600;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Noto Sans';
src: url('file/css/NotoSans/NotoSans-Thin.woff2') format('woff2'),
url('file/css/NotoSans/NotoSans-Thin.woff') format('woff');
font-weight: 100;
font-style: normal;
font-display: swap;
}

5 changes: 2 additions & 3 deletions css/chat_style-TheEncrypted777.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
grid-template-columns: 60px minmax(0, 1fr);
padding-bottom: 28px;
font-size: 18px;
/*Change 'Quicksand' to a font you like or leave it*/
font-family: Quicksand, Arial, sans-serif;
font-family: 'Noto Sans', Arial, sans-serif;
line-height: 1.428571429;
}

Expand Down Expand Up @@ -105,7 +104,7 @@
grid-template-columns: 60px minmax(0, 1fr);
padding-bottom: 25px;
font-size: 15px;
font-family: Helvetica, Arial, sans-serif;
font-family: 'Noto Sans', Helvetica, Arial, sans-serif;
line-height: 1.428571429;
}

Expand Down
6 changes: 3 additions & 3 deletions css/chat_style-cai-chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
grid-template-columns: 60px minmax(0, 1fr);
padding-bottom: 25px;
font-size: 15px;
font-family: Helvetica, Arial, sans-serif;
line-height: 1.3333;
font-family: 'Noto Sans', Helvetica, Arial, sans-serif;
line-height: 23px !important;
}

.circle-you {
Expand Down Expand Up @@ -46,7 +46,7 @@
.message-body p {
margin-bottom: 0 !important;
font-size: 15px !important;
line-height: 1.3333 !important;
line-height: 23px !important;
}

.dark .message-body p em {
Expand Down
2 changes: 1 addition & 1 deletion css/chat_style-messenger.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.message {
padding-bottom: 25px;
font-size: 15px;
font-family: Helvetica, Arial, sans-serif;
font-family: 'Noto Sans', Helvetica, Arial, sans-serif;
line-height: 1.428571429;
}

Expand Down
2 changes: 1 addition & 1 deletion css/chat_style-wpp.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.message {
padding-bottom: 25px;
font-size: 15px;
font-family: Helvetica, Arial, sans-serif;
font-family: 'Noto Sans', Helvetica, Arial, sans-serif;
line-height: 1.428571429;
}

Expand Down
2 changes: 1 addition & 1 deletion css/html_instruct_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
grid-template-columns: 60px 1fr;
padding-bottom: 25px;
font-size: 15px;
font-family: Helvetica, Arial, sans-serif;
font-family: 'Noto Sans', Helvetica, Arial, sans-serif;
line-height: 1.428571429;
}

Expand Down
2 changes: 1 addition & 1 deletion css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
#show-controls {
position: absolute;
background-color: transparent;
left: calc(100% - 175px);
left: calc(100% - 178px);
border: 0px;
z-index: 1000;
}
Expand Down
6 changes: 4 additions & 2 deletions modules/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
from modules import shared


with open(Path(__file__).resolve().parent / '../css/main.css', 'r') as f:
with open(Path(__file__).resolve().parent / '../css/NotoSans/stylesheet.css', 'r') as f:
css = f.read()
with open(Path(__file__).resolve().parent / '../css/main.css', 'r') as f:
css += f.read()
with open(Path(__file__).resolve().parent / '../js/main.js', 'r') as f:
js = f.read()
with open(Path(__file__).resolve().parent / '../js/save_files.js', 'r') as f:
Expand All @@ -24,7 +26,7 @@
save_symbol = '💾'

theme = gr.themes.Default(
font=['Helvetica', 'ui-sans-serif', 'system-ui', 'sans-serif'],
font=['Noto Sans', 'Helvetica', 'ui-sans-serif', 'system-ui', 'sans-serif'],
font_mono=['IBM Plex Mono', 'ui-monospace', 'Consolas', 'monospace'],
).set(
border_color_primary='#c5c5d2',
Expand Down

0 comments on commit 9f199c7

Please sign in to comment.