diff --git a/src/marks/axis.js b/src/marks/axis.js index 6a3d51f847..9e090db33e 100644 --- a/src/marks/axis.js +++ b/src/marks/axis.js @@ -488,6 +488,7 @@ function labelOptions( fontFamily, fontSize, fontStyle, + fontVariant, fontWeight, monospace, pointerEvents, @@ -508,6 +509,7 @@ function labelOptions( fontFamily, fontSize, fontStyle, + fontVariant, fontWeight, monospace, pointerEvents, diff --git a/test/output/axisLabelFontVariant.svg b/test/output/axisLabelFontVariant.svg new file mode 100644 index 0000000000..b9bc640b1a --- /dev/null +++ b/test/output/axisLabelFontVariant.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + a + b + c + d + e + + + Letter + + \ No newline at end of file diff --git a/test/plots/axis-labels.ts b/test/plots/axis-labels.ts index fac2f941d6..2948f8c8b1 100644 --- a/test/plots/axis-labels.ts +++ b/test/plots/axis-labels.ts @@ -52,6 +52,13 @@ export async function axisLabelBothReverse() { }); } +export async function axisLabelFontVariant() { + return Plot.plot({ + x: {domain: "abcde"}, + marks: [Plot.axisX({label: "Letter", fontVariant: "small-caps"})] + }); +} + export async function axisLabelVaryingFill() { return Plot.plot({ x: {domain: "ABCDEF"},