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

[feat]: Add support for custom fonts #430

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quintype/amp",
"version": "2.11.0",
"version": "2.11.1-custom-fonts.3",
"description": "Quintype's AMP component library for publisher apps to create amp layouts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/__fixtures__/config.fixture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ export const ampConfig: AMPConfig = {
secondary: {
url: "PT+Serif:400,400italic,700,700italic",
family: "'PT Serif', sans-serif"
}
},
custom: "https://fonts.googleapis.com/css?family=Tangerine"
},
colors: {
primary: "#294f32",
Expand Down
24 changes: 24 additions & 0 deletions src/atoms/fonts/__snapshots__/fonts.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,29 @@ exports[`Fonts component Should match snapshot 1`] = `
href="https://fonts.googleapis.com/css?family=Mukta+Malar:400,400italic,700,700italic&display=swap"
rel="preload"
/>
<link
as="style"
crossorigin="anonymous"
href="https://fea.assettype.com/malibu/assets/MalibuHeadlineSemiBold1.woff2"
rel="preload"
/>
<link
as="style"
crossorigin="anonymous"
href="https://fea.assettype.com/malibu/assets/MalibuHeadlineTextRegular1.woff2"
rel="preload"
/>
<link
as="style"
crossorigin="anonymous"
href="https://fea.assettype.com/malibu/assets/MalibuHeadlineSemiBold2.woff2"
rel="preload"
/>
<link
as="style"
crossorigin="anonymous"
href="https://fea.assettype.com/malibu/assets/MalibuHeadlineTextRegular2.woff2"
rel="preload"
/>
</HelmetWrapper>
`;
Loading