Visagrafía®
English

Font creation

The font is what turns visagrafía® into text: with it installed, the characters the keyboards write show as ideograms in any program. VisaSoft Studio generates the font directly from the vectors of the collection, with no manual steps, and regenerates it whenever something changes. This page explains how it does it, why the glyph page is decisive and what every option of the export dialog means.

What is inside the font

The font of a locale is a TrueType file (.ttf) with:

Only the live versions go in: whatever sits in a working copy or in an unpromoted version does not exist for the font.

How every glyph is built

  1. The ideogram is drawn exactly as in the editor: every reference resolves to its grapheme (live or pinned), and position, scale, rotation and thickness are applied.
  2. The Bézier curves are flattened into polylines.
  3. Strokes become outlines: every stroke is expanded by half its thickness on each side, with round caps and joins. Filled shapes are taken as polygons (thickened if they carry a thickness ×).
  4. All shapes are merged into a single geometry, so overlaps produce no holes under the fill rule.
  5. The geometry is written as TrueType contours of straight segments.
  6. The glyph's advance width (how far the cursor moves) is the right end of its ink plus 40 units; the left side bearing is its left end.

Since on the canvas one unit is one font unit and the canvas origin is the font origin, the ideogram's coordinates go as they are into the glyph. There is no intermediate scale or offset: what you see in the editor with the page shown is what the character will take up.

Why the page matters

The editor's glyph page is the font's em square: a square of 1,000 units whose bottom-left corner sits 200 units below the origin.

ZoneCoordinatesWhat happens to ink that falls there
Inside the page, above the baselinex 0–1,000, y 0–800The normal body of the character: at 72 px the page measures 72 px.
Descendery −200 to 0Hangs below the baseline, like the tail of a g. Right for what really hangs; the corpus reaches −330.
Above 800y > 800Sticks out at the top: invades the previous line in a multi-line text and may be clipped by programs that do not honour the real height.
Left of 0x < 0Overlaps the previous character. By rule of the collection, no ideogram starts left of 0.
Right of 1,000x > 1,000The glyph is wider than an em: the advance grows and the ideogram "takes more room" than its neighbours.

The practical consequences follow:

The Export font dialog

The Export font dialog with the three normalizations ticked.
The Export font dialog with the three normalizations ticked.

It opens from the collection detail (Export font… button) or from File → Export font…. It needs the export font permission on the collection and at least one ideogram. Exporting is a publishing step, not an editing one, which is why it lives in the detail and not inside the editor.

Locale

The locale whose font is generated. Every locale produces its own font, because the same concept may have a different ideogram in each and because the family name carries the locale so that they can all be installed at once.

Unicode range

Which concepts go in, by code point:

OptionRangeWhen to use it
Private Use Area (E000–F8FF)The Private Use Area of the basic plane. Default: holds every concept of the corpus (6,400 positions) and the grapheme glyphs.Always, except special cases.
Supplementary PUA-A (F0000–FFFFD)Plane 15.Only if a corpus grew beyond the basic plane.
Basic Multilingual Plane (0000–FFFF)The whole basic plane.Same as the first for the current corpus.
All codepointsNo filter.Same.
Custom range…Two hexadecimal fields From and To.To generate a partial font: for instance only the first hundred concepts for a test, or a subset for teaching material.

The figures panel updates live: will export (ideograms in the range), in the locale (the locale's total) and the range in hexadecimal. If no ideogram falls in the range, the export button is disabled and a warning shows.

Font name

The family name programs will show in their font menus. "Collection locale" is proposed (for instance VisaSoft 4.0 es_CO); you may change it, and from then on the dialog stops overwriting what you typed. That same "collection locale" name is what the keyboards and the text editor use to tell the faces of a locale apart: a language package of another collection installs on the keyboards as one more face of the same locale, and sent messages carry the name of the face they were written with. The PostScript name is derived by dropping spaces and symbols. Every locale should have a distinct name so the fonts coexist installed; and successive versions should keep the name, so documents already using it switch to the new font unchanged.

File name

The name of the downloaded .ttf. It is proposed from the family name and must contain the locale (the field turns red otherwise): the fonts of two locales can never be mixed up that way. If it does not end in .ttf, that is appended; characters invalid in a file name become _.

Normalize the ideograms

Three optional adjustments that rewrite the geometry of every glyph separately when the font is generated, without touching the collection. They yield a uniform font from a corpus drawn with uneven criteria.

OptionWhat it doesParameter
Shift each ideogram so its leftmost point sits at x =Moves the glyph horizontally until its ink starts exactly at the given value. Fixes uneven left margins.Value in font units, −100 to 100; 0 by default (the em's edge).
Shift each ideogram so its lowest point sits at y =Moves the glyph vertically until its lowest ink sits at the given value. With 0, every ideogram "rests" on the baseline; with a negative value, all hang the same. Removes each drawing's natural descender.Value in font units, −100 to 100; 0 by default.
Normalize scale factorScales the glyph with the same factor on X and Y (keeps the proportion) until its ink fills the em (1,000 wide, 1,000 tall between −200 and 800), times the filling percentage. Evens out the size of every ideogram: small ones grow and large ones shrink.filling: 80 to 120 %; 95 % by default, to leave air between adjacent ideograms that fill the whole width. 100 % touches the edges; over 100 % overflows on purpose.
Only ideograms that do not fitRestricts the scaling above: only ideograms larger than the box are shrunk; those that already fit keep their size and, when the shifts are ticked, are just moved to the origin. Fixes the oversized ones without touching the relative size of the rest.Checkbox, available once Normalize scale factor is ticked. "Fitting" is measured against the box already multiplied by filling.

When any of the three is on, every glyph's advance is computed from its normalized ink. The three combine: scale first, then position. With all three ticked and the default values, every glyph of the font takes exactly the same box, 0 to 950 wide and 0 to 950 tall.

The section Normalization in pictures shows the effect of each setting on twenty ideograms of the corpus.

SituationRecommendation
Reading font from a well-composed collection (the reference corpus)No normalization: the relative size each sign was drawn at is respected.
Well-composed collection except for a few ideograms that overflow the pageAll three, with Only ideograms that do not fit: relative sizes are respected and only the ones invading the neighbouring lines shrink.
Collection drawn by several people at uneven sizesNormalize scale factor at 95 % and lowest point at y = 0.
Font for palettes, keys or tables where every ideogram must fill its cellAll three, at 100 %.
Text font where nothing may hang below the glossLowest point at y = 0 and, if needed, scale.

Export

The Export button asks the server for the font and the browser downloads it under the chosen name. The first generation of a large locale takes a few seconds; the next ones with the same parameters are immediate, because the server keeps the font and only regenerates it when a live version changes (the fingerprint of all live content travels as an ETag). The notice "Exporting n ideograms for locale…" confirms the start.

Normalization in pictures

Twenty ideograms of the reference corpus, chosen because they are its extreme cases: five oversized ones (taller than the page), five wide, five short and five thin. Every table carries the word in its first row (in Spanish, the language of the corpus) and, below it, the same ideogram exactly as it comes out of the font under three settings of the dialog:

  1. Not normalized: no box ticked. Every glyph keeps the size and position it was drawn with.
  2. Only those that do not fit: the three boxes ticked with their default values (x = 0, y = 0, filling 95 %) plus Only ideograms that do not fit. The ones that overflow are shrunk; the rest are just moved to the origin.
  3. All: the three boxes, without that restriction. Large ones shrink and small ones grow, until the longer side of each measures 950 units.

Every cell is drawn at the same scale, so sizes can be compared across rows and across tables. The dashed frame is the glyph page (the 1,000 × 1,000 em), the solid line is the baseline, and ink that falls outside the page is painted red. The number under each cell is the scale factor the ideogram received. So that they read well at this size, every figure in this section is drawn with one and the same stroke, thicker than the font's; the size and position of every ideogram are exactly those of the generated font.

Oversized
constanciafuentepapa francesacascadasignos
1 · Not normalized
constancia (Not normalized)fuente (Not normalized)papa francesa (Not normalized)cascada (Not normalized)signos (Not normalized)
2 · Only those that do not fit
constancia (Only those that do not fit)×0.55fuente (Only those that do not fit)×0.68papa francesa (Only those that do not fit)×0.60cascada (Only those that do not fit)×0.64signos (Only those that do not fit)×0.80
3 · All
constancia (All)×0.55fuente (All)×0.68papa francesa (All)×0.60cascada (All)×0.64signos (All)×0.80
Wide
despreciaraltoespañoltíomariposa
1 · Not normalized
despreciar (Not normalized)alto (Not normalized)español (Not normalized)tío (Not normalized)mariposa (Not normalized)
2 · Only those that do not fit
despreciar (Only those that do not fit)×0.65alto (Only those that do not fit)×0.78español (Only those that do not fit)×0.81tío (Only those that do not fit)×0.84mariposa (Only those that do not fit)×0.85
3 · All
despreciar (All)×0.65alto (All)×0.78español (All)×0.81tío (All)×0.84mariposa (All)×0.85
Short
juiciosopor la tardeexclamarguerraventana
1 · Not normalized
juicioso (Not normalized)por la tarde (Not normalized)exclamar (Not normalized)guerra (Not normalized)ventana (Not normalized)
2 · Only those that do not fit
juicioso (Only those that do not fit)×1.00por la tarde (Only those that do not fit)×1.00exclamar (Only those that do not fit)×1.00guerra (Only those that do not fit)×1.00ventana (Only those that do not fit)×1.00
3 · All
juicioso (All)×1.19por la tarde (All)×1.37exclamar (All)×1.20guerra (All)×1.18ventana (All)×1.46
Thin
casadoenerocaballohambrebaño
1 · Not normalized
casado (Not normalized)enero (Not normalized)caballo (Not normalized)hambre (Not normalized)baño (Not normalized)
2 · Only those that do not fit
casado (Only those that do not fit)×1.00enero (Only those that do not fit)×1.00caballo (Only those that do not fit)×1.00hambre (Only those that do not fit)×1.00baño (Only those that do not fit)×1.00
3 · All
casado (All)×1.51enero (All)×1.38caballo (All)×1.61hambre (All)×1.18baño (All)×1.13

The three options, side by side

The same twenty ideograms set as one line of text: one line per setting, all three at the same body size, smaller than in the tables so that the twenty fit on a single line. Every glyph follows the previous one by its advance width, as in a document, with its word underneath. The band is the font's line height (from the descent, −200, to the ascent, 800), with the baseline and a tick where every character starts; ink that leaves the band is red.

1 · Not normalized
The twenty ideograms as one line of text (Not normalized)
2 · Only those that do not fit
The twenty ideograms as one line of text (Only those that do not fit)
3 · All
The twenty ideograms as one line of text (All)

The length of the line changes too: not normalized, the twenty ideograms take 16,786 units; with only those that do not fit, 13,780 (18 % less, because the oversized and the wide ones shrink and nothing grows); with all, 15,205 (9 % less: what those give up is partly taken back by the short and the thin ones as they grow).

What to look at

After exporting

  1. Try it without installing: in the text editor, Format → Load a font to try draws the document with the file you just downloaded.
  2. Install it: on Windows, right-click → Install (or Install for all users); on macOS, open it with Font Book; on Linux, copy it to ~/.fonts and run fc-cache; on Android, the keyboard carries its own font and nothing needs installing.
  3. Publish it on the Downloads page so others can install it (administrators only).
  4. If you changed ideograms, regenerate the locale package (Downloads → Download locale package) for the keyboards: the package carries the font inside.

Frequently asked questions

Why does my new ideogram look huge (or tiny) in the text? Because it was drawn outside the usual size: compare it with the 75 % frame in the editor and rescale it. Or generate the font with Normalize scale factor.

Why does the ideogram overlap the line above? It has ink above y = 800. Lower or shrink it until it fits in the page.

Why does the gloss under the ideogram collide with it? It has a lot of ink below the baseline. Raise it, or export with lowest point at y = 0.

Do the characters change when the font is regenerated? No. Every concept's code point is fixed: a text written with yesterday's font reads with today's.

Can I have two versions of the font installed? Only if they have different family names; otherwise the last one installed replaces the previous one.