Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
fix(android): fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
braddialpad committed Jan 28, 2023
1 parent 493a6c3 commit f881bc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ StyleDictionary.registerTransform({
return FONT_FAMILY_IDENTIFIERS.includes(token.type)
},
transformer: (token, options) => {
return `arrayOf(${token.value.split(',').map(s => `"${s.replaceAll('"', '').trim()}"`).join(', ')})`;
return 'FontFamily.Default';
}
});

Expand Down Expand Up @@ -336,6 +336,7 @@ function addImportIntoKotlinFile(path, importText) {

const KOTLIN_FILE_PATH = './dist/android/java/tokens.kt';
addImportIntoKotlinFile(KOTLIN_FILE_PATH, 'import androidx.compose.ui.text.font.FontWeight')
addImportIntoKotlinFile(KOTLIN_FILE_PATH, 'import androidx.compose.ui.text.font.FontFamily')

const DOC_OUTPUT_PATH = './dist/doc.json';

Expand Down

0 comments on commit f881bc1

Please sign in to comment.