-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add the web platform to systemWeights * Split systemWeights into platform-specific files * Update the docs with the web platform support
- Loading branch information
1 parent
58e3658
commit 3f4d919
Showing
17 changed files
with
174 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import notoCJKWeights from "../helpers/notoCJKWeights"; | ||
|
||
// For now these weights are really restricted on Android, even though San Francisco | ||
// has many steps defined for some dense languages, Noto Sans CJK only has regular | ||
// and bold shipped with Android | ||
|
||
// San Francisco falls back from regular to bold starting from semibold for the scripts | ||
// for which it doesn't have so many weight steps, so let's do the same for Noto CJK. | ||
|
||
const systemDenseWeights = { | ||
thin: notoCJKWeights.regular, | ||
light: notoCJKWeights.regular, | ||
regular: notoCJKWeights.regular, | ||
semibold: notoCJKWeights.bold, | ||
bold: notoCJKWeights.bold | ||
}; | ||
|
||
export default systemDenseWeights; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import sanFranciscoWeights from "../helpers/sanFranciscoWeights"; | ||
|
||
const systemDenseWeights = { | ||
thin: sanFranciscoWeights.thin, | ||
light: sanFranciscoWeights.light, | ||
regular: sanFranciscoWeights.regular, | ||
semibold: sanFranciscoWeights.semibold, | ||
bold: sanFranciscoWeights.bold | ||
}; | ||
|
||
export default systemDenseWeights; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import webWeights from "../helpers/webWeights"; | ||
|
||
const systemDenseWeights = { | ||
thin: webWeights.thin, | ||
light: webWeights.light, | ||
regular: webWeights.regular, | ||
semibold: webWeights.semibold, | ||
bold: webWeights.bold | ||
}; | ||
|
||
export default systemDenseWeights; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import notoTallWeights from "../helpers/notoTallWeights"; | ||
|
||
// San Francisco falls back from regular to bold starting from semibold for the scripts | ||
// for which it doesn't have so many weight steps, so let's do the same for Noto. | ||
|
||
const systemTallWeights = { | ||
thin: notoTallWeights.regular, | ||
light: notoTallWeights.regular, | ||
regular: notoTallWeights.regular, | ||
semibold: notoTallWeights.bold, | ||
bold: notoTallWeights.bold | ||
}; | ||
|
||
export default systemTallWeights; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import sanFranciscoWeights from "../helpers/sanFranciscoWeights"; | ||
|
||
const systemTallWeights = { | ||
thin: sanFranciscoWeights.thin, | ||
light: sanFranciscoWeights.light, | ||
regular: sanFranciscoWeights.regular, | ||
semibold: sanFranciscoWeights.semibold, | ||
bold: sanFranciscoWeights.bold | ||
}; | ||
|
||
export default systemTallWeights; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import webWeights from "../helpers/webWeights"; | ||
|
||
const systemTallWeights = { | ||
thin: webWeights.thin, | ||
light: webWeights.light, | ||
regular: webWeights.regular, | ||
semibold: webWeights.semibold, | ||
bold: webWeights.bold | ||
}; | ||
|
||
export default systemTallWeights; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import robotoWeights from "../helpers/robotoWeights"; | ||
|
||
const systemWeights = { | ||
thin: robotoWeights.thin, | ||
light: robotoWeights.light, | ||
regular: robotoWeights.regular, | ||
semibold: robotoWeights.medium, | ||
bold: robotoWeights.bold | ||
}; | ||
|
||
export default systemWeights; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import sanFranciscoWeights from "../helpers/sanFranciscoWeights"; | ||
|
||
const systemWeights = { | ||
thin: sanFranciscoWeights.thin, | ||
light: sanFranciscoWeights.light, | ||
regular: sanFranciscoWeights.regular, | ||
semibold: sanFranciscoWeights.semibold, | ||
bold: sanFranciscoWeights.bold | ||
}; | ||
|
||
export default systemWeights; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import webWeights from "../helpers/webWeights"; | ||
|
||
const systemWeights = { | ||
thin: webWeights.thin, | ||
light: webWeights.light, | ||
regular: webWeights.regular, | ||
semibold: webWeights.semibold, | ||
bold: webWeights.bold | ||
}; | ||
|
||
export default systemWeights; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const webWeights = { | ||
thin: { | ||
fontFamily: "System", | ||
fontWeight: "100" | ||
}, | ||
ultraLight: { | ||
fontFamily: "System", | ||
fontWeight: "200" | ||
}, | ||
light: { | ||
fontFamily: "System", | ||
fontWeight: "300" | ||
}, | ||
regular: { | ||
fontFamily: "System", | ||
fontWeight: "400" | ||
}, | ||
medium: { | ||
fontFamily: "System", | ||
fontWeight: "500" | ||
}, | ||
semibold: { | ||
fontFamily: "System", | ||
fontWeight: "600" | ||
}, | ||
bold: { | ||
fontFamily: "System", | ||
fontWeight: "700" | ||
}, | ||
heavy: { | ||
fontFamily: "System", | ||
fontWeight: "800" | ||
}, | ||
black: { | ||
fontFamily: "System", | ||
fontWeight: "900" | ||
} | ||
}; | ||
|
||
export default webWeights; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters