Comments (4)
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.
from ai2html.
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.
from ai2html.
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.
from ai2html.
Font configuration is covered in issue #86, so I'm closing this issue.
from ai2html.
Related Issues (20)
- svg layers are out of order in the html output
- Folder with same .ai name HOT 5
- Wrap everything in a <html> line HOT 2
- Can't retain URLs...
- Better printing through avoiding page breaks HOT 1
- Multiple instances of single ai2html file placed in a Freebird lose images on the page.
- Script/CSS to external files HOT 2
- Can't export image HOT 2
- Provide examples HOT 1
- Create SECURITY.md HOT 2
- Support for disabled JavaScript
- Add <span> inside <p> on text blocks to make it easier to apply backgrounds to text
- Need to preserve layer stacking order for :div, :symbol and :svg layers in the html output.
- Feature request: Option to not modify ai file HOT 4
- Rasterized text HOT 2
- Single div problem HOT 1
- Idea: Set an explicit pixel width for text boxes HOT 1
- Text as children of a parent group HOT 1
- Inset maps
- `inline_svg: true` throws an error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ai2html.