Font.Garden
← Guide index

learnProofs and media

A project made from the template renders its proof, its specimen and its marketing media with three commands. Every picture is laid out on the lattice of the typeface, and a checker verifies each layout before DesignBot draws it. No rendered file is tracked in Git.

Background reading:
learn Build the fonts
learn Quality assurance

This chapter is a specification. The column State says what is built. Where it says “planned”, the chapter is correct and the tool is not finished.

The outputs

OutputReaderCommandState
Print proofThe designer, to find faultsmake proof, which runs fgtools media --proofBuilt, 10 kinds of page
Print specimenA reader, on papermake specimen, which runs fgtools media --specimenBuilt
Marketing mediaThe public, on social platformsmake media, which runs fgtools mediaBuilt, 9 formats
Technical imagesA reader of a README or an articleThe format glyph of the mediaBuilt, 1 format
All of themGitHub Pagesmake site, which runs the three commands and then fgtools siteBuilt

DesignBot draws all of them. A glyph looks the same in the proof, in the specimen and in a video.

The layout system

A layout is not drawn by hand. It is placed on the lattice of the typeface, with the numbers of the [layout] block of CONTEXT.md of the project.

RuleValue in a font with an em of 1024 units
The module is the large step of the design grid64 pixels
Every position is a multiple of the unit8 pixels
The live area of a canvas is a whole number of modules; the margin is the rest1080 x 1350 has 16 x 20 modules
The text area is the live area less one module on each side, inside the safe area of the platform14 x 18 modules
Type sizes double32, 64, 128, 256, 512, 1024, and 24 for labels. The print page has one size more, 16 pixels, which is 8 points on paper.
The cap top of a line stands on a module line, and its start on a column line
A text is chosen to fit its measure. The size never changes to make a text fit.A word at 256 pixels fills 99% of the measure
One label size, one line weight, two inks and one accent

At an em of 1024 pixels, 1 pixel is 1 unit of the font. The grid of such a picture is the grid of the drawing.

The parts

PartPlaceWork
Latticefgtools/media_layout.pyGives each canvas its live area and its text area
Typesetterfgtools/media_layout.pyMeasures text in the font with HarfBuzz, fits a word to a measure, breaks a paragraph into lines
Formatfgtools/media_formats/, one Python file for each. The pages of the print proof are in its folder proofs/.Places type, rules and paths on the lattice. It never names a pixel.
Checkerfgtools/media_layout.pyFinds a size that is not on the scale, a position off the unit, ink outside the text area, and more than two weights or three sizes in a picture
Plotterfgtools/media_plotter.rsDesignBot draws the checked layout. It decides nothing.

A layout with a fault is not written. The command names each fault and stops with an error.

Where each part is

PartPlaceChanges for each font
The layout system, the default formats, the canvases, the word listsfgtoolsNo
The numbers of the latticeCONTEXT.md of the project, the [layout] blockYes
The brand: the colors and the textsdocumentation/media/brand.tomlYes
The caption, the alternative text and the canvases of a formatdocumentation/media/formats.toml, optionalYes
The texts of the print proofsources/proof-samples.toml, optional. The web proof uses the same file.Yes
A layout that only this font hasA Python file in documentation/media/images/, carousels/ or videos/, optional. The folder says what the format makes.Yes
The rendered filesoutput/media/ and output/specimen/, which Git ignoresNot tracked

A new project has brand.toml only, and gets every default format. An improvement of a default format reaches every font with the next version of fgtools. To change a layout for one font, fgtools media --copy with the name of the format copies the default script into the project.

A font at the start of its design has few glyphs, and the formats use what it has. A text with a character that the font does not have is left out, and a font that can set no word shows the letters that exist. A picture never shows a system font.

The canvases

CanvasSizeText area in modulesUse
portrait1080 x 135014 x 18Feed image and carousel on Instagram, LinkedIn, X and Mastodon. The page of a LinkedIn document.
vertical1080 x 192011 x 14Instagram Reel and Story, and TikTok
landscape1920 x 108026 x 14Video and wide image on X, LinkedIn and Mastodon
square1080 x 108014 x 14A page or a profile that needs a square
card1200 x 63016 x 6The link preview
page1684 x 1190, written at half size22 x 14The page of the print specimen: A4 landscape, dark ink on a light ground

The platforms change their safe areas each year, so they are data in fgtools/media_canvases.toml. fgtools media --lattice draws the lattice and the text area on every picture.

The formats

FormatKindWhat it showsState
wordsImageOne word for each weight at 256 pixels. Each word fills the measure.Built
weightsImageOne text at each weight, from the lightest to the heaviestBuilt
textImageThe line of the brand at 64 pixels and the description of the font at 32 pixelsBuilt
scriptsImageOne word in each script of the fontBuilt
releaseImageThe name, and the facts of the font from the font fileBuilt
link-cardImageThe picture of a linkBuilt
glyphCarouselOne glyph on the grid of its design, with the points of the drawing and the metricsBuilt
charactersCarouselThe characters in cells of two modules, one group for each pageBuilt
weight-axisVideoOne text across the weight axis. A square moves on a line, a whole number of units in each frame.Built
Features: the changed glyph in ink inside a gray wordImagePlanned
Similar characters, for example I, l and 1ImagePlanned
Masters: the outlines of two masters with lines between matching pointsImage or videoPlanned
Before and after: one glyph at two commitsVideoPlanned

The print proof

The print proof is for the designer. Its pages are the same for every font, and a project cannot replace them.

PageWhat it shows
FactsThe format release
Character setEvery encoded character, one in each module
SizesOne line at 128, 64, 32, 16 and 8 points, for each script and each master
ReadingA text at 8 on 12 points and at 16 on 24 points, for each script and each master
SpacingEach letter between two straight and two round control letters
Kerning and figuresPairs, words, default and tabular figures
DiacriticsEach letter with a mark beside its base letter
Weights and interpolationThe format weights, and the glyphs of the brand at 11 steps of the axis
LinesThe short samples of fgtools and of the project
Arabic joining and Arabic marksEach letter in its four forms, and each vowel mark on 12 letters

A sample line that mixes a script from the left with a script from the right is left out: DesignBot sets a line in one direction.

The print specimen is the formats release, text, words, weights, scripts, glyph and characters on the page canvas, as one PDF.

A part only

Each of the three commands makes all of its outputs, or the part that you name.

WantedCommand
The names of the formats, the canvases and the pagesmake formats
Some pages of the print proofmake proof PAGE="spacing kerning"
Some pages of the print specimenmake specimen PAGE=words
One kind of media: images, carousels or videosmake media FORMAT=videos
Some formatsmake media FORMAT="words glyph"
One format on one canvasmake media FORMAT=weight-axis CANVAS=landscape
The technical imagemake media FORMAT=glyph
The pictures with the lattice drawn on themmake media LATTICE=1
A copy of a default format, to change it for this fontmake copy-format FORMAT=words

A part of the proof or of the specimen is written to the file of the whole one. Each make target builds the fonts first. .venv/bin/fgtools media with the same names renders the fonts that exist, without a build.

The last line of each command is Open: and the file to look at: the review page of the media, the PDF of the proof or the specimen, a picture or the diff report. Most terminals open the link with a Command-click.

One render

A render is one file in output/media/<folder>/<format>/, named <family>_<format>_<canvas> with its extension. The folder is images, carousels or videos. An image is a PNG. A carousel is numbered PNG pages and one PDF, which is the document post of LinkedIn. A video is an MP4: H.264, 30 frames in a second, with a silent audio track.

Beside each render is a JSON record: the format, the canvas, the size, the caption, the alternative text and the commit of the sources. output/media/index.html shows every render on one page for review.

Stages

StageWhat happensState
1. ComposeEach format places its elements on the lattice of each canvasBuilt
2. CheckThe checker verifies each layout against the rulesBuilt
3. PlotDesignBot draws the layoutsBuilt
4. ReviewThe designer reads the review pagePage built, approval planned
5. PublishCI runs make site: it renders the proof, the specimen and the media, fgtools site collects them into output/site/, and CI publishes that folder on GitHub Pages. Turn Pages on once in the settings of the repository, with the source “GitHub Actions”.Built
6. PostPosts with a caption, alternative text and a link for each platform, and a record of what was postedPlanned

What a person decides

  • The words of the brand, and the glyphs to show.
  • The approval of each render.
  • The text of each caption. Alternative text for an image of text states the words, the typeface and the weight.
  • The date of a release, and whether a draft glyph can be shown in public.

Platforms

Each platform encodes a file again. The export for a platform follows from the canvas.

PlacementCanvasExport
Instagram and TikTok pictureportraitJPEG, sRGB, under 8 MB. Instagram accepts 20 pictures in a carousel.
LinkedIn, X, Mastodon imageportrait or landscapePNG under 5 MB
LinkedIn documentportraitPDF
Link previewcardPNG or JPEG under 600 KB
Instagram Reel and Story, TikTokverticalMP4, 3 seconds or longer. A Reel can be posted again on TikTok without a change.
Video on X and LinkedInlandscapeMP4

Mastodon encodes video at a low bit rate that damages thin strokes, so a still image is better there.