Giter Site home page Giter Site logo

yaustar / fontbm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lunalabsltd/fontbm

0.0 1.0 0.0 5.56 MB

Command line bitmap font generator, compatible with BMFont.

License: MIT License

CMake 0.27% Python 1.66% C++ 4.02% C 74.37% Makefile 1.49% Shell 6.19% Awk 0.03% M4 0.40% HTML 10.80% Roff 0.03% Objective-C 0.29% Perl 0.12% sed 0.01% DIGITAL Command Language 0.32%

fontbm's Introduction

fontbm

sample sample

Build Status Build status

Command line bitmap font generator, compatible with BMFont.
Download compiled version (fontbm.zip for windows, fontbm for linux) from Releases.

Usage

fontbm --font-file Vera.ttf --output vera

Will produce vera.fnt (file format) and vera.png (how to render text).

Available options (bold options are required):

option default comment
--font-file path to ttf file, required
--output output files name without extension, required
--font-size 32 font size
--color 255,255,255 foreground RGB color, for example: 32,255,255
--background-color background RGB color, for example: 0,0,128, transparent by default
--chars 32-127* required characters, for example 32-64,92,120-126, *default value is 32-127 if 'chars-file' option is not defined
--chars-file optional path to UTF-8 text file with additional required characters (will be combined with 'chars' option)
--data-format txt output data file format, "txt", "xml", "bin" or "json"
--include-kerning-pairs include kerning pairs to output file
--padding-up 0 padding up
--padding-right 0 padding right
--padding-down 0 padding down
--padding-left 0 padding left
--spacing-vert 0 spacing vertical
--spacing-horiz 0 spacing horizontal
--texture-width 256 texture width
--texture-height 256 texture height

Building

Dependencies:

  • GCC-4.9 (or VS2015 Update 3, for windows)
  • CMake 3.0 (CMake 3.10, for use vcpkg on windows)
  • FreeType

Quickstart (ubuntu):

cmake .  
make

Quickstart (windows):

Generate project files:

cmake -G "Visual Studio 14 2015"

Download and install FreeType library, open .sln file in Visual Studio 2015, configure paths to FreeType and rebuild all.

Or, if vcpkg is used:

vcpkg install freetype
cmake -G "Visual Studio 14 2015" -DCMAKE_TOOLCHAIN_FILE=<path to vcpkg dir>/scripts/buildsystems/vcpkg.cmake

Then open .sln in Visual Studio 2015 and rebuild all.

License

MIT License

The project also bundles third party software under its own licenses:

fontbm's People

Contributors

dreding avatar stopiccot avatar vladimirgamalyan avatar

Watchers

 avatar

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.