Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Affinity Designer Calculations
# Introduction
Below are some calculations that are helpful when designing in Affinity Designer when using grids with gutters, bleeds or margins.
To use the calculations simply enter your the information in the [Input][] section and then scroll down to the `Results` section for the calculation you're using. Not all of the variables are required for each calculation and are noted.
All of the grids calculations assume that you are calculating dimensions based on the document or design width, non-uniform grids also require height information.
Results always include two sections, the first is just an `Reference` section to save you the trip of returning to the [Input][] section to remember what you entered or to show you non-actionable calculations results and an `Enter into Affinity Designer` section for actionable calculation results.
@group = false
# Table of Contents
- [Input][]
- [Functions][]
- [Grids][]
- [Uniform Grid][]
- [Separate Dimensions Grid][]
- [Centered Half Gutter Grid][]
- [Centered Full Gutter Grid][]
- [Print Design][]
- [Bleeds & Margins][]
- [Centered Gutter Grid with Margins][]
# Input
Make sure you specify units on every applicable variable or none!
documentWidth = 8.5
documentHeight = 11
For all grids:
columns = 6
For uniform grids:
gutter = 0.1
For non-uniform grids:
rows =
horizontalGutter =
verticalGutter =
For print design:
bleed = .125
margin = .25
----------------------------------------------------------------
# Functions
Unless you need to change the functions ignore these.
## Grids
calculateGridLineDistance (documentSize, numberOfGridlines) =
documentSize / numberOfGridlines
calculateSpacing (documentSize, numberOfGridlines, gutter) =
documentSize / numberOfGridlines − gutter
calculateActualDocumentWidth (gridLineDistance, gutter, desiredDocumentWidth) =
gridLineDistance × 2 + gutter + desiredDocumentWidth
calculateFullGutterGridLineDistance (documentSize, numberOfGridlines, gutter) =
(documentSize − gutter ) / numberOfGridlines
calculateFullGutterSpacing (documentSize, numberOfGridlines, gutter) =
documentSize / numberOfGridlines − gutter / numberOfGridlines − gutter
calculateFullGutterActualDocumentWidth (spacing, gutter, desiredDocumentWidth) =
spacing × 2 + desiredDocumentWidth
## Print Design
calculateBleedSize (documentSize, bleed) =
documentSize + bleed × 2
calculatePrintSize (documentSize, margin) =
documentSize − margin × 2
calculateMarginSpacing (printWidth, gutter, numberOfGridlines) =
(printWidth - gutter * (numberOfGridlines - 1)) / numberOfGridlines
calculateMarginGridLineDistance (spacing, gutter) =
spacing + gutter
calculateMarginActualDocumentWidth (gridLineDistance, margin, desiredDocumentWidth) =
gridLineDistance * 2 - margin * 2 + desiredDocumentWidth
----------------------------------------------------------------
# Grids
----------------------------------------------------------------
## Uniform Grid
The uniform grid calculation divides the document width by the number of columns and then subtracts the the gutter distance to give you spacing.
### Calls
gridLineDistance = calculateGridLineDistance (documentWidth, columns)
spacing = calculateSpacing (documentWidth, columns, gutter)
### Results
Reference:
documentWidth => 8.5
documentHeight => 11
gridLineDistance => 1.4167
Grid and Axis Manager:
spacing => 1.3167
gutter => 0.1
----------------------------------------------------------------
## Separate Dimensions Grid
The separate dimensions grid does the exact same thing as the uniform grid except that it calculates horizontal and vertical grids separately.
### Calls
gridLineWidth = calculateGridLineDistance (documentWidth, columns)
horizontalSpacing = calculateSpacing (documentWidth, columns, horizontalGutter)
gridLineHeight = calculateGridLineDistance (documentHeight, rows)
verticalSpacing = calculateSpacing (documentHeight, rows, verticalGutter)
### Results
Reference:
documentWidth => 8.5
gridLineWidth => 1.4167
documentHeight => 11
gridLineHeight => 11/rows
Grid and Axis Manager - First Axis:
horizontalSpacing => -horizontalGutter + 1.4167
horizontalGutter => -horizontalSpacing + 1.4167
Grid and Axis Manager - Second Axis:
verticalSpacing => 11/rows - verticalGutter
verticalGutter => -verticalSpacing + 11/rows
----------------------------------------------------------------
## Centered Half Gutter Grid
Affinity designer handles grids with gutters somewhat poorly. It doesn't include the gutter on the far left side of the page, this means that everything will be offset by the distance of the gutter to the left.
There is a workable hack to this which adds an additional column to the left the page start and then use an export slice to crop off the extra column. For the sake of symmetry we will add another column to the right side.
Note that this technique will only calculate half of a gutter distance on either side of the document.
This technique was [created and described](http://drops.christopherdwhite.com/JTqV/1bm31ivu) by kareldries on the Affinity forums.
### Calls & Variables
gridLineDistance = calculateGridLineDistance (documentWidth, columns)
spacing = calculateSpacing (documentWidth, columns, gutter)
actualDocumentWidth = calculateActualDocumentWidth (spacing, gutter, documentWidth)
pageBegin = spacing + gutter / 2
pageEnd = pageBegin + documentWidth
leftColumnPositionX = 0
leftColumnPositionY = 0
leftColumnWidth = pageBegin
leftColumnHeight = documentHeight
rightColumnPositionX = pageEnd
rightColumnPositionY = 0
rightColumnWidth = leftColumnWidth
rightColumnHeight = documentHeight
### Results
Reference:
documentWidth => 8.5
documentHeight => 11
gridLineDistance => 1.4167
Document Setup:
actualDocumentWidth => 11.2333
Grid and Axis Manager
spacing => 1.3167
gutter => 0.1
Vertical Guides:
pageBegin => 1.3667
pageEnd => 9.8667
Left Page Border Shape:
leftColumnPositionX => 0
leftColumnPositionY => 0
leftColumnWidth => 1.3667
leftColumnHeight => 11
Right Page Border Shape:
rightColumnPositionX => 9.8667
rightColumnPositionY => 0
rightColumnWidth => 1.3667
rightColumnHeight => 11
----------------------------------------------------------------
## Centered Full Gutter Grid
This will be a similar calculation to the half gutter on either side of the document to a full gutter on either side of the document once I figure out the math.
### Calls & Variables
gridLineDistance = calculateFullGutterGridLineDistance (documentWidth, columns, gutter)
spacing = calculateFullGutterSpacing (documentWidth, columns, gutter)
actualDocumentWidth = calculateFullGutterActualDocumentWidth (spacing, gutter, documentWidth)
pageBegin = gridLineDistance − gutter
pageEnd = pageBegin + documentWidth
leftColumnPositionX = 0
leftColumnPositionY = 0
leftColumnWidth = spacing
leftColumnHeight = documentHeight
rightColumnPositionX = pageEnd
rightColumnPositionY = 0
rightColumnWidth = leftColumnWidth
rightColumnHeight = documentHeight
### Results
Reference:
documentWidth => 8.5
documentHeight => 11
gridLineDistance => 1.4
Document Setup:
actualDocumentWidth => 11.1
Grid and Axis Manager:
spacing => 1.3
gutter => 0.1
Vertical Guides:
pageBegin => 1.3
pageEnd => 9.8
Left Page Border Shape:
leftColumnPositionX => 0
leftColumnPositionY => 0
leftColumnWidth => 1.3
leftColumnHeight => 11
Right Page Border Shape:
rightColumnPositionX => 9.8
rightColumnPositionY => 0
rightColumnWidth => 1.3
rightColumnHeight => 11
----------------------------------------------------------------
# Print Design
----------------------------------------------------------------
## Bleeds & Margins
No, you probably don't need a calculator to figure out the bleed and margin sizes but I wanted a reference so I didn't have to figure this out from scratch on the rare occasions I do print design.
For US letter size the standard bleed is 0.125 in and the standard margin is 0.25 in
### Calls
bleedWidth = calculateBleedSize (documentWidth, bleed)
bleedHeight = calculateBleedSize (documentHeight, bleed)
printWidth = calculatePrintSize (documentWidth, margin)
printHeight = calculatePrintSize (documentHeight, margin)
topBleedPosition = 0 − bleed
rightBleedPosition = documentWidth + bleed
bottomBleedPosition = documentHeight + bleed
leftBleedPosition = 0 − bleed
topMarginPosition = 0 + margin
rightMarginPosition = documentWidth − margin
bottomMarginPosition = documentHeight − margin
leftMarginPosition = 0 + margin
### Results
Reference:
printWidth => 8
printHeight => 10.5
topBleedPosition => -0.125
bottomBleedPosition => 11.125
Document Setup:
documentWidth => 8.5
documentHeight => 11
margin => 0.25
bleed => 0.125
Vertical Guides:
leftBleedPosition => -0.125
rightBleedPosition => 8.625
leftMarginPosition => 0.25
rightMarginPosition => 8.25
Horizontal Guides:
topMarginPosition => 0.25
bottomMarginPosition => 10.75
## Centered Gutter Grid with Margins
The gutter grid combines some of the earlier grid calculations and factors in the margins as the outside gutters centering the grid.
### Calls
Print Sizes:
printWidth = calculatePrintSize (documentWidth, margin)
printHeight = calculatePrintSize (documentHeight, margin)
Grid:
spacing = calculateMarginSpacing (printWidth, gutter, columns)
gridLineDistance = calculateMarginGridLineDistance (spacing, gutter)
actualDocumentWidth = calculateMarginActualDocumentWidth(gridLineDistance, margin, documentWidth)
pageBegin = gridLineDistance - margin
pageEnd = documentWidth + pageBegin
leftColumnPositionX = 0
leftColumnPositionY = 0
leftColumnWidth = pageBegin
leftColumnHeight = documentHeight
rightColumnPositionX = pageEnd
rightColumnPositionY = 0
rightColumnWidth = leftColumnWidth
rightColumnHeight = documentHeight
Bleeds:
bleedWidth = calculateBleedSize (documentWidth, bleed)
bleedHeight = calculateBleedSize (documentHeight, bleed)
leftRightBleedSize = 0 - pageBegin + bleed
topBottomBleedSize = bleed
topBleedPosition = 0 − bleed
rightBleedPosition = pageEnd + bleed
bottomBleedPosition = documentHeight + bleed
leftBleedPosition = pageBegin − bleed
bleedX = leftBleedPosition
bleedY = topBleedPosition
Margins:
leftRightMarginSize = gridLineDistance
topBottomMarginSize = margin
topMarginPosition = margin
rightMarginPosition = pageEnd - margin
bottomMarginPosition = documentHeight − margin
leftMarginPosition = gridLineDistance
### Results
Reference:
documentWidth => 8.5
documentHeight => 11
printWidth => 8
printHeight => 10.5
gridLineDistance => 1.35
topBleedPosition => -0.125
bottomBleedPosition => 11.125
Document Setup… :
actualDocumentWidth => 10.7
leftRightMarginSize => 1.35
topBottomMarginSize => 0.25
leftRightBleedSize => -0.975
topBottomBleedSize => 0.125
**Note:** Affinity Designer does not support negative bleeds and will set to zero, I'm not sure if I can get around that yet or not.
Grid and Axis Manager:
spacing => 1.25
gutter => 0.1
Horizontal Guides:
topMarginPosition => 0.25
bottomMarginPosition => 10.75
Vertical Guides:
pageBegin => 1.1
pageEnd => 9.6
leftBleedPosition => 0.975
rightBleedPosition => 9.725
leftMarginPosition => 1.35
rightMarginPosition => 9.35
Bleed Shape:
bleedX => 0.975
bleedY => -0.125
bleedWidth => 8.75
bleedHeight => 11.25
Left Page Border Shape:
leftColumnPositionX => 0
leftColumnPositionY => 0
leftColumnWidth => 1.1
leftColumnHeight => 11
Right Page Border Shape:
rightColumnPositionX => 9.6
rightColumnPositionY => 0
rightColumnWidth => 1.1
rightColumnHeight => 11
@christopherdwhite

This comment has been minimized.

Copy link
Owner Author

christopherdwhite commented Feb 23, 2017

This is super verbose but I wanted it to be digestable for myself in the future as well as sharing it on the Affinity forums.

@christopherdwhite

This comment has been minimized.

Copy link
Owner Author

christopherdwhite commented Mar 15, 2017

Tweaked the results organization throughout, added Centered Gutter Grid with Margins calculator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.