diff --git a/GlyphConstruction.roboFontExt/html/index.html b/GlyphConstruction.roboFontExt/html/index.html index 1011219..c2a2730 100644 --- a/GlyphConstruction.roboFontExt/html/index.html +++ b/GlyphConstruction.roboFontExt/html/index.html @@ -8,7 +8,7 @@
-Glyph Construction is a simple, powerful, human-readable language for describing how glyph shapes are built.
Glyph Construction can be used to create new glyphs from components. It is specially useful for creating accented glyphs.
Collections of Glyph Construction rules can be saved as *.glyphConstruction
files, and can be shared between fonts.
Build <destGlyphName>
out of one or more components.
<destGlyphName> = <glyphName> + <glyphName> -Aacute = A + acute -
<destGlyphName> = <glyphName> + <glyphName>
+Aacute = A + acute
+
Optionally, a suffix can be provided. If a glyph with the given suffix does not exist in the font, the suffix is ignored.
-Aacute = A + acute.cap
-
Aacute = A + acute.cap
+
A line starting with (or anything after) a #
is a comment and will not be used during execution.
# this is a comment -Aacute = A + acute -Agrave = A + grave # this is a note -
# this is a comment
+Aacute = A + acute
+Agrave = A + grave # this is a note
+
A comment #
at the end of a glyph construction is a note.
<destGlyphName> = <glyphName> + <glyphName> # <note> -Aacute = A + acute # this is a note -
<destGlyphName> = <glyphName> + <glyphName> # <note>
+Aacute = A + acute # this is a note
+
Unicodes in hexidecimal notation. Multiple Unicodes accepted, separated by commas. Glyph Builder: If Unicodes are provided, they will be used even if "AutoUnicodes: True" is set.
-<destGlyphName> = <glyphName> + <glyphName> | <unicode>, <unicodes>* -Aacute = A + acute | 00C1 -Tcommaaccent = T + commaaccent @ bottom | 021A, 0162 -
<destGlyphName> = <glyphName> + <glyphName> | <unicode>, <unicodes>*
+Aacute = A + acute | 00C1
+Tcommaaccent = T + commaaccent @ bottom | 021A, 0162
+
<destGlyphName> = <glyphName> + <glyphName> ! <rgba> -Aacute = A + acute ! 1, 0, 0, 1 -
<destGlyphName> = <glyphName> + <glyphName> ! <rgba>
+Aacute = A + acute ! 1, 0, 0, 1
+
<destGlyphName> = <glyphName> + <glyphName> ^ <width> -Aacute = A + acute ^ 400 -
<destGlyphName> = <glyphName> + <glyphName> ^ <leftmargin>, <rightMargin> -Aacute = A + acute ^ 30, 30 -
<destGlyphName> = <glyphName> + <glyphName> ^ <width>
+Aacute = A + acute ^ 400
+
<destGlyphName> = <glyphName> + <glyphName> ^ <leftmargin>, <rightMargin>
+Aacute = A + acute ^ 30, 30
+
Width and margin values can also be defined using basic maths and references to width
, leftMargin
or rightMargin
of other glyphs.
# width is equal to twice the width of A -Aacute = A + acute ^ A * 2 - -# left margin is equal to one third of the left margin of A -# right margin is equal to twice the right margin of B -Aacute = A + acute ^ A / 3, B * 2 -
# width is equal to twice the width of A
+Aacute = A + acute ^ A * 2
+# left margin is equal to one third of the left margin of A
+# right margin is equal to twice the right margin of B
+Aacute = A + acute ^ A / 3, B * 2
+
Use a '
to flip to the opposite side of given glyph margin.
# left margin is used for the right margin of the generate d.alt -d.alt = d ^ d', d' -
# left margin is used for the right margin of the generate d.alt
+d.alt = d ^ d', d'
+
Add *
before a glyph construction rule to explicitly tell the constructor to decompose the final result.
*agrave = a + grave
-
*agrave = a + grave
+
Add >
before a glyph construction rule to include the source font glyph name in the final result.
# include the the drawing of the source font 'a' -# and set the spacing to 40 for the left margin and 50 on the right margin. ->a = ^ 40, 50 -
# include the the drawing of the source font 'a'
+# and set the spacing to 40 for the left margin and 50 on the right margin.
+>a = ^ 40, 50
+
Add ?
before a glyph construction rule to ignore this glyph if it already exists in the font.
?Aacute = A + acute
-
?Aacute = A + acute
+
The Glyph Construction language offers different ways to position the added components in relation to the current glyph.
-Aacute = A + acute@100 -Aacute = A + acute@100,100 -
Aacute = A + acute@100
+Aacute = A + acute@100,100
+
Aacute = A + acute@50%,50%
+
Aacute = A + acute@50%,50% -
Aacute = A + acute@center,top
-
Aacute = A + acute@center,top
+
A reference could be (in this order):
descender
, xHeight
, capHeight
, ascender
top
, bottom
, left
, right
, innerLeft
, innerRight
, center
, origin
, width
@
followed by a transformation matrix: 6 values xx, xy, yx, yy, x, y
Aacute = A + acute@1, 0, 0, 1, 100, 100 -
Aacute = A + acute@1, 0, 0, 1, 100, 100
+
The current glyph is always the last component added.
For example, Aacute = A + acute
will:
acute
(the current glyph is A
)Force the current glyph with @<glyphName>:<pos>
:
Ocircumflexdotaccent = O + circumflex@center,top + dotaccent@O:center,bottom
-
Ocircumflexdotaccent = O + circumflex@center,top + dotaccent@O:center,bottom
+
The forced glyphName
can also be escapped with "
in case the glyph name
contains a :
Ocircumflexdotaccent = O + circumflex@center,top + dotaccent@"O:latn":center,bottom -
Ocircumflexdotaccent = O + circumflex@center,top + dotaccent@"O:latn":center,bottom
+
~
followed by a position will flip a component:
# flip horizontally +- +# flip horizontally Aacute = A + acute@~center,top # flip vertically @@ -219,39 +200,33 @@
Flipping
# flip both horizontally and vertically Aacute = A + acute@~center,~top -
Aringacute = A + ring@center,top + acute@center,top
-
Aringacute = A + ring@center,top + acute@center,top
+
Aringacute = A + ring@center,`top+10` + acute@center,`top-10`
-
Aringacute = A + ring@center,`top+10` + acute@center,`top-10`
+
ffi = f & f & i
-
ffi = f & f & i
+
Start a sub-glyphConstruction with a backslash to indicate kerning should be applied while stacking horizotally.
-A_V = A &\ V
-
A_V = A &\ V
+
Glyph Construction supports variables, which can be defined once at the top of the document and used multiple times.
-$name = something # declaration +- +$name = something # declaration {name} # usage $myColorMark = 1, 0, 0, 1 # declaration agrave = a + grave@center,top ! {myColorMark} # usage -
The status bar at the bottom of the window displays information about the currently selected glyph: glyph name, width, left and right margins, component names, unicode, mark color, and note.
Preset build checkboxes in the comments of the constructions.
-# OverwriteExistingGlyphs: True/False -# AutoUnicodes: True/False -# MarkGlyphs: False/r, g, b, a -
# OverwriteExistingGlyphs: True/False
+# AutoUnicodes: True/False
+# MarkGlyphs: False/r, g, b, a
+