Closed archietse closed 6 years ago
Any way custom fonts could be defined in a separate file that ai2html loads? It would be slightly annoying to have to include the same fonts text box in all illustrator files.
how about putting css attributes in the object's attributes?
font-family: 'My Great Font', weight: 'bold', style:''
It would still require additonal editing in the HTML to define correct family names, fallbacks, and numeric weights but would avoid having to edit the main script.
Alternatively a sidecar json
file that matches the base fonts list like...
var extra_fonts = [
{"aifont":"Lato-Light","family":"'Lato','Avant Garde','Helvetica Neue',helvetica,arial,sans-serif","weight":"200","style":""},
{"aifont":"Lato-LightItalic","family":"'Lato','Avant Garde','Helvetica Neue',helvetica,arial,sans-serif","weight":"200","style":"italic"},
{"aifont":"Lato-Italic","family":"'Lato','Avant Garde','Helvetica Neue',helvetica,arial,sans-serif","weight":"300","style":"italic"},
{"aifont":"Lato-BlackItalic","family":"'Lato','Avant Garde','Helvetica Neue',helvetica,arial,sans-serif","weight":"900","style":"italic"},
{"aifont":"Lato-Regular","family":"'Lato','Avant Garde','Helvetica Neue',helvetica,arial,sans-serif","weight":"400","style":""},
];
If there's a two step process that requires the font names script then maybe the font name script can output this template json
file optionally as well.
I like @kevinschaul's suggestion of using a separate config file for additional font definitions. The file might also contain settings to override the default settings.
Font configuration is covered in issue #86, so I'm closing this issue.
Possible solution:
ai2html-fonts
text block. Will need to determine easiest way to enter all the elements of the hash that are needed.