Skip to content

Commit

Permalink
Use standard system fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Jul 24, 2024
1 parent 438019c commit 995ec5b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
6 changes: 0 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@fontsource/roboto": "^5.0.13",
"@mapbox/mapbox-gl-draw": "^1.4.3",
"@mapbox/mapbox-gl-rtl-text": "^0.2.3",
"@maplibre/maplibre-gl-geocoder": "^1.5.0",
Expand Down
17 changes: 17 additions & 0 deletions src/common/theme/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ import dimensions from './dimensions';
import components from './components';

export default (server, darkMode, direction) => useMemo(() => createTheme({
typography: {
fontFamily: [
'system-ui',
'-apple-system',
'Segoe UI',
'Roboto',
'Helvetica Neue',
'Arial',
'Noto Sans',
'Liberation Sans',
'sans-serif',
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol',
'Noto Color Emoji',
].join(','),
},
palette: palette(server, darkMode),
direction,
dimensions,
Expand Down
4 changes: 0 additions & 4 deletions src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import '@fontsource/roboto/300.css';
import '@fontsource/roboto/400.css';
import '@fontsource/roboto/500.css';
import '@fontsource/roboto/700.css';
import React from 'react';
import { createRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
Expand Down
1 change: 0 additions & 1 deletion src/map/draw/MapGeofenceEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const draw = new MapboxDraw({
filter: ['all'],
layout: {
'text-field': '{user_name}',
'text-font': ['Roboto Regular'],
'text-size': 12,
},
paint: {
Expand Down

0 comments on commit 995ec5b

Please sign in to comment.