mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-29 07:50:28 +01:00
Simplify font stacks and limit to one default value
This commit is contained in:
parent
0b99e571c4
commit
f2dd785e7b
2 changed files with 6 additions and 17 deletions
|
@ -3,12 +3,7 @@ import SelectInput from './SelectInput'
|
||||||
import input from '../../config/input.js'
|
import input from '../../config/input.js'
|
||||||
|
|
||||||
//TODO: Query available font stack dynamically
|
//TODO: Query available font stack dynamically
|
||||||
import fontFamilies from '../../config/fontstacks.json'
|
import fontStacks from '../../config/fontstacks.json'
|
||||||
let fontStacks = []
|
|
||||||
|
|
||||||
Object.keys(fontFamilies).forEach(family => {
|
|
||||||
fontStacks = fontStacks.concat(fontFamilies[family])
|
|
||||||
})
|
|
||||||
|
|
||||||
class FontInput extends React.Component {
|
class FontInput extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
@ -18,7 +13,7 @@ class FontInput extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
get values() {
|
get values() {
|
||||||
return this.props.value || this.props.default || []
|
return this.props.value || this.props.default.slice(1) || []
|
||||||
}
|
}
|
||||||
|
|
||||||
changeFont(idx, newValue) {
|
changeFont(idx, newValue) {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
[
|
||||||
"Metropolis": [
|
|
||||||
"Metropolis Black Italic",
|
"Metropolis Black Italic",
|
||||||
"Metropolis Black",
|
"Metropolis Black",
|
||||||
"Metropolis Bold Italic",
|
"Metropolis Bold Italic",
|
||||||
|
@ -17,9 +16,7 @@
|
||||||
"Metropolis Semi Bold Italic",
|
"Metropolis Semi Bold Italic",
|
||||||
"Metropolis Semi Bold",
|
"Metropolis Semi Bold",
|
||||||
"Metropolis Thin Italic",
|
"Metropolis Thin Italic",
|
||||||
"Metropolis Thin"
|
"Metropolis Thin",
|
||||||
],
|
|
||||||
"Open Sans": [
|
|
||||||
"Open Sans Bold Italic",
|
"Open Sans Bold Italic",
|
||||||
"Open Sans Bold",
|
"Open Sans Bold",
|
||||||
"Open Sans Extra Bold Italic",
|
"Open Sans Extra Bold Italic",
|
||||||
|
@ -29,13 +26,10 @@
|
||||||
"Open Sans Light",
|
"Open Sans Light",
|
||||||
"Open Sans Regular",
|
"Open Sans Regular",
|
||||||
"Open Sans Semibold Italic",
|
"Open Sans Semibold Italic",
|
||||||
"Open Sans Semibold"
|
"Open Sans Semibold",
|
||||||
],
|
|
||||||
"Klokantech Noto Sans": [
|
|
||||||
"Klokantech Noto Sans Bold",
|
"Klokantech Noto Sans Bold",
|
||||||
"Klokantech Noto Sans CJK Bold",
|
"Klokantech Noto Sans CJK Bold",
|
||||||
"Klokantech Noto Sans CJK Regular",
|
"Klokantech Noto Sans CJK Regular",
|
||||||
"Klokantech Noto Sans Italic",
|
"Klokantech Noto Sans Italic",
|
||||||
"Klokantech Noto Sans Regular"
|
"Klokantech Noto Sans Regular"
|
||||||
]
|
]
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue