Composite and Auto Glyphs»

Note

In FontLab VI, glyph drawings exist on each layer separately. So in this context, when we say glyphs we are, in fact, talking about glyph layers. It is important to understand that a glyph can be simple in one layer, and composite or auto in another layer.

Based on how they are constructed and what kind of elements they are made up of, glyphs in FontLab VI can be classified into three categories:

Simple glyphs»

A simple glyph consists of one simple element — either a set of contours or an image. If the glyph has a contour element, it has a simple black fill, no stroke, no element-level transformation and is not referenced anywhere else in the font. Such a glyph can be created using FontLab’s vector drawing tools, and will be natively exported into common font formats. If the simple glyph is made up of an image, it will be exported into bitmap-based color font formats. In either case, a simple glyph can contain anchors as well as other objects, which are not included in the common exported font formats, such as glyph guides and stickers.

Composite glyphs»

A composite glyph consists of multiple simple or compound elements. You can add, remove or position each element. You can apply element-level transformation to each element.

Components and Element References»

In a composite glyph, you can re-use elements which are also used in other glyphs. FontLab has two methods for this: Components and Element References.

Some elements in a composite glyph can be Components.

If you want to edit a Component’s source glyph, double-click the component and the source glyph will open for editing next to your current glyph. The changes you make to the component’s source glyph will be propagated across the font because it is linked to references in other glyphs.

Some elements in a composite glyph can also be Element References.

If you try to edit an element reference, depending on whether it is locked or not, either its original (or primary) version will open for editing or you’ll be able to edit it in place. Remember that in both cases, the changes you make to the element reference will be propagated across the font because it is linked to references in other glyphs.

In a composite glyph, glyph guides, anchors, advance width and sidebearings are all independent of any element references it might contain.

If a composite glyph contains only locked references, it works like a composite glyph in TrueType-flavored OpenType, FontLab VFB or UFO fonts.

Components»

A Component in FontLab is an element that points to the same layer of another glyph, the Component’s source glyph, and “borrows” (inherits) the source glyph’s contents (contours). If you change the source glyph, all components in other glyphs that point to the source glyph will update. If you’ve used Components any other font editor, you’ll find yourself at home easily.

A Component has its own transformation (usually shift, optionally also scale, rotation or slant).

Components are great if you build composite glyphs from other glyphs. For example, you can Adieresis from the Components A and dieresiscomb. You can use nested Components that point to glyphs that are made of Components, so for example, you can build a dieresiscomb glyph from two dotaccentcomb Components, and then build Adieresis from the Components A and dieresiscomb.

You can build composite glyphs from Components in one or all masters — via Generate Glyphs, Add Component, Copy-Paste or Auto Layers. You can mix Components and other elements (including Contour elements) within the same glyph layer.

FontLab will keep your Component structure when it exports your font to a format that supports components (TTF, VFB, UFO), and will decompose Components as needed when a format does not support components at all, or does not support some aspects such as rotated Components or Components mixed with contours.

Note

Previous versions of FontLab VI simulated components using Element References, by locking some references and dynamically finding the best candidate glyph for a component source. But this was never a fully satisfying experience, so we’ve decided to add Components as a separate element type.

Element References»

Element References work great when you want to re-use a design pieces such as a stem, a serif or other glyph fragments (contours or images) across multiple glyphs in the same layer, and maintain a link between all the places where you’ve placed it. You can use Element References to work with repeatable shapes across a font. All Element References are equal. There is no source glyph to which they point to — they all link to each other. Element References have no knowledge about glyph metrics or anchors. In a way, they’re very similar to subroutines used in PostScript-flavored (CFF) OpenType fonts.

FontLab VI 6.1 has both Components and Element References, each to fit its purpose.

You can build composite glyphs from Components in one or all masters — via Generate Glyphs, Add Component, Copy-Paste or Auto Layers. You can mix Components and simple contours in one layer. You can use nested Components that point to glyphs that are made of Components (for example, you can build a dieresiscomb glyph from two dotaccentcomb Components, and then build Adieresis from the Components A and dieresiscomb).

FontLab VI will keep your Component structure when it exports your font to a format that supports components (TTF, VFB, UFO), and will decompose Components as needed when a format does not support components at all, or does not support some aspects such as rotated Components or Components mixed with contours.

Any element can be referenced in multiple glyphs. Each element reference shares the same contours, element guides and pins, but has its unique transformation (position, scale, rotation, slant) as well as, for color fonts, its own fill color and stroke color and thickness.

Element > Add Element Reference… will open a dialog which allows you to select and insert elements by glyph names in the list:

Start typing the glyph name and then choose the element you need from the list. When you click on OK, a reference to that element will be pasted to the current glyph layer.

Element references (or references) are linked. If you edit the contents of one reference, the other references change as well.

Element references can work like traditional components. You place an unlocked reference to an element in a primary glyph (such as A). There, you can edit the contours. Then, you place locked references to the same element in other glyphs (e.g. Aacute, Adieresis). When you try to edit the contents of a locked reference, FontLab will open the primary glyph where you can modify the contours, and the changes will propagate to all the locked references. So locked references behave like TrueType, UFO or VFB components.

However, you can always unlock some or all of the locked references. Then, you can also edit the contours in-place in each unlocked reference, and the changes of the element contents will propagate to all references including the one in the primary glyph. So in fact, the primary glyph is just one of the glyphs that contains a reference to a given element where that reference is unlocked. If a reference is unlocked only in one primary glyph, FontLab will use that glyph as the contour glyph when generating fonts in formats that support components (TrueType-flavored OpenType, VFB or UFO), while all the other references will be exported as components. If you unlock more than one reference, FontLab will automatically pick the best contour glyph.

If a glyph is an auto glyph in the current layer or master (i.e. the current layer has the Auto layer property turned on in the Layers and Masters panel), then FontLab tries to automatically build the contents of the layer by adding anchors, adding and positioning element references from the primary glyphs, and by inheriting the sidebearings of the base glyphs. As long as the layer is an auto layer, you cannot manually edit or position the metrics, any anchor, guide, element or its contents — but you can define a custom glyph generation recipe to tell FontLab how the layer should be generated. If you turn the Auto layer property off, you will be able to edit the contents of the glyph.

++++

Auto glyphs»

An auto glyph is an “automatic composite glyph”, which is generated automatically from predefined recipes. It contains components, i.e. references to primary glyphs, and is updated automatically whenever you change the contours, element positions, anchors or metrics in any primary glyph. An auto glyph also inherits its advance width and sidebearings from its components.

You cannot manually add or remove the contents of an auto glyph, only provide a custom recipe that tells FontLab how to generate it. To manually edit the elements in an auto glyph, you need to convert it to a composite glyph.

Note

When you export a font into the OpenType TT, VFB or UFO format, FontLab tries to transform its composite and auto glyphs into composite glyphs suitable for that format. When you export into OpenType PS format, FontLab will use composite glyphs for CFF subroutine compression. Composite glyphs may also contain bitmap color images or SVG images that can be exported to Font Formats that support color glyphs.