Skip to content

Commit

Permalink
chore: bump the paste fonts to fix backticks (#3736)
Browse files Browse the repository at this point in the history
* chore: bump the paste fonts to fix backticks

* chore: changeset
  • Loading branch information
SiTaggart committed Jan 30, 2024
1 parent ca0eebe commit fbd3996
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 73 deletions.
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
2 changes: 1 addition & 1 deletion packages/paste-website/src/pages/theme/changing-theme.mdx
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

0 comments on commit fbd3996

Please sign in to comment.