Giter VIP home page Giter VIP logo

Comments (4)

kevinschaul avatar kevinschaul commented on June 12, 2024

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.

rjmoggach avatar rjmoggach commented on June 12, 2024

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.

mbloch avatar mbloch commented on June 12, 2024

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.

mbloch avatar mbloch commented on June 12, 2024

Font configuration is covered in issue #86, so I'm closing this issue.

from ai2html.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.