Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

Add Travis job to build fonts automatically #30

Merged
merged 1 commit into from
Aug 8, 2017

Conversation

maximbaz
Copy link
Contributor

@maximbaz maximbaz commented Aug 8, 2017

This creates a Travis job to solve #25.

@kevinranks it is needed to put job in this repo, because changes to assets should trigger building a new font. Travis will build font on every commit (so that you get early notification if build breaks for some reason), but it will attach the font to the release only when you push a git tag.

Hypothetically it is possible to choose a different location for uploading fonts (see section Deployments and Uploads on the left side), but it's not immediately obvious how to configure the job to attach to fonts to another repo.

Since attaching fonts to the releases in this repo is simple, maybe let's keep it like that, and you can then manually copy the font and also upload to another location?


What the owner of this repo/org should do after this is merged:

  • On Github:
    • Go here, generate a new token and assign it "public_repo" scope. Make sure to copy it!

image

  • On Travis:

image

  • Go to project settings:

image

  • In the section "Environment variables" create a new variable with name "GITHUB_OAUTH_TOKEN" and value of the token that you generated on the first step.

Then try to commit something to this repo, and see that the build is triggered and succeeded. Next time you will push a tag it will also trigger the job, but then additionally attach "emojione-android.ttf" to the release.

@kevinranks kevinranks merged commit b205bd9 into joypixels:master Aug 8, 2017
@kevinranks
Copy link
Contributor

Thanks for the thorough instructions, saved me some time for sure.

I just tagged a commit and it appears to have built the android font and attached it to the release.

It would be great if the other fonts could be generated at the same time that way we could address issue #534 which states that the size of the font files are preventing jsdelivr from properly hosting the latest releases.

@maximbaz
Copy link
Contributor Author

maximbaz commented Aug 8, 2017

Great 🎉

It was my intention as well to eventually generate all font files, the Docker image was developed with this thought in mind. The problem is - I don't know how to generate the other fonts 😃

I got the instructions for building Android font together with the build scripts from @mxalbert1996, but I'm not aware of any such scripts for other fonts. @vXBaKeRXv knows how to build Apple font by hand, but he mentioned somewhere that it is very difficult to automate this process at the moment.

At any rate, when we learn how to compile other fonts, the compilation itself should be added in the docker-emojione-fonts-build/build.sh and the uploading of a file to the release should be added in .travis.yml

@kevinranks
Copy link
Contributor

kevinranks commented Aug 8, 2017

Thanks Maxim. Hopefully we can get the other contributors to chime in with their thoughts here and figure out a good process moving forward.

In the meantime, perhaps I'll copy the font files from Emojione/emojione/extras/fonts to this repo and tag a new release in both repos. That way the fonts will be removed from the main repo and jsdelivr can update.

Should we modify this Travis-ci build to commit/update the android font within the repo rather than just attaching it to the release? Thoughts?

@maximbaz
Copy link
Contributor Author

maximbaz commented Aug 8, 2017

I wonder if it's nicer to store fonts attached to the release and not in the repo itself, that way we can see which fonts are up-to-date and which are built on older assets. You can also link people to the releases page directly, and they will see fonts next to versions.

You can just download fonts from emojione/emojione/extras/fonts and attach them to the existing release - right?

@vXBaKeRXv
Copy link

Mainly need FontTools to add support for 'morx' table to automate a AppleColorEmoji aka Sbix emoji, like Googles noto emoji project.

You can automate it with a gsub instead but morx is the standard table for ligatures in a Sbix font.

@maximbaz
Copy link
Contributor Author

Does such feature request already exist for FontTools, or could you create it and post a link here? 🙂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants