Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// existing syntax for hosted font-files
$hosted-font: (
'name': 'FranklinGothic',
'stack': ('Helvetica', 'Arial', 'sans-serif'),
'regular': 'franklingothic-regular-filename',
'bold': 'franklingothic-bold-filename',
'bold' 'italic': 'franklingothic-bolditalic-filename',
// safely document any additional font data you want…
'source': 'https://www.fontspring.com/fonts/exljbris/museo-sans'
);
// proposed abstract data-structure syntax
$uri-font-a: (
'name': 'FranklinGothic',
'stack': ('Helvetica', 'Arial', 'sans-serif'),
'regular': (
'woff2': 'data:application/font-woff2;charset=utf-8;base64,d09GMgABAAA…',
'woff': 'data:application/font-woff;charset=utf-8;base64,d09GMgABAAA…',
),
'bold': (
'woff2': 'data:application/font-woff2;charset=utf-8;base64,d09GMgABAAA…',
'woff': 'data:application/font-woff;charset=utf-8;base64,d09GMgABAAA…',
),
);
// proposed css-like syntax
$uri-font-a: (
'name': 'FranklinGothic',
'stack': ('Helvetica', 'Arial', 'sans-serif'),
'regular': (
url('data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAq8ABMAAAAA…') format('woff2'),
url('data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAA2gABMAAAAAGgg…') format('woff'),
),
'bold': (
url('data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAq8ABMAAAAA…') format('woff2'),
url('data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAA2gABMAAAAAGgg…') format('woff'),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.