Skip to content

Instantly share code, notes, and snippets.

/*
Exercise 2B: Flexible typeface family
defining instances directly in CSS
*/
@font-face {
font-family: "MyFamily";
src: url("MyVariableFont-Roman.otf");
font-style: normal;
}
@gferreira
gferreira / varfonts-css_03.css
Last active April 18, 2023 14:31
Univers in CSS
/*
Exercise 3:
Univers in CSS – a tribute to Adrian Frutiger
39
45 46 47 48 49
53 55 56 57 58 59
63 65 66 67 68
73 75 76
83
/*
Exercise 2: Flexible typeface family
mapping named instances in a variable font w/ width & weight axes
to CSS font-weight / font-style / font-stretch properties
*/
/* Regular */
@font-face {
font-family: "MyFamily";
@gferreira
gferreira / varfonts-css_00.css
Last active September 27, 2016 22:23
variable fonts in CSS, exercise 1
/*
Exercise 1:
Using a typeface packaged as 2 variable fonts (Roman/Italic), to style a simple document with 3 levels of information (headline, body text and small text).
We'll make 3 style-linked families, one for each info level: "MyFamily Text", "MyFamily Headline" and "MyFamily Caption".
The first two families will use **named instances** contained in the font.
The third family (Caption) will be created with custom instances defined numerically in the CSS.
*/
/* ---------------------
family 1: body text
@gferreira
gferreira / RFMechanic_stylish.css
Created April 18, 2016 14:04
css tweak for robofontmechanic.com, for use with stylish
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("http://www.robofontmechanic.com/") {
.extension:hover {
background-color: #FDD;
}
.extension:hover > *,
.extension:hover .name a,
.extension:hover .author a {
color: #F00 !important;
@gferreira
gferreira / drawing-from-top-left.py
Created August 5, 2015 13:06
Drawing from the top-left corner in DrawBot
# drawing from top-left
translate(0, height())
scale(1, -1)
rect(20, 20, 200, 200)
@gferreira
gferreira / diacritico-conversa.txt
Created July 12, 2015 17:11
notas para conversa no DiaCrítico
# DiaCrítico : notas para conversa do dia 13/06/2015
## 1. ferramentas para design de tipos & producão de fontes
- qual a vantagem do formato ufo?
- diferenças (conceituais e práticas) entre Glyphs e RoboFont
- limitações do formato OpenType
@gferreira
gferreira / square.py
Created July 5, 2015 12:45
Simple object example in DrawBot
class Square(object):
fillColor = 1, 0, 0
def __init__(self, side):
self.side = side
def draw(self, pos):
x, y = pos
fill(*self.fillColor)
@gferreira
gferreira / gist:77fc99aafcb708000ee0
Created June 23, 2015 13:28
An Image object which supports horizontal/vertical flipping
# flip image
class Image(object):
flip_x = False
flip_y = False
alpha = 1.0
def __init__(self, image_path):
@gferreira
gferreira / InternationalMaritimeSignalFlags_Remix.py
Last active August 29, 2015 14:23
International Maritime Signal Flags — CodeFont Remix
"""
International Maritime Signal Flags
by Christopher P. Cacho @thenss
CodeFont Remix by Gustavo Ferreira @hipertipo
"""
# colors