You are on page 1of 6

MAY 10, 2020

Code, script, app, program, markup

● Programming
○ Javascript
○ Python
○ C
○ C++
Swift
○ Java
● Markup
○ HTML
○ CSS
○ Hello *world* (markdown: human readable version of markup)

● Font File
○ Font info (designer, copyright, family name)
■ Vertical Metrics
■ Postscript info
○ Glyphs (list)
■ Glyph Names
■ Unicode value(s)
■ Color label
■ Note
■ Custom Proofer info
■ Side bearings and width
■ Glyph
● contours/paths
○ Vector point: coordinates (straight/curve smooth?)
● components
■ Hinting
○ Metrics
○ Kerning
○ OT Features
■ Substitutions
■ Positioning (Kerning)
○ Other metadata
■ Language support

Landscaping of scripting and tools for type designers


● Vanilla—allows you to build a basic UI
● Scripts
● Plugins & Extensions

API— Application Programming Interface


What aspects of a script allow you to control RoFo or Glyphs

Strings: ‘Hello World’


Function on a string to replace the string = ‘Type at Cooper’.replace() and it needs two
values
Variable: Camel case...scriptName
Numbers
Integers: 19
Float: 3.4

Boolean: True or False (Always has a capital first letter), None (works like False)
List: Order matters, straight brackets… [1, 2, 3, 4, 5] separated by a comma
Each item in a list has an index
Dictionary: in between braces, and is unordered {} two pieces of info, the name “key” and the value
“value”
Keys needs a colon between itself and the Value
The Key needs to be a string.
If you have multiple key/value pairs, separate them with a comma

[ ] define a list
{ } define a dictionary,
But whenever you need to define something from either, use [ ]
len = length
replace() needs two values .replace(‘C’, ‘G’)

Comment = anything on the line after a numbersign (#)

When writing a script, you need to be able to get the information that’s already defined
thisFont = Glyphs.font

print (thisFont.designer)
MAY 17, 2020
Atom
CMD+Shift+L, when all selected, selects each line individually
CMD+F, then
Option+Return: puts a cursor at what is found
Cmd+J: join all selected onto one line
Comment Out = Cmd+/

Tuple: like a list

for ___ in ___ :

== : defines a value (is this equal to that?)

pass : what you put in an if or else it prevents an error by having something in it

!= : means not equal to

if not : at the beginning of if else statements


May 24, 2020

Atom: Cmd+Shift+F = Searching in all of the folders

for glyph in thisFont.glyphs :


This is a loop

“glyph” is an arbitrary name used to define a variable that runs in the loop

str( ) converts anything into a string


MAY 31, 2020

You might also like