Skip to content

Commit d99528c

Browse files
chore: fixing centrano1 font name in token by removing space (#522)
## **Description** This PR standardizes the font family name to "CentraNo1" (without space) across design tokens to align with Mobile and Extension implementations. 1. Reason for change: There was an inconsistency where Portfolio used "Centra No1" (with space) while Mobile and Extension used "CentraNo1" (without space). This inconsistency caused the design tokens to display incorrectly. 2. Improvement: Consolidates all references to use "CentraNo1" without space, matching the Mobile and Extension implementation, which fixes the font display in design tokens and ensures consistency across platforms. ## **Related issues** Fixes: Cross-platform font family name inconsistency causing display issues in design tokens ## **Manual testing steps** 1. Verify font family name is "CentraNo1" (without space) in: - CSS variables (`--font-family-sans`) - Storybook documentation - Typography tokens 2. Confirm font renders correctly in design token examples 3. Verify changes align with existing Mobile and Extension implementations ## **Screenshots/Recordings** ### **Before** - Mobile/Extension: `"CentraNo1"` (correct) - Portfolio: `"Centra No1"` (inconsistent) - Design Tokens: Mixed usage causing display issues <img width="1510" alt="Screenshot 2025-03-27 at 11 14 01 AM" src="https://github.com/user-attachments/assets/7997f5cf-a466-4c50-a629-9c8031c175aa" /> ### **After** Consistent usage across all platforms: ```css --font-family-sans: 'CentraNo1', 'Helvetica Neue', Helvetica, Arial, sans-serif; ``` <img width="1509" alt="Screenshot 2025-03-27 at 11 13 11 AM" src="https://github.com/user-attachments/assets/0ad7a106-0329-4b21-ba63-ea7b35aa871a" /> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent d2b0299 commit d99528c

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

packages/design-tokens/CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14-
- **BREAKING:** Replaced Euclid Circular B with Centra No1 as the primary font family ([#499](https://github.com/MetaMask/metamask-design-system/pull/499)). See the [migration guide](./MIGRATION.md#from-version-510-to-600) for details.
14+
- **BREAKING:** Replaced Euclid Circular B with CentraNo1 as the primary font family ([#499](https://github.com/MetaMask/metamask-design-system/pull/499)). See the [migration guide](./MIGRATION.md#from-version-510-to-600) for details.
1515

1616
- Removed `--font-family-euclid-circular-b` and `--font-family-roboto` CSS variables
17-
- Changed `--font-family-sans` to use Centra No1 with updated fallback chain
18-
- Updated font files from Euclid Circular B to Centra No1 (where 'Book' is the 400 weight variant)
17+
- Changed `--font-family-sans` to use CentraNo1 with updated fallback chain
18+
- Updated font files from Euclid Circular B to CentraNo1 (where 'Book' is the 400 weight variant)
1919
- Applications using the design system will need to update font imports and references
2020

2121
## [5.1.0]

packages/design-tokens/MIGRATION.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This guide provides detailed instructions for migrating your project from one ve
1111

1212
### Font Family Changes (Breaking Changes)
1313

14-
In version 6.0.0, we've completely replaced Euclid Circular B with Centra No1 as our primary font family. This is a breaking change that affects both web and React Native applications.
14+
In version 6.0.0, we've completely replaced Euclid Circular B with CentraNo1 as our primary font family. This is a breaking change that affects both web and React Native applications.
1515

1616
#### CSS Changes
1717

@@ -29,7 +29,7 @@ In version 6.0.0, we've completely replaced Euclid Circular B with Centra No1 as
2929
--font-family-sans: 'Euclid Circular B', 'Roboto', sans-serif;
3030

3131
/* After */
32-
--font-family-sans: 'Centra No1', 'Helvetica Neue', Helvetica, Arial, sans-serif;
32+
--font-family-sans: 'CentraNo1', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3333
```
3434

3535
#### React Native Font Changes
@@ -66,17 +66,17 @@ The font weight tokens remain the same (400, 500, 700), but the font file names
6666

6767
### Migration Steps
6868

69-
1. Update font imports to use Centra No1 instead of Euclid Circular B
70-
2. Replace all instances of `font-family: 'Euclid Circular B'` with `font-family: 'Centra No1'`
69+
1. Update font imports to use CentraNo1 instead of Euclid Circular B
70+
2. Replace all instances of `font-family: 'Euclid Circular B'` with `font-family: 'CentraNo1'`
7171
3. Update font file references:
7272
- Use 'CentraNo1-Book' for weight 400 (previously 'EuclidCircularB-Regular')
7373
- Use 'CentraNo1-Medium' for weight 500
7474
- Use 'CentraNo1-Bold' for weight 700
7575
4. For React Native applications:
76-
- Update font file imports to use new Centra No1 .otf files
76+
- Update font file imports to use new CentraNo1 .otf files
7777
- Update font family references in your styles
7878
5. For web applications:
79-
- Update font file imports to use new Centra No1 .woff2 files
79+
- Update font file imports to use new CentraNo1 .woff2 files
8080
- Update @font-face declarations
8181
6. Remove any references to Roboto font family as it's no longer included in the fallback chain
8282

packages/design-tokens/src/css/typography.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
:root {
55
/* font family */
6-
--font-family-sans: 'Centra No1', 'Helvetica Neue', Helvetica, Arial,
6+
--font-family-sans: 'CentraNo1', 'Helvetica Neue', Helvetica, Arial,
77
sans-serif;
88
/* font sizes */
99
--font-size-base: 16px;

packages/design-tokens/src/figma/tokens.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@
344344
},
345345
"fontFamilies": {
346346
"centra-no1": {
347-
"value": "Centra No1",
347+
"value": "CentraNo1",
348348
"type": "fontFamilies"
349349
}
350350
},
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const fontFamilies = {
2-
sans: 'Centra No1',
2+
sans: 'CentraNo1',
33
};

packages/design-tokens/stories/Typography.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Good typography improves readability, legibility and prioritization of informati
99

1010
## Font Family
1111

12-
The main font family used in MetaMask products is **Centra No1**.
12+
The main font family used in MetaMask products is **CentraNo1**.
1313

1414
<Canvas of={TypographyStories.FontFamily} />
1515

@@ -24,7 +24,7 @@ The main font family used in MetaMask products is **Centra No1**.
2424
<tbody>
2525
<tr>
2626
<td>
27-
<strong>Centra No1</strong>
27+
<strong>CentraNo1</strong>
2828
</td>
2929
<td>
3030
<code>Token not exported</code>

packages/design-tokens/stories/Typography.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const FontFamily: StoryFn<typeof Text> = (...args) => {
3535
return (
3636
<>
3737
<Text style={styles.displayMD} {...args}>
38-
Centra No1
38+
CentraNo1
3939
</Text>
4040
</>
4141
);

0 commit comments

Comments
 (0)