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

Change of path for token fonts #75

Merged
merged 9 commits into from
Oct 27, 2023
Binary file removed packages/tokens/assets/fonts/ABCFavorit-Bold.otf
Binary file not shown.
Binary file removed packages/tokens/assets/fonts/ABCFavorit-Bold.woff
Binary file not shown.
Binary file removed packages/tokens/assets/fonts/ABCFavorit-Medium.otf
Binary file not shown.
Binary file removed packages/tokens/assets/fonts/ABCFavorit-Medium.woff
Binary file not shown.
Binary file removed packages/tokens/assets/fonts/ABCFavorit-Regular.otf
Binary file not shown.
Binary file removed packages/tokens/assets/fonts/ABCFavorit-Regular.woff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added packages/tokens/assets/fonts/Inter-Bold.woff2
Binary file not shown.
Binary file removed packages/tokens/assets/fonts/Inter-BoldItalic.otf
Binary file not shown.
Binary file not shown.
Binary file removed packages/tokens/assets/fonts/Inter-Medium.otf
Binary file not shown.
Binary file added packages/tokens/assets/fonts/Inter-Medium.woff2
Binary file not shown.
Binary file removed packages/tokens/assets/fonts/Inter-MediumItalic.otf
Binary file not shown.
Binary file not shown.
Binary file removed packages/tokens/assets/fonts/Inter-Regular.otf
Binary file not shown.
Binary file added packages/tokens/assets/fonts/Inter-Regular.woff2
Binary file not shown.
Binary file removed packages/tokens/assets/fonts/Inter-SemiBold.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions packages/tokens/src/style-dictionary/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ export const fontsConfig = {
"type": "font"
}
},
"options": {
"fontPathPrefix": "./"
}
}
],
"actions": ["copy_assets"]
Expand Down
2 changes: 1 addition & 1 deletion packages/tokens/src/style-dictionary/format/font-face.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Dictionary, Options, TransformedToken } from "style-dictionary";

export function fontFace ({ dictionary, options }: { dictionary: Dictionary; options: Options }) {
const fontPathPrefix = options.fontPathPrefix || "../";
const fontPathPrefix = options.fontPathPrefix || "";
const tokens = dictionary.allTokens;

// https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src
Expand Down
16 changes: 8 additions & 8 deletions packages/tokens/src/tokens/asset/fonts.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,43 @@
"normal": {
"410": {
"value": "assets/fonts/Inter-Regular",
"formats": ["otf"]
"formats": ["woff2"]
},
"505": {
"value": "assets/fonts/Inter-Medium",
"formats": ["otf"]
"formats": ["woff2"]
},
"590": {
"value": "assets/fonts/Inter-SemiBold",
"formats": ["otf"]
"formats": ["woff2"]
},
"690": {
"value": "assets/fonts/Inter-Bold",
"formats": ["otf"]
"formats": ["woff2"]
}
}
},
"ABC Favorit Mono": {
"normal": {
"400": {
"value": "assets/fonts/ABCFavoritMono-Regular",
"formats": ["otf", "woff", "woff2"]
"formats": ["woff2"]
}
}
},
"ABC Favorit": {
"normal": {
"410": {
"value": "assets/fonts/ABCFavorit-Regular",
"formats": ["otf", "woff", "woff2"]
"formats": ["woff2"]
},
"580": {
"value": "assets/fonts/ABCFavorit-Medium",
"formats": ["otf", "woff", "woff2"]
"formats": ["woff2"]
},
"680": {
"value": "assets/fonts/ABCFavorit-Bold",
"formats": ["otf", "woff", "woff2"]
"formats": ["woff2"]
}
}
}
Expand Down