The userspace location to convert
The axes definitions to use for the conversion
The corresponding designspace location
let weightMap: UserspaceToDesignspaceMapping = [
[100, 100],
[400, 400],
[700, 600],
[900, 900]
];
const axes: Axis[] = [
{
tag: "wght",
min: 100,
default: 400,
max: 900,
map: weightMap
}
];
const userLocation: UserspaceLocation = { wght: 650 };
const designLocation = userspaceToDesignspace(userLocation, axes
Convert a userspace location to a designspace location.