Iosevka/parameters.ptl
2015-12-17 18:00:16 +08:00

15 lines
878 B
Plaintext

export : define [build parametersData styles] : begin
local param {.}
local variantSelector {.}
foreach [style : items-of styles] : begin
local hive parametersData.(style)
if hive : then
foreach [k : items-of : Object.keys hive] : set param.(k) hive.(k)
if hive.multiplies : foreach [k : items-of : Object.keys hive.multiplies] : set param.(k) : param.(k) * hive.multiplies.(k)
if hive.adds : foreach [k : items-of : Object.keys hive.adds] : set param.(k) : param.(k) + hive.adds.(k)
#if hive.familySuffix : set param.family "\(param.family)\(hive.familySuffix)"
#if hive.styleSuffix : set param.style "\(param.style)\(hive.styleSuffix)"
if hive.variantSelector : foreach [k : items-of : Object.keys hive.variantSelector] : begin
set variantSelector.(k) hive.variantSelector.(k)
set param.variantSelector variantSelector
return param