Skip to content

ItsPriyesh/litho

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Litho

A tool for creating, verifying and fixing font packages used by Fontster.

Fontster works by replacing the twelve font styles used by the system. In the context of the app, these twelve styles can be referred to as a font pack. Building font packs isn't always as simple as gathering and renaming TrueType fonts. Each style must have the correct macStyle. This is a property defined in the header table of the file which specifies whether the font is regular, italic, bold, or a combination of the three.

Adding a font to the Android system with an incorrect macStyle will cause the device to bootloop, resulting in angry users. Litho prevents this from happening by verifying that fonts have correctly assigned macStyles, and fixing the property in the case that it has been set incorrectly.

Download

Visit the releases page and download the latest version.

Usage

Example usage for a folder named Helvetica:

# Checks that each font has been assigned the correct macStyle
./litho verify Helvetica

# Assigns the correct macStyle to each font
./litho fix Helvetica

# Generates missing styles to build a full font package
./litho package Helvetica

This will create a folder named HelveticaFontPack containing all twelve verified styles.

Litho also provides the ability to install generated font packages onto a device. This is done via ADB which allows for compatibility with physical devices and emulators (assuming they are rooted).

# Installs Helvetica onto a connected device
./litho install HelveticaFontPack

License

Copyright 2015 Priyesh Patel

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Tool for font macStyle verification and correction.

Resources

License

Stars

Watchers

Forks

Packages

No packages published