Skip to content

Commit

Permalink
feat(packages): Use OpenType +tate feature for ruby, toggle with setting
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Oct 11, 2023
1 parent 773245b commit 70e9cc6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/ruby/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 70e9cc6

Please sign in to comment.