From 70e9cc6691685d79b887ed2bf3b9a2214532ce1d Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 12 Oct 2023 00:02:26 +0300 Subject: [PATCH] feat(packages): Use OpenType +tate feature for ruby, toggle with setting --- packages/ruby/init.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/ruby/init.lua b/packages/ruby/init.lua index 0da12ec660..557edf54a4 100644 --- a/packages/ruby/init.lua +++ b/packages/ruby/init.lua @@ -51,12 +51,23 @@ function package.declareSettings (_) help = "Glue added between consecutive Latin ruby" }) + SILE.settings:declare({ + parameter = "ruby.opentype", + type = "boolean", + default = true, + help = "Use OpenType tate feature instead of of a bold weight" + }) + end function package:registerCommands () self:registerCommand("ruby:font", function (_, _) - SILE.call("font", { size = "0.6zw", weight = 800 }) + if SILE.settings:get("ruby.opentype") then + SILE.call("font", { features = "+tate" }) + else + SILE.call("font", { size = "0.6zw", weight = 800 }) + end end) self:registerCommand("ruby", function (options, content)