Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for SILE v0.14.x #50

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion .github/workflows/sile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
sileVersion: [ "v0.15.6", "v0.14.17" ]
sileVersion: [ "v0.15.6" ]
runs-on: ubuntu-22.04
container:
image: ghcr.io/sile-typesetter/sile:${{ matrix.sileVersion }}
Expand Down
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ ARG RUNTIME_DEPS
# Install run-time dependencies
RUN pacman --needed --noconfirm -Sq $RUNTIME_DEPS && yes | pacman -Sccq

# Setup LuaRocks for use with LuaJIT roughly matching SILE's internal VM
RUN luarocks config lua_version 5.1 && \
luarocks config lua_interpreter luajit && \
luarocks config variables.LUA "$(command -v luajit)"

# Set at build time, forces Docker’s layer caching to reset at this point
ARG REVISION
ARG VERSION
Expand Down
15 changes: 4 additions & 11 deletions classes/fontproof/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ local function getGitCommit ()
end

function class:_init (options)
-- Dodge deprecation notices until we drop v0.14 support
if SILE.types then
SILE.nodefactory = SILE.types.node
end

_scratch = {
runhead = {},
Expand All @@ -60,7 +56,7 @@ function class:_init (options)
self:loadPackage("features")
self:loadPackage("color")

SILE.settings:set("document.parindent", SILE.nodefactory.glue(0))
SILE.settings:set("document.parindent", SILE.types.node.glue(0))
SILE.settings:set("document.spaceskip")
return self
end
Expand Down Expand Up @@ -152,10 +148,7 @@ function class:endPage ()
fontinfo = fontinfo .. (" %s"):format(self.options.script)
end
local gitcommit = getGitCommit()
local function inputFilename ()
return SILE.input.filename and SILE.input.filename or SILE.input.filenames[1]
end
local templateinfo = ("%s"):format(inputFilename())
local templateinfo = ("%s"):format(SILE.input.filenames[1])
local dateinfo = os.date("%A %d %b %Y %X %z %Z")
local sileinfo = ("SILE %s"):format(SILE.version)
local harfbuzzinfo = ("HarfBuzz %s"):format(hb.version())
Expand All @@ -168,8 +161,8 @@ function class:endPage ()
harfbuzzinfo
)
SILE.typesetNaturally(SILE.getFrame("runningHead"), function ()
SILE.settings:set("document.rskip", SILE.nodefactory.hfillglue())
SILE.settings:set("typesetter.parfillskip", SILE.nodefactory.glue(0))
SILE.settings:set("document.rskip", SILE.types.node.hfillglue())
SILE.settings:set("typesetter.parfillskip", SILE.types.node.glue(0))
SILE.settings:set("document.spaceskip", SILE.shaper:measureChar(" ").width)
SILE.call("font", {
family = _scratch.runhead.family,
Expand Down
2 changes: 1 addition & 1 deletion hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e

REVISION=$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g')

RUNTIME_DEPS='luarocks luajit words'
RUNTIME_DEPS='words'

: "${DOCKER_BUILDKIT:=1}"
export DOCKER_BUILDKIT
Expand Down
8 changes: 4 additions & 4 deletions packages/fontproof/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ function package:registerCommands ()
end
end
end
local width = SILE.measurement("100%fw"):absolute() / columns
local width = SILE.types.measurement("100%fw"):absolute() / columns
local fontoptions = self.class:_fpOptions({ size = charsize })
local done = 0
while done < #glyphs do
Expand All @@ -296,7 +296,7 @@ function package:registerCommands ()
SILE.typesetter:typeset(header:sub(1, hexDigits))
end)
local nbox = SILE.typesetter.state.nodes[#SILE.typesetter.state.nodes]
local centeringglue = SILE.nodefactory.glue((width - nbox.width) / 2)
local centeringglue = SILE.types.node.glue((width - nbox.width) / 2)
SILE.typesetter.state.nodes[#SILE.typesetter.state.nodes] = centeringglue
SILE.typesetter:pushHorizontal(nbox)
SILE.typesetter:pushGlue(centeringglue)
Expand All @@ -314,7 +314,7 @@ function package:registerCommands ()
local char = glyphs[ix + 1].uni
if glyphs[ix + 1].present then
local left = SILE.shaper:measureChar(char).width
local centeringglue = SILE.nodefactory.glue((width - left) / 2)
local centeringglue = SILE.types.node.glue((width - left) / 2)
SILE.typesetter:pushGlue(centeringglue)
SILE.typesetter:typeset(char)
SILE.typesetter:pushGlue(centeringglue)
Expand All @@ -335,7 +335,7 @@ function package:registerCommands ()
SILE.typesetter:typeset(string.format("%04X", glyphs[ix + 1].cp))
end)
local nbox = SILE.typesetter.state.nodes[#SILE.typesetter.state.nodes]
local centeringglue = SILE.nodefactory.glue((width - nbox.width) / 2)
local centeringglue = SILE.types.node.glue((width - nbox.width) / 2)
SILE.typesetter.state.nodes[#SILE.typesetter.state.nodes] = centeringglue
SILE.typesetter:pushHorizontal(nbox)
SILE.typesetter:pushGlue(centeringglue)
Expand Down