GithubHelp home page GithubHelp logo

Add to package managers about inter HOT 11 CLOSED

rsms avatar rsms commented on May 17, 2024 8
Add to package managers

from inter.

Comments (11)

ocean avatar ocean commented on May 17, 2024 4

Hi @rsms, love the typeface. I am looking at making a PR to add it to the typefaces Github repo, which would make it available through NPM and in a more centralised way, would that be alright?

Open to suggestions…

from inter.

meyer avatar meyer commented on May 17, 2024

@philipbelesky assuming you’re using git, you could add the repository as a git submodule.

from inter.

philipbelesky avatar philipbelesky commented on May 17, 2024

That's possible although not preferred; they're a bit tricky to setup and can create problems during deployment. From what I can tell it's very common to have a distribution version of a font on npm/bower to get around these issues.

from inter.

buschtoens avatar buschtoens commented on May 17, 2024

I'd love to submit a PR for npm support! I guess interface-font is a suitable name.

from inter.

rsms avatar rsms commented on May 17, 2024

Yeah, you definitely don't want to include the source repository. Not only is it huge, but it also does not contain the actual font files (well, docs/ contains some web fonts, but not promises are made there that they will stay around.)

You'll likely want to create a package based on the archive distributions (https://github.com/rsms/interface/releases)

from inter.

buschtoens avatar buschtoens commented on May 17, 2024

I would ideally run make in the pre-publish step and only include the dist output in the package. However, I can't get a build. 🙁

10:18 $ ./init.sh
‘build/venv/bin/woff2_compress’ -> ‘../../deps/woff2/woff2_compress’
You now need to activate virtualenv by:
  source './init.sh'
Or directly by sourcing the activate script:
  source 'build/venv/bin/activate'
✔ ~/github/interface [master|✔] 
10:18 $ source ./init.sh
(venv) ✔ ~/github/interface [master|✔] 
10:18 $ make
misc/ufocompile --otf Regular
Traceback (most recent call last):
  File "misc/ufocompile", line 93, in <module>
    os.path.join(args.out, 'InterfaceUFO', 'features.fea'))
  File "/usr/lib64/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: '/home/jan/github/interface/build/tmp/InterfaceUFO/features.fea'
make: *** [build/tmp/InterfaceTTF/Interface-Regular.ttf] Error 1
(venv) ✘-2 ~/github/interface [master|✔] 

build/tmp is empty.

from inter.

rsms avatar rsms commented on May 17, 2024

You need to build it on a macOS system, currently. If you want to build it elsewhere, you'll need to modify init.sh to—in some way—create a filesystem directory for temporary build products where the file system is case-sensitive (case-preserving is not enough). The current init.sh script creates and mounts a virtual file system that's specific to macOS.

from inter.

rsms avatar rsms commented on May 17, 2024

Also, it could be unrelated. Perhaps the Python code that copies the features.fea file has a bug.

Relevant init.sh part: https://github.com/rsms/interface/blob/ca5fe60c999fa94bc0b8c051eeb0f351ed878fed/init.sh#L146-L152

Relevant copyfile part: https://github.com/rsms/interface/blob/d4678c2ed43c7abb736804e1c79a769fed6a6c19/misc/ufocompile#L91-L93

from inter.

rsms avatar rsms commented on May 17, 2024

@ocean Sounds good to me. The way I'd do this is with a simple script that talks with the GitHub API for getting the latest release and distribute the contents of the release's archive.

Building from source not only requires macOS (or modifications to the build system to support other file systems), but also is a very resource-intesive task (many minutes on eight i7 cores.) So I'd strongly recommend distributing the official releases. 🙂

from inter.

philipbelesky avatar philipbelesky commented on May 17, 2024

Hey, based on the above discussion I've created a distribution repository that just packages the released files. This has been published to npm/yarn. I've tried to make it absolutely clear that @rsms is the author and that my repo is just a mirror, but please let me know if you'd like the wording/attribution modified. Not sure if you wanted to mention the npm/yarn versions in the documentation, but it might be worth considering.

@ocean's issue on the typefaces repo is still open but I didn't want to spend the time to figure out how the typeface project's build automation process works. If that Issue closes though I'd be happy to deprecate my repo. Until then I'm happy to just manually update the files as new versions of Interface are released.

Note also that the npm/versions are currently just providing the woff/woff2 files to keep overall size down, but I would happy to include the other ones if there is a compelling reason to do so (I'm assuming the use case here is mostly for web typography).

from inter.

philipbelesky avatar philipbelesky commented on May 17, 2024

Closing this as the npm package is what I had originally intended and seems to be ticking along fine. Would be great to see it in other distribution platforms though!

from inter.

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.