Skip to content

Commit 9806424

Browse files
authored
fix: necessary font changes (danny-avila#1818)
* fix: necessary font changes * chore: minor bump
1 parent fe0ef2c commit 9806424

37 files changed

+177
-46
lines changed

api/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@librechat/backend",
3-
"version": "0.6.9",
3+
"version": "0.6.10",
44
"description": "",
55
"scripts": {
66
"start": "echo 'please run this from the root directory'",

client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@librechat/frontend",
3-
"version": "0.6.9",
3+
"version": "0.6.10",
44
"description": "",
55
"type": "module",
66
"scripts": {

client/public/fonts/Inter-Bold.woff2

108 KB
Binary file not shown.
116 KB
Binary file not shown.
112 KB
Binary file not shown.
106 KB
Binary file not shown.
109 KB
Binary file not shown.
115 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-55.4 KB
Binary file not shown.
-54.7 KB
Binary file not shown.
-55.1 KB
Binary file not shown.
-51.8 KB
Binary file not shown.
-33.3 KB
Binary file not shown.

client/public/fonts/soehne-buch.woff2

-32.6 KB
Binary file not shown.
-39.5 KB
Binary file not shown.
-37.1 KB
Binary file not shown.
-37.8 KB
Binary file not shown.
-34.9 KB
Binary file not shown.
-27.5 KB
Binary file not shown.
-26.8 KB
Binary file not shown.
-27.6 KB
Binary file not shown.

client/src/components/Chat/Footer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function Footer() {
1717
rel="noreferrer"
1818
className="underline"
1919
>
20-
{config?.appTitle || 'LibreChat'} v0.6.9
20+
{config?.appTitle || 'LibreChat'} v0.6.10
2121
</a>
2222
{' - '} {localize('com_ui_new_footer')}
2323
</>

client/src/components/Chat/Messages/Content/Markdown.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const p = memo(({ children }: { children: React.ReactNode }) => {
4141
return <p className="mb-2 whitespace-pre-wrap">{children}</p>;
4242
});
4343

44-
const cursor = ' ';
44+
const cursor = ' ';
4545
const Markdown = memo(({ content, message, showCursor }: TContentProps) => {
4646
const { isSubmitting, latestMessage } = useChatContext();
4747
const LaTeXParsing = useRecoilValue<boolean>(store.LaTeXParsing);

client/src/components/Chat/Messages/Content/MessageContent.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const DisplayMessage = ({ text, isCreatedByUser, message, showCursor }: TDisplay
5757
))}
5858
<div
5959
className={cn(
60+
showCursor && !!text?.length ? 'result-streaming' : '',
6061
'markdown prose dark:prose-invert light w-full break-words',
6162
isCreatedByUser ? 'whitespace-pre-wrap dark:text-gray-20' : 'dark:text-gray-70',
6263
)}

client/src/components/Input/Footer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function Footer() {
1717
rel="noreferrer"
1818
className="underline"
1919
>
20-
{config?.appTitle || 'LibreChat'} v0.6.9
20+
{config?.appTitle || 'LibreChat'} v0.6.10
2121
</a>
2222
{' - '}. {localize('com_ui_pay_per_call')}
2323
</>

client/src/style.css

+155-29
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,111 @@
1010

1111
@font-face {
1212
font-display: swap;
13-
font-family: Signifier;
13+
font-family: Inter;
1414
font-style: normal;
1515
font-weight: 400;
16-
src: url("$fonts/signifier-light.woff2") format("woff2")
16+
src: url("$fonts/Inter-Regular.woff2") format("woff2");
17+
size-adjust: 94%;
1718
}
1819

1920
@font-face {
2021
font-display: swap;
21-
font-family: Signifier;
22+
font-family: Inter;
2223
font-style: italic;
2324
font-weight: 400;
24-
src: url("$fonts/signifier-light-italic.woff2") format("woff2")
25+
src: url("$fonts/Inter-Italic.woff2") format("woff2");
26+
size-adjust: 94%;
2527
}
2628

2729
@font-face {
2830
font-display: swap;
29-
font-family: Signifier;
31+
font-family: Inter;
3032
font-style: normal;
31-
font-weight: 700;
32-
src: url("$fonts/signifier-bold.woff2") format("woff2")
33+
font-weight: 500;
34+
src: url("$fonts/Inter-SemiBold.woff2") format("woff2");
35+
size-adjust: 94%;
36+
}
37+
38+
@font-face {
39+
font-display: swap;
40+
font-family: Inter;
41+
font-style: italic;
42+
font-weight: 500;
43+
src: url("$fonts/Inter-SemiBoldItalic.woff2") format("woff2");
44+
size-adjust: 94%;
45+
}
46+
47+
@font-face {
48+
font-display: swap;
49+
font-family: Inter;
50+
font-style: normal;
51+
font-weight: 600;
52+
src: url("$fonts/Inter-Bold.woff2") format("woff2");
53+
size-adjust: 94%;
3354
}
3455

3556
@font-face {
3657
font-display: swap;
37-
font-family: Signifier;
58+
font-family: Inter;
3859
font-style: italic;
60+
font-weight: 600;
61+
src: url("$fonts/Inter-BoldItalic.woff2") format("woff2");
62+
size-adjust: 94%;
63+
}
64+
65+
@font-face {
66+
font-display: swap;
67+
font-family: Roboto Mono;
68+
font-style: normal;
69+
font-weight: 400;
70+
src: url("$fonts/roboto-mono-latin-400-normal.woff2") format("woff2")
71+
}
72+
73+
@font-face {
74+
font-display: swap;
75+
font-family: Roboto Mono;
76+
font-style: normal;
3977
font-weight: 700;
40-
src: url("$fonts/signifier-bold-italic.woff2") format("woff2")
78+
src: url("$fonts/roboto-mono-latin-700-normal.woff2") format("woff2")
4179
}
4280

4381
@font-face {
82+
font-display: swap;
83+
font-family: Roboto Mono;
84+
font-style: italic;
85+
font-weight: 400;
86+
src: url("$fonts/roboto-mono-latin-400-italic.woff2") format("woff2")
87+
}
88+
89+
/*
90+
91+
The default ChatGPT fonts, according to OpenAI's brand guidelines, are proprietary and require appropriate font license according to your use case.
92+
93+
They can be purchased here: https://klim.co.nz/buy/soehne/
94+
95+
The fonts in question are (9 total):
96+
97+
> - Söhne (Buch Kursiv, Buch, Halbfett Kursiv, Halbfett, Kraftig Kursiv, Kraftig, Mono Buch Kursiv, Mono Buch, Mono Halbfett)
98+
99+
If you have purchased a license, you can use the commented-out `@font-face` declarations below to include them in your project.
100+
101+
Step 1: Buy whatever license applies to you and allows use of `.woff2` font files (likely web font license).
102+
Step 2: Place them in ./client/public/fonts/ directory.
103+
Step 3: Replace the current `fontFamily` config in ./client/tailwind.config.cjs with the following:
104+
105+
```
106+
fontFamily: {
107+
sans: ['Söhne', 'sans-serif'],
108+
mono: ['Söhne Mono', 'monospace'],
109+
},
110+
```
111+
112+
Step 4: Uncomment all Söhne font-face declarations below.
113+
Step 5: rebuild frontend code: `npm run frontend` (or rebuild docker).
114+
115+
*/
116+
117+
/* @font-face {
44118
font-display: swap;
45119
font-family: Söhne;
46120
font-style: normal;
@@ -110,7 +184,7 @@
110184
font-style: italic;
111185
font-weight: 400;
112186
src: url("$fonts/soehne-mono-buch-kursiv.woff2") format("woff2")
113-
}
187+
} */
114188

115189
/* * {
116190
box-sizing: border-box;
@@ -1311,25 +1385,6 @@ html {
13111385
animation: spin 1s linear infinite;
13121386
}
13131387

1314-
.result-streaming {
1315-
-webkit-animation: blink 1s steps(5, start) infinite;
1316-
animation: blink 1s steps(5, start) infinite;
1317-
content:"⬤ ";
1318-
margin-left: 0.25rem;
1319-
vertical-align: baseline;
1320-
}
1321-
1322-
/* .result-streaming>:not(ol):not(ul):not(pre):last-child:after,
1323-
.result-streaming>ol:last-child li:last-child:after,
1324-
.result-streaming>pre:last-child code:after,
1325-
.result-streaming>ul:last-child li:last-child:after {
1326-
-webkit-animation:blink 1s steps(5,start) infinite;
1327-
animation:blink 1s steps(5,start) infinite;
1328-
content:"▋";
1329-
margin-left:.25rem;
1330-
vertical-align:baseline
1331-
} */
1332-
13331388
.form-input,
13341389
.form-multiselect,
13351390
.form-select,
@@ -1870,3 +1925,74 @@ html {
18701925
--tw-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
18711926
--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);
18721927
}
1928+
1929+
.result-streaming>:not(ol):not(ul):not(pre):last-child:after,
1930+
.result-streaming>pre:last-child code:after {
1931+
display: inline-block; /* Add this line */
1932+
content:"⬤";
1933+
width: 12px;
1934+
height: 12px;
1935+
font-family:system-ui,Inter,Söhne Circle,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
1936+
line-height:normal;
1937+
margin-left:.25rem;
1938+
vertical-align:middle;
1939+
font-size: 0.5rem;
1940+
}
1941+
1942+
.result-streaming>pre:last-child code {
1943+
background: url('path-to-circle-image') no-repeat right center;
1944+
padding-right: 1em; /* Adjust as necessary */
1945+
}
1946+
1947+
@supports (selector(:has(*))) {
1948+
.result-streaming>ol:last-child>li:last-child>ol:last-child>li:last-child:after,
1949+
.result-streaming>ol:last-child>li:last-child>ol:last-child>li:last-child>ol:last-child>li:last-child:after,
1950+
.result-streaming>ol:last-child>li:last-child>ol:last-child>li:last-child>ul:last-child>li:last-child:after,
1951+
.result-streaming>ol:last-child>li:last-child>ul:last-child>li:last-child:after,
1952+
.result-streaming>ol:last-child>li:last-child>ul:last-child>li:last-child>ol:last-child>li:last-child:after,
1953+
.result-streaming>ol:last-child>li:last-child>ul:last-child>li:last-child>ul:last-child>li:last-child:after,
1954+
.result-streaming>ul:last-child>li:last-child>ol:last-child>li:last-child:after,
1955+
.result-streaming>ul:last-child>li:last-child>ol:last-child>li:last-child>ol:last-child>li:last-child:after,
1956+
.result-streaming>ul:last-child>li:last-child>ol:last-child>li:last-child>ul:last-child>li:last-child:after,
1957+
.result-streaming>ul:last-child>li:last-child>ul:last-child>li:last-child:after,
1958+
.result-streaming>ul:last-child>li:last-child>ul:last-child>li:last-child>ol:last-child>li:last-child:after,
1959+
.result-streaming>ul:last-child>li:last-child>ul:last-child>li:last-child>ul:last-child>li:last-child:after,
1960+
.result-streaming>ul:last-child>li:last-child[*|\:not-has\(]:after {
1961+
content:"⬤";
1962+
font-family:system-ui,Inter,Söhne Circle,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
1963+
line-height:normal;
1964+
margin-left:.25rem;
1965+
vertical-align:baseline
1966+
}
1967+
.result-streaming>ul:last-child>li:last-child:not(:has(*>li)):after {
1968+
content:"⬤";
1969+
font-family:system-ui,Inter,Söhne Circle,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
1970+
line-height:normal;
1971+
margin-left:.25rem;
1972+
vertical-align:baseline
1973+
}
1974+
.result-streaming>ol:last-child>li:last-child[*|\:not-has\(]:after {
1975+
content:"⬤";
1976+
font-family:system-ui,Inter,Söhne Circle,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
1977+
line-height:normal;
1978+
margin-left:.25rem;
1979+
vertical-align:baseline
1980+
}
1981+
.result-streaming>ol:last-child>li:last-child:not(:has(*>li)):after {
1982+
content:"⬤";
1983+
font-family:system-ui,Inter,Söhne Circle,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
1984+
line-height:normal;
1985+
margin-left:.25rem;
1986+
vertical-align:baseline
1987+
}
1988+
}
1989+
@supports not (selector(:has(*))) {
1990+
.result-streaming>ol:last-child>li:last-child:after,
1991+
.result-streaming>ul:last-child>li:last-child:after {
1992+
content:"⬤";
1993+
font-family:system-ui,Inter,Söhne Circle,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
1994+
line-height:normal;
1995+
margin-left:.25rem;
1996+
vertical-align:baseline
1997+
}
1998+
}

client/tailwind.config.cjs

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ module.exports = {
1010
// 'gpt-dark-gray': '#343541',
1111
// },
1212
fontFamily: {
13-
sans: ['Söhne', 'sans-serif'],
14-
mono: ['Söhne Mono', 'monospace'],
13+
sans: ['Inter', 'sans-serif'],
14+
mono: ['Roboto Mono', 'monospace'],
1515
},
16+
// fontFamily: {
17+
// sans: ['Söhne', 'sans-serif'],
18+
// mono: ['Söhne Mono', 'monospace'],
19+
// },
1620
extend: {
1721
width: {
1822
'authPageWidth': '370px',

e2e/jestSetup.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// v0.6.9
1+
// v0.6.10
22
// See .env.test.example for an example of the '.env.test' file.
33
require('dotenv').config({ path: './e2e/.env.test' });

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- v0.6.9 -->
1+
<!-- v0.6.10 -->
22
<!DOCTYPE html>
33
<html>
44
<head>

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "LibreChat",
3-
"version": "0.6.9",
3+
"version": "0.6.10",
44
"description": "",
55
"workspaces": [
66
"api",

packages/data-provider/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "librechat-data-provider",
3-
"version": "0.4.1",
3+
"version": "0.4.2",
44
"description": "data services for librechat apps",
55
"main": "dist/index.js",
66
"module": "dist/index.es.js",

packages/data-provider/src/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ export enum Constants {
357357
/**
358358
* Key for the app's version.
359359
*/
360-
VERSION = 'v0.6.9',
360+
VERSION = 'v0.6.10',
361361
/**
362362
* Key for the Custom Config's version (librechat.yaml).
363363
*/

prettier.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// v0.6.9
1+
// v0.6.10
22
module.exports = {
33
tailwindConfig: './client/tailwind.config.cjs',
44
printWidth: 100,

0 commit comments

Comments
 (0)