Skip to content
New issue

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

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

Already on GitHub? # to your account

Update Clockface Fonts #755

Merged
merged 7 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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
4 changes: 2 additions & 2 deletions .storybook/Story.scss
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ body.sb-show-main {

.storybook-readme-story div.markdown-body {
font-size: $docs-text-base;
font-family: 'Rubik', Helvetica, Arial, Tahoma, Verdana, sans-serif;
font-family: 'Proxima Nova', Helvetica, Arial, Tahoma, Verdana, sans-serif;

a:link,
a:visited,
Expand Down Expand Up @@ -438,7 +438,7 @@ body.sb-show-main {
}

code {
font-family: 'IBMPlexMono', monospace;
font-family: 'Roboto Mono', monospace;
font-style: normal;
text-shadow: none;
font-weight: $cf-font-weight--medium;
Expand Down
4 changes: 2 additions & 2 deletions .storybook/clockfaceTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export default create({
appBorderRadius: 4,

// Typography
fontBase: '"Roboto", sans-serif',
fontCode: '"RobotoMono", monospace',
fontBase: '"Proxima Nova", sans-serif',
fontCode: '"Roboto Mono", monospace',

// Text colors
textColor: '#545667',
Expand Down
4 changes: 4 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@500;600&display=swap" rel="stylesheet">

<style>
body.sb-show-main {
position: unset;
Expand Down
5 changes: 3 additions & 2 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = ({config}) => {
loader: 'url-loader?limit=10000&mimetype=application/font-woff',
},
{
test: /\.(eot|png|eot|ttf|svg)(\?[a-z0-9#=&.]+)$/,
test: /\.(eot|png|eot|ttf|svg|otf)(\?[a-z0-9#=&.]+)$/,
use: [
{
loader: 'file-loader',
Expand Down Expand Up @@ -55,7 +55,8 @@ module.exports = ({config}) => {
'.woff2',
'.eot',
'.ttf',
'.svg'
'.svg',
'.otf',
)

return config
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Page/PageTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const PageTitle = forwardRef<PageTitleRef, PageTitleProps>(
alt={altText}
ref={ref}
weight={FontWeight.Medium}
type={Typeface.Rubik}
type={Typeface.ProximaNova}
style={style}
testID={testID}
element={HeadingElement.H1}
Expand Down
4 changes: 3 additions & 1 deletion src/Components/Panel/Documentation/Panel.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,9 @@ panelExampleStories.add(
)
]
}
type={Typeface[select('type', mapEnumKeys(Typeface), 'Rubik')]}
type={
Typeface[select('type', mapEnumKeys(Typeface), 'ProximaNova')]
}
weight={
FontWeight[select('weight', mapEnumKeys(FontWeight), 'Medium')]
}
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Typography/Documentation/Heading.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {Heading, Typeface, HeadingElement, FontWeight} from '@influxdata/clockfa
```tsx
<Heading
element={HeadingElement.H1}
type={Typeface.Rubik}
type={Typeface.ProximaNova}
weight={FontWeight.Bold}
underline={false}
selectable={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ headingStories.add(
)
]
}
type={Typeface[select('type', mapEnumKeys(Typeface), 'Rubik')]}
type={Typeface[select('type', mapEnumKeys(Typeface), 'ProximaNova')]}
weight={
FontWeight[select('weight', mapEnumKeys(FontWeight), 'Medium')]
}
Expand Down
6 changes: 3 additions & 3 deletions src/Components/Typography/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const Heading = forwardRef<HeadingRef, HeadingProps>(
id,
alt,
weight = FontWeight.Medium,
type = Typeface.Rubik,
type = Typeface.ProximaNova,
style,
underline,
testID = 'heading',
Expand All @@ -55,8 +55,8 @@ export const Heading = forwardRef<HeadingRef, HeadingProps>(
const visualElement = appearance || element

const headingClass = classnames('cf-heading', {
'cf-heading__standard': type === Typeface.Rubik,
'cf-heading__monospace': type === Typeface.IBMPlexMono,
'cf-heading__standard': type === Typeface.ProximaNova,
'cf-heading__monospace': type === Typeface.RobotoMono,
[`cf-heading__${weight}`]: weight,
'cf-heading__underline': underline,
'cf-heading__selectable': selectable,
Expand Down
Binary file removed src/Styles/Fonts/IBMPlexMono-Medium.woff2
Binary file not shown.
Binary file removed src/Styles/Fonts/IBMPlexMono-SemiBold.woff2
Binary file not shown.
Binary file added src/Styles/Fonts/ProximaNova-Black.otf
Binary file not shown.
Binary file added src/Styles/Fonts/ProximaNova-Bold.otf
Binary file not shown.
Binary file added src/Styles/Fonts/ProximaNova-Light.otf
Binary file not shown.
Binary file added src/Styles/Fonts/ProximaNova-Medium.otf
Binary file not shown.
Binary file added src/Styles/Fonts/ProximaNova-Regular.otf
Binary file not shown.
Binary file added src/Styles/Fonts/RobotoMono-Medium.ttf
Binary file not shown.
Binary file added src/Styles/Fonts/RobotoMono-SemiBold.ttf
Binary file not shown.
Binary file removed src/Styles/Fonts/Rubik-Black.woff2
Binary file not shown.
Binary file removed src/Styles/Fonts/Rubik-Bold.woff2
Binary file not shown.
Binary file removed src/Styles/Fonts/Rubik-Light.woff2
Binary file not shown.
Binary file removed src/Styles/Fonts/Rubik-Medium.woff2
Binary file not shown.
Binary file removed src/Styles/Fonts/Rubik-Regular.woff2
Binary file not shown.
28 changes: 14 additions & 14 deletions src/Styles/fonts.scss
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
@font-face {
font-family: 'Rubik';
font-family: 'Proxima Nova';
font-style: normal;
font-weight: 300;
src: url('./Fonts/Rubik-Light.woff2') format('woff2');
src: url('./Fonts/ProximaNova-Light.otf') format('otf');
}
@font-face {
font-family: 'Rubik';
font-family: 'Proxima Nova';
font-style: normal;
font-weight: 400;
src: url('./Fonts/Rubik-Regular.woff2') format('woff2');
src: url('./Fonts/ProximaNova-Regular.otf') format('otf');
}
@font-face {
font-family: 'Rubik';
font-family: 'Proxima Nova';
font-style: normal;
font-weight: 500;
src: url('./Fonts/Rubik-Medium.woff2') format('woff2');
src: url('./Fonts/ProximaNova-Medium.otf') format('otf');
}
@font-face {
font-family: 'Rubik';
font-family: 'Proxima Nova';
font-style: normal;
font-weight: 700;
src: url('./Fonts/Rubik-Bold.woff2') format('woff2');
src: url('./Fonts/ProximaNova-Bold.otf') format('otf');
}
@font-face {
font-family: 'Rubik';
font-family: 'Proxima Nova';
font-style: normal;
font-weight: 900;
src: url('./Fonts/Rubik-Black.woff2') format('woff2');
src: url('./Fonts/ProximaNova-Black.otf') format('otf');
}
@font-face {
font-family: 'IBMPlexMono';
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 500;
src: url('./Fonts/IBMPlexMono-Medium.woff2') format('woff2');
src: url('./Fonts/RobotoMono-Medium.ttf') format('ttf');
}
@font-face {
font-family: 'IBMPlexMono';
font-family: 'Roboto Mono';
font-style: italic;
font-weight: 600;
src: url('./Fonts/IBMPlexMono-SemiBold.woff2') format('woff2');
src: url('./Fonts/RobotoMono-SemiBold.ttf') format('ttf');
}
2 changes: 1 addition & 1 deletion src/Styles/reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body {
}

body {
font-family: 'Rubik', Helvetica, Arial, Tahoma, Verdana, sans-serif;
font-family: 'Proxima Nova', Helvetica, Arial, Tahoma, Verdana, sans-serif;
padding: 0;
width: 100%;
height: 100%;
Expand Down
8 changes: 4 additions & 4 deletions src/Styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ $cf-radius-sm: $cf-radius - 1px;
-----------------------------------------------------------------------------
*/

$cf-header-font: 'Rubik', Helvetica, Arial, Tahoma, Verdana, sans-serif;
$cf-text-font: 'Rubik', Helvetica, Arial, Tahoma, Verdana, sans-serif;
$cf-code-font: 'IBMPlexMono', monospace;
$cf-header-font: 'Proxima Nova', Helvetica, Arial, Tahoma, Verdana, sans-serif;
$cf-text-font: 'Proxima Nova', Helvetica, Arial, Tahoma, Verdana, sans-serif;
$cf-code-font: 'Roboto Mono', monospace;
$cf-icon-font: 'icomoon';

$cf-font-weight--light: 300;
$cf-font-weight--regular: 400;
$cf-font-weight--medium: 500;
$cf-font-weight--medium: 600;
$cf-font-weight--bold: 700;
$cf-font-weight--black: 900;

Expand Down
4 changes: 2 additions & 2 deletions src/Types/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,8 @@ export enum LinkRel {
}

export enum Typeface {
IBMPlexMono = 'ibm-plex-mono',
Rubik = 'rubik',
RobotoMono = 'Roboto Mono',
ProximaNova = 'Proxima Nova',
}

export enum HeadingElement {
Expand Down