Light Table is still in beta.
Many features are still missing or incomplete.
However, the functionality described here is already available.
If it does not work for you as described, or you have suggestions for improvement, feel free to let me know:
Discuss on the Glyphs Forum
or mail to flinklusive@gmail.comorian@folgenrmkunft.com
Installation
Install Light Table from the Plugin Manager:
Open Glyphs and in the menu go to Window → Plugin Manager.
There, search in the Plugins tab for Light Table and click the Install button.
Light Table requires macOS 12 or later and Glyphs 3.3 or later.
Creating a Repository
First things first: You need a Git repository to work with Light Table.
If you already have a Git repository set up, you can skip this section.
Git is the industry standard for keeping track of file versions.
With Git, you choose a folder, and then any changes to the files in that folder are tracked.
This folder is called a repository.
Once a folder has been turned into a repository, you can work like normal on your files.
This includes your Glyphs files, but also any other files like Python scripts, notes, or sketches.
You can review the changes you have made, stage some or all of the changes to be included in the next version, and then create a version.
To create a repository, first open Glyphs.
In the Light Table palette, click the button Set up Repository…
(If you don’t see such a button and instead the text No File is shown, you first must save the document to a file with File → Save.)
A window will open, asking you to choose the repository folder.
It’s best to choose a folder that corresponds to the project you are working on.
Since Git tracks all files in a repository, it can be awkward when the folder contains multiple projects or just a subset of the file of a project.
Click Initialize Repository in “…” to create the repository.
If you have used Git on your Mac before, you are now done with the repository setup.
However, if this is your first time using Git, Light Table will also ask you for your name and email address.
These pieces of information are used to identify you as the author of the versions you create, which is helpful when collaborating with others on projects.
You can change your Git username and email address any time in the Light Table settings:
In the Light Table palette, click the three dots and then Settings… → Git.
That’s it!
You have now set up a repository and are ready to create versions of your project.
By the way, Git repositories are local to your Mac.
You can work offline, and no data is sent to any servers without you explicitly doing so.
Creating Versions
Once you have a Git repository set up, you can start creating versions of your project.
Light Table is specialized for creating new versions of font source files, but it also has basic support for other file types.
To create a new version, first open the Repository window using one of the following methods:
-
Choose File → Light Table → Show Repository from the menu (⌃⌘R).
-
Click the Repository window button in the Light Table palette.
-
Click the plus button in the Light Table palette.
The last option of clicking the plus button also switches the Repository window to the glyph that you have currently selected or that you are currently working on.
The Repository window is divided into three areas:
- In the top left corner is the editor with text fields to describe the next version and buttons below to stage all files and create a new version.
- Below the editor is the file list displaying all files that have changed since the latest version.
- On the right side is the diff: the list of differences of the selected file.
Before a version can be created, you must first stage some or all changes and write a summary of the changes.
Staging Files
You “stage” changes so that they are included in the next version.
Next to each file is a checkbox and one or two status icons.
Modified files are indicated with a dot ,
new files show a plus sign ,
and deleted files show a minus sign .
-
If the file is not staged, then the checkbox is unchecked, and one status icon is shown on the right side.
-
If the file is staged, then the checkbox is checked, and one status icon is shown on the left side.
-
If the file is partially staged (not all changes of the file are staged), then the checkbox is half-checked and two status icons are shown.
Click the checkbox to stage or unstage a file.
To stage all files to be included in the next version, use the Stage All button above the file list.
Staging Glyphs
You can also stage only some parts of a file.
This is useful when you are working on a glyph and only want to commit the changes to a layer, a path, or any other part of the glyph.
Click on the glyph in the file list.
All current changes of the glyph appear on the right side of the window.
Stage individual changes using the checkbox on the left side of each row.
Writing Descriptions
The description is split into a summary and a more detailed description.
This summary should be written like the subject of an email: short and to the point.
When you later scroll through a list of your versions, you will see these summaries.
The summary is especially helpful when you are working with others on a project, as it allows your colleagues to quickly understand what’s changed.
Below the summary, you can optionally write a longer description of the changes.
This description is not shown in the list of versions, but when viewing the details of a version.
(Viewing version details is not yet supported in Light Table.)
Committing the Staged Changes
Once you have staged some or all changes and written a summary, click the Create Version button.
Light Table will create a new version of your project.
This version is now the latest version of your project.
Note that this new version might not show up in the list of versions in the Light Table palette.
This is because the palette only lists versions directly related to the current file.
For example, if you create a version where you only staged other files in your project, like a Python script placed next to the Glyphs file, then this version will not show up in the palette.
Reviewing Changes
Once you have created a version, you can review your new changes and discard the changes you don’t like.
Status Indicators
In Font View and Edit View, Light Table adds icons in the top left corner of added and modified glyphs.
You can hide these icons in the Light Table settings (click the three dots in the Light Table palette → Settings… → Status).
Smart Filters for Added & Modified Glyphs
You can check whether a glyph or layer was added or modified since the latest version as part of a Smart Filter.
Add a Custom rule with the pattern lightTableStatus == 2.
The number 2 selects for added glyphs. Use 3 for modified glyphs and 1 for unchanged glyphs.
Use 0 to check for glyphs for which the status is unknown (for example, when the document is not part of a repository or an error occured).
This status is the same as the ObjectStatus in the Python API.
You can also check the status of the layer of currently selected master instead of the status of the glyph by prefixing the pattern with layer0., for example, layer0.lightTableStatus == 2.
Reviewing Glyph Changes
To review the changes of a glyph, click the status icon in the top left corner of the Info box.
A popover will open showing the changes of the glyph.
Discarding Changes
If you don’t like a change, you can discard it.
Select one or more rows in a diff list and choose Discard Change from the context menu.
The change will be undone immediately.
You can reapply it by opening the glyph in Edit View and using Edit → Undo (⌘Z).
Discarding changes is still in early development.
Only a few types of changes can be discarded for now, like modified node and anchor positions.
More types of changes will be supported in the future; let me know if you have a specific need.
Discarding changes from the Repository window is only available if the document is saved (that is, it has no unsaved changes).
Comparing Versions
In the Light Table palette, click a version to compare the current outlines to the outlines from the selected version.
The Light Table tool will activate.
You can also activate the Light Table tool directly by clicking its icon in the toolbar or pressing the shortcut key D (as in “differences”).
Tip: When working in a team, it can be useful to show the profile picture of your collaborators in the palette next to each version.
For this, grant Light Table access in the settings (click the three dots in the Light Table palette → Settings… → Profiles).
Changing the Comparison Appearance
With the Light Table tool active, both the current outlines and the outlines of the selected version are displayed.
You can modify the appearance of this comparison in the Light Table settings (click the three dots in the Light Table palette → Settings… → Comparison)
Hold down the Shift (⇧) key to switch between the current version and the selected version.
The comparison outlines will be inverted, and the the Info box of the layer will show the values from the selected version.
Also, when holding down Shift and the Space bar, the filled-in outlines of the selected version will be displayed.
Aligning the Compared Outlines
Often, the sidebearings of layers will change between versions.
This can make it difficult to see the actual changes to the shapes of the layer outlines.
To ignore the sidebearing changes, align the outlines using the align left, align center, and align right options in the Info box.
Choose the no alignment option to not align outlines, which is the default behavior.
You can also pick a different default by Option-clicking one of the options or in the Light Table settings (click the three dots in the Light Table palette → Settings… → Comparison).
Comparing Fonts with Font Proofer
If you have the Font Proofer app installed, then you can create a Font Proofer document comparing the current version with a previous version.
Right-click a version in the Light Table palette and choose Compare in Font Proofer…
Restoring Versions
You can restore a single glyph or even just a layer from a previous version.
And if needed, you can also restore an entire document from an old version.
If you just want to save the restored document to a file, choose Save to… from the menu.
A save panel will open, prompting you to pick the location where you want the restored document to be saved.
Restoring Glyphs & Layers
With the Light Table tool active, click the restore button.
You will be presented a menu with the following options:
- Restore Glyph
-
First, renames the current glyph to an alternative glyph name like
someGlyph.001
.
Then, restores the glyph from the selected version.
Restoration details
- Unicode code points shared by the current and the restored glyph are removed from the current glyph and kept on the restored glyph.
- Other code points of the restored glyph that are already used in the font are removed from the restored glyph.
- Restore Glyph as “…”
-
Restores the glyph from the selected version under a new name like
someGlyph.001
in the current font.
The current glyph is left unchanged.
Restoration details
>Unicode code points of the restored glyph that are already used in the font (either by the current glyph or any other glyph) are removed from the restored glyph.
- Restore Layer
-
First, creates a backup layer with the contents of the current layer.
Then, replaces the current layer with the layer from the selected version.
- Restore Layer as Backup Layer
-
Restores the layer from the selected version as a backup layer.
The current layers are left unchanged.
- Restore Layer as Background
-
Restores the layer from the selected version by replacing the current background.
Any paths, anchors, and other elements on the current background will first be deleted.
Restoring Documents
In the Light Table palette, right-click a version.
In the menu that opens, choose either Open in New Window or Save to…
Open in New Window will open the document from the selected version in a new window.
This allows you to inspect the document as it was back then.
For example, you might want to have a look at its font info or copy glyphs into the current document.
Use File → Save to save the restored document to a file.