Skip to content

Commit

Permalink
Change of path for token fonts (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
Franck Gaudin authored Oct 27, 2023
1 parent f25d855 commit 3ca7314
Show file tree
Hide file tree
Showing 24 changed files with 9 additions and 12 deletions.
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

0 comments on commit 3ca7314

Please sign in to comment.