Skip to content

Commit b44b865

Browse files
committed
fix(covers): Generate bindings with guides at final bounding size, dodge Inkscape bugs
https://gitlab.com/inkscape/inkscape/-/issues/4668
1 parent ead5176 commit b44b865

File tree

2 files changed

+17
-22
lines changed

2 files changed

+17
-22
lines changed

binding.svg

Lines changed: 12 additions & 19 deletions
Loading

rules/rules.mk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ $(BUILDDIR)/%-$(_binding).svg: $(CASILEDIR)/binding.svg $$(basename $$@)-printco
906906
s#HHH#$${pagehpm}#g;
907907
s#BLEED#$${bleedpm}#g;
908908
s#TRIM#$${trimpm}#g;
909-
s#CROP#$${trimmm}mm#g;
909+
s#GUIDE#$${guidepm}#g;
910910
s#CW#$${pagewpm}#g;
911911
s#SW#$${spinepm}#g;
912912
" $< > $@
@@ -918,8 +918,7 @@ $(BUILDDIR)/%-$(_binding).svg: $(CASILEDIR)/binding.svg $$(basename $$@)-printco
918918
$(XVFB_RUN) -d $(INKSCAPE) $< \
919919
--batch-process \
920920
--export-dpi=$${hidpi} \
921-
--export-area-page \
922-
--export-margin=$${trimmm} \
921+
--export-area-drawing \
923922
-o $@
924923

925924
DISTFILES += *-$(_binding).pdf
@@ -959,6 +958,9 @@ $(GEOMETRIES): $(BUILDDIR)/%-$(_geometry).sh: $$(call geometrybase,$$@) $$(call
959958
trimpx=$(call mmtopx,$(TRIM))
960959
trimpm=$(call mmtopm,$(TRIM))
961960
trimpt=$(call mmtopt,$(TRIM))
961+
guidemm=$$(($$trimmm-$$bleedmm))
962+
guidepx=$$(($$trimpx-$$bleedpx))
963+
guidepm=$$(($$trimpm-$$bleedpm))
962964
$(shell $(_ENV) $(MAGICK) identify -density $(HIDPI) -format '
963965
pagewmm=%[fx:round(w/$(HIDPI)*25.399986)]
964966
pagewpx=%[fx:w]

0 commit comments

Comments
 (0)