Skip to content

The swiss army knife of lossless video/audio editing

Explicitly set font for a consistent look on all platforms #301

Mikael Finstad3b0bdaeea943
diff --git a/src/TimelineControls.jsx b/src/TimelineControls.jsx
index 832e2ac9..adf4c798 100644
--- a/src/TimelineControls.jsx
+++ b/src/TimelineControls.jsx
@@ -56,7 +56,7 @@ const TimelineControls = memo(({
const isCutTimeManualSet = () => cutTimeManual !== undefined;
const cutTimeInputStyle = {
- background: 'white', borderRadius: 5, color: 'rgba(0, 0, 0, 0.7)', fontSize: 13, textAlign: 'center', padding: '3px 5px', marginTop: 0, marginBottom: 0, marginLeft: isStart ? 3 : 5, marginRight: isStart ? 5 : 3, border: 'none', boxSizing: 'border-box', fontFamily: 'inherit', width: 90,
+ background: 'white', borderRadius: 5, color: 'rgba(0, 0, 0, 0.7)', fontSize: 13, textAlign: 'center', padding: '1px 5px', marginTop: 0, marginBottom: 0, marginLeft: isStart ? 3 : 5, marginRight: isStart ? 5 : 3, border: 'none', boxSizing: 'border-box', fontFamily: 'inherit', width: 90, outline: 'none',
};
diff --git a/src/TopMenu.jsx b/src/TopMenu.jsx
index 6e06c43a..773b1368 100644
--- a/src/TopMenu.jsx
+++ b/src/TopMenu.jsx
@@ -48,7 +48,7 @@ const TopMenu = memo(({
{filePath && (
<Fragment>
- <div style={{ width: 60 }}>{renderOutFmt({ height: 20 })}</div>
+ {renderOutFmt({ height: 20, maxWidth: 100 })}
<Button
height={20}
diff --git a/src/fonts.css b/src/fonts.css
new file mode 100644
index 00000000..3a87de15
--- /dev/null
+++ b/src/fonts.css
@@ -0,0 +1,80 @@
+/* open-sans-300 - latin */
+@font-face {
+ font-family: 'Open Sans';
+ font-style: normal;
+ font-weight: 300;
+ src: local('Open Sans Light'), local('OpenSans-Light'),
+ url('./fonts/open-sans-v17-latin-300.woff2') format('woff2'); /* Chrome 26+, Opera 23+, Firefox 39+ */
+}
+/* open-sans-300italic - latin */
+@font-face {
+ font-family: 'Open Sans';
+ font-style: italic;
+ font-weight: 300;
+ src: local('Open Sans Light Italic'), local('OpenSans-LightItalic'),
+ url('./fonts/open-sans-v17-latin-300italic.woff2') format('woff2'); /* Chrome 26+, Opera 23+, Firefox 39+ */
+}
+/* open-sans-regular - latin */
+@font-face {
+ font-family: 'Open Sans';
+ font-style: normal;
+ font-weight: 400;
+ src: local('Open Sans Regular'), local('OpenSans-Regular'),
+ url('./fonts/open-sans-v17-latin-regular.woff2') format('woff2'); /* Chrome 26+, Opera 23+, Firefox 39+ */
+}
+/* open-sans-italic - latin */
+@font-face {
+ font-family: 'Open Sans';
+ font-style: italic;
+ font-weight: 400;
+ src: local('Open Sans Italic'), local('OpenSans-Italic'),
+ url('./fonts/open-sans-v17-latin-italic.woff2') format('woff2'); /* Chrome 26+, Opera 23+, Firefox 39+ */
+}
+/* open-sans-600 - latin */
+@font-face {
+ font-family: 'Open Sans';
+ font-style: normal;
+ font-weight: 600;
+ src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
+ url('./fonts/open-sans-v17-latin-600.woff2') format('woff2'); /* Chrome 26+, Opera 23+, Firefox 39+ */
+}
+/* open-sans-600italic - latin */
+@font-face {
+ font-family: 'Open Sans';
+ font-style: italic;
+ font-weight: 600;
+ src: local('Open Sans SemiBold Italic'), local('OpenSans-SemiBoldItalic'),
+ url('./fonts/open-sans-v17-latin-600italic.woff2') format('woff2'); /* Chrome 26+, Opera 23+, Firefox 39+ */
+}
+/* open-sans-700 - latin */
+@font-face {
+ font-family: 'Open Sans';
+ font-style: normal;
+ font-weight: 700;
+ src: local('Open Sans Bold'), local('OpenSans-Bold'),
+ url('./fonts/open-sans-v17-latin-700.woff2') format('woff2'); /* Chrome 26+, Opera 23+, Firefox 39+ */
+}
+/* open-sans-800 - latin */
+@font-face {
+ font-family: 'Open Sans';
+ font-style: normal;
+ font-weight: 800;
+ src: local('Open Sans ExtraBold'), local('OpenSans-ExtraBold'),
+ url('./fonts/open-sans-v17-latin-800.woff2') format('woff2'); /* Chrome 26+, Opera 23+, Firefox 39+ */
+}
+/* open-sans-700italic - latin */
+@font-face {
+ font-family: 'Open Sans';
+ font-style: italic;
+ font-weight: 700;
+ src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'),
+ url('./fonts/open-sans-v17-latin-700italic.woff2') format('woff2'); /* Chrome 26+, Opera 23+, Firefox 39+ */
+}
+/* open-sans-800italic - latin */
+@font-face {
+ font-family: 'Open Sans';
+ font-style: italic;
+ font-weight: 800;
+ src: local('Open Sans ExtraBold Italic'), local('OpenSans-ExtraBoldItalic'),
+ url('./fonts/open-sans-v17-latin-800italic.woff2') format('woff2'); /* Chrome 26+, Opera 23+, Firefox 39+ */
+}
\ No newline at end of file
diff --git a/src/fonts/open-sans-v17-latin-300.woff2 b/src/fonts/open-sans-v17-latin-300.woff2
new file mode 100644
index 00000000..7bf901c2
Binary files /dev/null and b/src/fonts/open-sans-v17-latin-300.woff2 differ
diff --git a/src/fonts/open-sans-v17-latin-300italic.woff2 b/src/fonts/open-sans-v17-latin-300italic.woff2
new file mode 100644
index 00000000..6d4334ee
Binary files /dev/null and b/src/fonts/open-sans-v17-latin-300italic.woff2 differ
diff --git a/src/fonts/open-sans-v17-latin-600.woff2 b/src/fonts/open-sans-v17-latin-600.woff2
new file mode 100644
index 00000000..5c5d54e2
Binary files /dev/null and b/src/fonts/open-sans-v17-latin-600.woff2 differ
diff --git a/src/fonts/open-sans-v17-latin-600italic.woff2 b/src/fonts/open-sans-v17-latin-600italic.woff2
new file mode 100644
index 00000000..c2450f3e
Binary files /dev/null and b/src/fonts/open-sans-v17-latin-600italic.woff2 differ
diff --git a/src/fonts/open-sans-v17-latin-700.woff2 b/src/fonts/open-sans-v17-latin-700.woff2
new file mode 100644
index 00000000..3a38286c
Binary files /dev/null and b/src/fonts/open-sans-v17-latin-700.woff2 differ
diff --git a/src/fonts/open-sans-v17-latin-700italic.woff2 b/src/fonts/open-sans-v17-latin-700italic.woff2
new file mode 100644
index 00000000..51538133
Binary files /dev/null and b/src/fonts/open-sans-v17-latin-700italic.woff2 differ
diff --git a/src/fonts/open-sans-v17-latin-800.woff2 b/src/fonts/open-sans-v17-latin-800.woff2
new file mode 100644
index 00000000..86a8a875
Binary files /dev/null and b/src/fonts/open-sans-v17-latin-800.woff2 differ
diff --git a/src/fonts/open-sans-v17-latin-800italic.woff2 b/src/fonts/open-sans-v17-latin-800italic.woff2
new file mode 100644
index 00000000..82a1f00d
Binary files /dev/null and b/src/fonts/open-sans-v17-latin-800italic.woff2 differ
diff --git a/src/fonts/open-sans-v17-latin-italic.woff2 b/src/fonts/open-sans-v17-latin-italic.woff2
new file mode 100644
index 00000000..10031c02
Binary files /dev/null and b/src/fonts/open-sans-v17-latin-italic.woff2 differ
diff --git a/src/fonts/open-sans-v17-latin-regular.woff2 b/src/fonts/open-sans-v17-latin-regular.woff2
new file mode 100644
index 00000000..e9f58b77
Binary files /dev/null and b/src/fonts/open-sans-v17-latin-regular.woff2 differ
diff --git a/src/index.jsx b/src/index.jsx
index 3d28244f..36ad2285 100644
--- a/src/index.jsx
+++ b/src/index.jsx
@@ -2,6 +2,8 @@ import React, { Suspense } from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './i18n';
+
+import './fonts.css';
import './main.css';
diff --git a/src/main.css b/src/main.css
index 9f87de94..66a7337a 100644
--- a/src/main.css
+++ b/src/main.css
@@ -1,5 +1,6 @@
html {
- font-family: sans-serif;
+ font-family: 'Open Sans', sans-serif;
+ font-size: 16px;
}
body {