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

refactor: Compatibility upgrade with SILE 0.15 #3

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/printoptions/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
-- Reminders: GraphicsMagick also needs Ghostscript for PDF images (it
-- delegates to it).
--
require("silex.types") -- Compatibility shims

local base = require("packages.base")

local package = pl.class(base)
Expand Down Expand Up @@ -179,8 +181,8 @@ local drawSVG = function (filename, svgdata, width, height, density)
elseif height then
scalefactor = height:tonumber() / svgheight
end
width = SILE.measurement(svgwidth * scalefactor)
height = SILE.measurement(svgheight * scalefactor)
width = SILE.types.measurement(svgwidth * scalefactor)
height = SILE.types.measurement(svgheight * scalefactor)
scalefactor = scalefactor * density / 72

local resolution = SILE.settings:get("printoptions.resolution")
Expand Down
26 changes: 26 additions & 0 deletions rockspecs/printoptions.sile-1.1.0-1.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
rockspec_format = "3.0"
package = "printoptions.sile"
version = "1.1.0-1"
source = {
url = "git+https://github.com/Omikhleia/printoptions.sile.git",
tag = "v1.1.0",
}
description = {
summary = "Image tools for professional printers with the SILE typesetting system.",
detailed = [[
This package for the SILE typesetter helps tuning image resolution and vector rasterization,
as often requested by professional printers and print-on-demand services.
]],
homepage = "https://github.com/Omikhleia/printoptions.sile",
license = "MIT",
}
dependencies = {
"lua >= 5.1",
"silex.sile >= 0.6.0, < 1.0",
}
build = {
type = "builtin",
modules = {
["sile.packages.printoptions"] = "packages/printoptions/init.lua",
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ description = {
}
dependencies = {
"lua >= 5.1",
"silex.sile",
}
build = {
type = "builtin",
Expand Down