Skip to content

Commit 5b52afc

Browse files
OmikhleiaDidier Willis
authored andcommitted
fix(classes,packages): Use ex-height font adjustment for code
Rather than a hard-coded 3pt font size adjustment that cannot be general with any font. Impacts the code command from the plain class, and also the urlstyle default implementation from the url package as it relies on the latter.
1 parent 4e16acf commit 5b52afc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

classes/plain.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ function class:registerCommands ()
262262
-- definition from the former, but it's of sub-quality...
263263
-- The ugly -3 size is a HACK of sorts.
264264
options.family = options.family or "Hack"
265-
options.size = options.size or SILE.settings:get("font.size") - 3
265+
if not options.size and not options.adjust then
266+
options.adjust = "ex-height"
267+
end
266268
SILE.call("font", options, content)
267269
end)
268270

0 commit comments

Comments
 (0)