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

chore: bump the paste fonts to fix backticks #3736

Merged
merged 6 commits into from Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/nice-walls-brake.md
@@ -0,0 +1,6 @@
---
"@twilio-paste/theme": patch
"@twilio-paste/core": patch
---

[Theme]: patch bump in Paste fonts to fix a bug in the Twilio sans font regarding backticks not taking up physical space
4 changes: 2 additions & 2 deletions .storybook/preview-head.html
Expand Up @@ -27,12 +27,12 @@
<link rel="preconnect" href="https://assets.twilio.com" crossorigin />
<link
rel="preload"
href="https://assets.twilio.com/public_assets/paste-fonts/1.5.1/Inter.var.woff2?v=3.19"
href="https://assets.twilio.com/public_assets/paste-fonts/1.5.2/Inter.var.woff2?v=3.19"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/1.5.1/fonts.css" />
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/1.5.2/fonts.css" />
<script>
window.global = window;
window.process = {
Expand Down
126 changes: 63 additions & 63 deletions packages/paste-theme/src/styles/fonts.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/paste-token-contrast-checker/public/index.html
Expand Up @@ -22,7 +22,7 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link rel="preconnect" href="https://assets.twilio.com" crossorigin />
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/1.5.1/fonts.css" />
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/1.5.2/fonts.css" />
<title>React App</title>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-website/src/pages/_document.tsx
Expand Up @@ -14,7 +14,7 @@ class _Document extends Document {
<Html lang="en" dir="ltr">
<Head>
<link rel="preconnect" href="https://assets.twilio.com" crossOrigin="" />
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/1.5.1/fonts.css" />
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/1.5.2/fonts.css" />

<link rel="sitemap" type="application/xml" href="/sitemap.xml" />
<link rel="manifest" href="/manifest.json" />
Expand Down
6 changes: 3 additions & 3 deletions packages/paste-website/src/pages/api/og-image.tsx
Expand Up @@ -326,13 +326,13 @@ export default async function handler(req: NextRequest): Promise<ImageResponse>

// Make sure the font exists in the specified path:
const fontData = await fetch(
"https://assets.twilio.com/public_assets/paste-fonts/1.5.1/TwilioSansText-Regular.woff",
"https://assets.twilio.com/public_assets/paste-fonts/1.5.2/TwilioSansText-Regular.woff",
).then(async (res) => res.arrayBuffer());
const fontDataMedium = await fetch(
"https://assets.twilio.com/public_assets/paste-fonts/1.5.1/TwilioSansText-Medium.woff",
"https://assets.twilio.com/public_assets/paste-fonts/1.5.2/TwilioSansText-Medium.woff",
).then(async (res) => res.arrayBuffer());
const fontDataSemiBold = await fetch(
"https://assets.twilio.com/public_assets/paste-fonts/1.5.1/TwilioSansText-Semibold.woff",
"https://assets.twilio.com/public_assets/paste-fonts/1.5.2/TwilioSansText-Semibold.woff",
).then(async (res) => res.arrayBuffer());

console.log(`${LOG_PREFIX} return image`);
Expand Down
Expand Up @@ -160,7 +160,7 @@ The **best and most performant way** to load the fonts is to include the followi

```html
<link rel="preconnect" href="https://assets.twilio.com" crossorigin />
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/1.5.1/fonts.css" />
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/1.5.2/fonts.css" />
```

<Callout variant="neutral" marginY="space70">
Expand Down
Expand Up @@ -55,7 +55,7 @@ To change the theme, simply change the value of the `theme` prop on the `Theme.P

```html
<link rel="preconnect" href="https://assets.twilio.com" crossorigin />
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/1.5.1/fonts.css" />
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/1.5.2/fonts.css" />
```

Alternatively, Paste will automatically load the default theme's font via JavaScript. **Note:** this will result in slower download times than including the fonts in the `<head />`.
Expand Down
2 changes: 1 addition & 1 deletion templates/paste-nextjs-template/pages/_document.tsx
Expand Up @@ -5,7 +5,7 @@ const Document = (): JSX.Element => {
<Html>
<Head>
<link rel="preconnect" href="https://assets.twilio.com" crossOrigin="" />
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/1.5.0/fonts.css" />
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/1.5.2/fonts.css" />
</Head>
<body>
<Main />
Expand Down