Skip to content

Commit

Permalink
fix: italic google fonts (#233)
Browse files Browse the repository at this point in the history
* fix: italic fonts from google

* chore: changesets

* nit: remove patch

* nit: lint
  • Loading branch information
dalechyn authored Apr 10, 2024
1 parent 50b2cc7 commit 8a29c4d
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 61 deletions.
5 changes: 5 additions & 0 deletions .changeset/spotty-spoons-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"frog": patch
---

Fixed incorrect resolution of Google Font with italic style.
4 changes: 2 additions & 2 deletions playground/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export const app = new Frog({
alignHorizontal="center"
alignVertical="center"
>
<Heading>
<Heading style="italic">
{status === 'response'
? `Nice choice.${fruit ? ` ${fruit.toUpperCase()}!!` : ''}`
: 'Welcome :)'}
: 'Welcome 🐸'}
</Heading>
</Box>
),
Expand Down
3 changes: 3 additions & 0 deletions playground/src/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,19 @@ export const {
{
name: 'Open Sans',
source: 'google',
style: 'italic',
weight: 400,
},
{
name: 'Open Sans',
source: 'google',
style: 'italic',
weight: 600,
},
{
name: 'Open Sans',
source: 'google',
style: 'italic',
weight: 700,
},
],
Expand Down
69 changes: 11 additions & 58 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"dom-parser": "^1.1.5",
"fast-glob": "3.3.2",
"fs-extra": "^11.2.0",
"hono-og": "0.0.26",
"hono-og": "0.0.27",
"jose": "^5.2.2",
"lz-string": "^1.5.0",
"path-browserify": "^1.0.1",
Expand Down
1 change: 1 addition & 0 deletions src/utils/parseFonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export async function parseFonts(fonts: Font[] | undefined) {
data: await loadGoogleFont({
family: font.name,
weight: font.weight,
style: font.style,
}),
}
return font
Expand Down

0 comments on commit 8a29c4d

Please sign in to comment.