Cobalt Fonts generator

Today, we are proud to introduce our Cobalt Fonts generator to use them in your hybrid applications powered by Cobalt!

cobaltfont

Font icons are the way to go on the Web for a few years now, because they are vectors, i.e. able to scale without aliasing, and avoid the designer to create a large amount of files.

Font icons in Native Bars

In the first place, Cobalt Fonts were intended to be used in the Native Bars which were introduced lately.

To use them, you had to use an existing or create your own native module, implementing the CobaltFont  iOS protocol and inheriting the CobaltAbstractFontDrawable  Android class, fill the glyphs dictionary (in the class itself on iOS, in a resource file on Android), import it to your native project, and register it in the cobalt.conf file.

The generator: fontToCobalt.py

But we faced a regular issue. Every time a font is added or updated, we had to create or update the corresponding files manually. So I developed a script for that!

It automates the packaging process of a font icon into an Android and/or iOS Cobalt Font module.
All you need is the TrueType file (.ttf) of the font and its corresponding reference.html file provided by IcoMoon or Fontastic (we will support a larger range of font generators later).

Then, just launch the script and simply import the generated packages into your Android and iOS Cobalt application projects.

You can now use your new font in native bar actions and even your own native components!

fonticonexample

Want more?

FacebookTwitterGoogle+LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *