Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Open Sans font files #214

Merged
merged 5 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
604 changes: 604 additions & 0 deletions src/aics-image-viewer/assets/fonts/open-sans/open-sans-500.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
604 changes: 604 additions & 0 deletions src/aics-image-viewer/assets/fonts/open-sans/open-sans-700.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
604 changes: 604 additions & 0 deletions src/aics-image-viewer/assets/fonts/open-sans/open-sans-regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
316 changes: 0 additions & 316 deletions src/aics-image-viewer/assets/fonts/overpass-v2-latin-300.svg

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
310 changes: 0 additions & 310 deletions src/aics-image-viewer/assets/fonts/overpass-v2-latin-600.svg

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
82 changes: 34 additions & 48 deletions src/aics-image-viewer/assets/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,64 +1,50 @@
.cell-viewer-app {
height: 100%;
}
/** TODO: Remove and replace with just Open Sans. */
/* merriweather-sans-regular - latin */

@font-face {
font-family: "Merriweather Sans";
font-family: "Open Sans Local";
font-style: normal;
font-weight: 400;
src: url("../aics-image-viewer/assets/fonts/merriweather-sans-v9-latin-regular.eot"); /* IE9 Compat Modes */
src: local("Merriweather Sans"), local("MerriweatherSans-Regular"),
url("../aics-image-viewer/assets/fonts/merriweather-sans-v9-latin-regular.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("../aics-image-viewer/assets/fonts/merriweather-sans-v9-latin-regular.woff2") format("woff2"),
/* Super Modern Browsers */ url("../aics-image-viewer/assets/fonts/merriweather-sans-v9-latin-regular.woff")
src: url("../aics-image-viewer/assets/fonts/open-sans/open-sans-regular.eot"); /* IE9 Compat Modes */
src:
/* IE6-IE8 */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-regular.eot?#iefix")
format("embedded-opentype"),
/* Super Modern Browsers */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-regular.woff2")
format("woff2"),
/* Pretty Modern Browsers */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-regular.woff")
format("woff"),
/* Modern Browsers */
/* url('../aics-image-viewer/assets/fonts/merriweather-sans-v9-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url("../aics-image-viewer/assets/fonts/merriweather-sans-v9-latin-regular.svg#MerriweatherSans") format("svg"); /* Legacy iOS */
/* Safari, Android, iOS */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-regular.ttf")
format("truetype"),
/* Legacy iOS */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-regular.svg#svgFontName") format("svg");
}
/* merriweather-sans-700 - latin */
@font-face {
font-family: "Merriweather Sans";
font-style: normal;
font-weight: 700;
src: url("../aics-image-viewer/assets/fonts/merriweather-sans-v9-latin-700.eot"); /* IE9 Compat Modes */
src: local("Merriweather Sans Bold"), local("MerriweatherSans-Bold"),
url("../aics-image-viewer/assets/fonts/merriweather-sans-v9-latin-700.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("../aics-image-viewer/assets/fonts/merriweather-sans-v9-latin-700.woff2") format("woff2"),
/* Super Modern Browsers */ url("../aics-image-viewer/assets/fonts/merriweather-sans-v9-latin-700.woff")
format("woff"),
/* Modern Browsers */
/* url('../aics-image-viewer/assets/fonts/merriweather-sans-v9-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
url("../aics-image-viewer/assets/fonts/merriweather-sans-v9-latin-700.svg#MerriweatherSans") format("svg"); /* Legacy iOS */
}
/* overpass-300 - latin */

@font-face {
font-family: "Overpass";
font-family: "Open Sans Local";
font-style: normal;
font-weight: 300;
src: url("../aics-image-viewer/assets/fonts/overpass-v2-latin-300.eot"); /* IE9 Compat Modes */
src: local("Overpass Light"), local("Overpass-Light"),
url("../aics-image-viewer/assets/fonts/overpass-v2-latin-300.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("../aics-image-viewer/assets/fonts/overpass-v2-latin-300.woff2") format("woff2"),
/* Super Modern Browsers */ url("../aics-image-viewer/assets/fonts/overpass-v2-latin-300.woff") format("woff"),
/* Modern Browsers */
/* url('../aics-image-viewer/assets/fonts/overpass-v2-latin-300.ttf') format('truetype'), /* Safari, Android, iOS */
url("../aics-image-viewer/assets/fonts/overpass-v2-latin-300.svg#Overpass") format("svg"); /* Legacy iOS */
font-weight: 500;
src: url("../aics-image-viewer/assets/fonts/open-sans/open-sans-500.eot"); /* IE9 Compat Modes */
src:
/* IE6-IE8 */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-500.eot?#iefix")
format("embedded-opentype"),
/* Super Modern Browsers */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-500.woff2") format("woff2"),
/* Pretty Modern Browsers */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-500.woff") format("woff"),
/* Safari, Android, iOS */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-500.ttf") format("truetype"),
/* Legacy iOS */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-500.svg#svgFontName") format("svg");
}
/* overpass-600 - latin */

@font-face {
font-family: "Overpass";
font-family: "Open Sans Local";
font-style: normal;
font-weight: 600;
src: url("../aics-image-viewer/assets/fonts/overpass-v2-latin-600.eot"); /* IE9 Compat Modes */
src: local("Overpass SemiBold"), local("Overpass-SemiBold"),
url("../aics-image-viewer/assets/fonts/overpass-v2-latin-600.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("../aics-image-viewer/assets/fonts/overpass-v2-latin-600.woff2") format("woff2"),
/* Super Modern Browsers */ url("../aics-image-viewer/assets/fonts/overpass-v2-latin-600.woff") format("woff"),
/* Modern Browsers */
/* url('../aics-image-viewer/assets/fonts/overpass-v2-latin-600.ttf') format('truetype'), /* Safari, Android, iOS */
url("../aics-image-viewer/assets/fonts/overpass-v2-latin-600.svg#Overpass") format("svg"); /* Legacy iOS */
font-weight: 700;
src: url("../aics-image-viewer/assets/fonts/open-sans/open-sans-700.eot"); /* IE9 Compat Modes */
src:
/* IE6-IE8 */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-700.eot?#iefix")
format("embedded-opentype"),
/* Super Modern Browsers */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-700.woff2") format("woff2"),
/* Pretty Modern Browsers */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-700.woff") format("woff"),
/* Safari, Android, iOS */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-700.ttf") format("truetype"),
/* Legacy iOS */ url("../aics-image-viewer/assets/fonts/open-sans/open-sans-700.svg#svgFontName") format("svg");
}

@font-face {
Expand Down
6 changes: 4 additions & 2 deletions src/aics-image-viewer/assets/styles/typography.css
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added additional fallbacks for other languages and emojis. I don't expect these other fonts to be used, but it's good to include just in case!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallback fonts copied from the parent app, which I think is currently provided by Ant.

image

Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
height: 100%;

body {
font-family: "Open Sans", "Overpass-Light", Arial, sans-serif;
font-family: "Open Sans", "Open Sans Local", Arial, sans-serif, apple-system, BlinkMacSystemFont, "Segoe UI",
"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
h1,
h2,
h3,
h4 {
font-family: "Open Sans", "Merriweather Sans", Arial, sans-serif;
font-family: "Open Sans", "Open Sans Local", Arial, sans-serif, apple-system, BlinkMacSystemFont, "Segoe UI",
"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
}
Loading