The browser is the normal way to tune and build a font. Use commands for batch builds, scripts, custom workspaces or a preview server that runs in the background.
Examples on this page use crossglyph. In an unpacked release, use:
.\crossglyph.cmdin Windows PowerShell;crossglyph.cmdin Windows Command Prompt;./crossglyph.shon macOS and Linux.
Run crossglyph <command> --help for the options in your installed version.
| Command | Purpose |
|---|---|
preview |
Open the browser preview. This is the default command. |
start |
Start the preview in the background. |
stop |
Stop a preview. |
status |
Show the running preview and its version. |
restart |
Restart the background preview. |
build |
Build .cpfont families. |
fetch-fallbacks |
Download bundled fallback faces. |
update |
Install the latest release. |
update --check |
Check for a release. |
update --rollback |
Select the previous installed release. |
Open the first family in the workspace:
crossglyph previewWith no command, CrossGlyph does the same thing:
crossglyphOpen a family by name:
crossglyph preview --family notosansOpen one regular font file outside a discovered family:
crossglyph preview --font one.ttfUse --bold, --italic and --bold-italic to supply the other styles with
--font.
Common options:
| Option | Purpose |
|---|---|
--family NAME |
Open a discovered family. |
--font PATH |
Open one regular face. |
--bold PATH |
Supply a bold face. |
--italic PATH |
Supply an italic face. |
--bold-italic PATH |
Supply a bold italic face. |
--fonts DIR |
Use another font workspace. |
--host ADDRESS |
Bind the preview server to another address. |
--port PORT |
Use another port. |
--no-open |
Start the server without opening a browser. |
Use --png to render one page and exit:
crossglyph preview --family notosans --size 13 --png page.png--size sets the point size. The optional --device flag selects one of the
render geometries included in the current release. Run
crossglyph preview --help for the available values.
Start the preview without keeping a terminal window open:
crossglyph startCheck it, restart it or stop it:
crossglyph status
crossglyph restart
crossglyph stopstart and restart accept preview options. This starts a family on another
port without opening a browser:
crossglyph start --family notosans --port 8123 --no-openstatus reports the address, process, CrossGlyph version, workspace and log.
Use --host or --port with status and stop to name a particular preview:
crossglyph status --port 8123
crossglyph stop --port 8123The background commands are unavailable inside a container. Start the preview in the foreground and let Docker or Compose manage the process.
Build every family that changed:
crossglyph buildBuild one family:
crossglyph build notosansThe name may be a family name or config filename. Several names may be given in one command.
| Option | Purpose |
|---|---|
--fonts DIR |
Use another font workspace. |
-o DIR, --out DIR |
Write to another output folder. |
-j N, --jobs N |
Rasterize this many point sizes in parallel. |
--force |
Rebuild every selected size. |
--list |
Show resolved families and settings without building. |
--fail-on-warning |
Return exit status 1 after a build that produced a warning. |
A normal build skips point sizes whose source files and settings match the last
build. --force ignores that record.
--fail-on-warning does not cancel output. It changes the exit status after
CrossGlyph writes the planned files.
crossglyph build --fonts D:/fonts-work --out D:/fonts-work/cpfontsPass both --fonts and --out when an isolated build must keep its output in
the same isolated folder. The default output is resolved from the normal
workspace before command options are read.
Download the bundled Noto faces into the workspace:
crossglyph fetch-fallbacksThe download includes the general fallback set. The large face used for Chinese, Japanese and Korean is downloaded when a config requests that coverage.
Use --fonts DIR to download into another workspace.
Check now:
crossglyph update --checkInstall the latest release:
crossglyph updateSelect the previous retained release:
crossglyph update --rollbackRestart CrossGlyph after a command-line update or rollback. The browser's Update button restarts a local preview itself.
See Updating for automatic checks, retained files and privacy.
Show the CrossGlyph and render-core versions:
crossglyph --versionSkip the automatic update check for one command:
crossglyph --no-update-check build| Variable | Purpose |
|---|---|
CROSSGLYPH_FONTS |
Default font workspace. |
CROSSGLYPH_OUT |
Default build output folder. |
CROSSGLYPH_HOST |
Default preview address. |
CROSSGLYPH_NO_UPDATE_CHECK |
Disable automatic update checks when present. |
CI |
Disable automatic update checks on build systems. |
Command options override environment defaults.
CrossGlyph returns 0 when a command succeeds. Invalid options, missing inputs
and refused operations return a nonzero status. A build with warnings returns 0
unless --fail-on-warning is set.
For font settings used by build, see Font settings reference.