Code Monkey home page Code Monkey logo

multifont-react-app's Introduction

MULTIFONT PACKER

image

MultiFont Packer is a web based tool for make BitmapFonts, like Shoe Box. The main objective of this tool is to optimize font based resources by using a single atlas to support multiple bitmap fonts. In this first version we use the XML descriptor format Angel Code.

<font>
     <info face="{{name}}" size="{{size}}" />
     <common lineHeight="{{lineHeight}}" scaleW="{{scaleW}}" scaleH="{{scaleH}}" pages="{{num_pages}}" />
     <pages>
     {{#pages}}
         <page id="{{id_page}}" file="{{file_name}}" />
     {{/pages}}
     </pages>
     <chars count="{{chars_count}}">
     {{#chars}}
         <char letter="{{letter}}" id="{{code}}" x="{{x}}" y="{{y}}" width="{{width}}" height="{{height}}" xoffset="{{xoffset}}" yoffset="{{yoffset}}" xadvance="{{xadvance}}" />
     {{/chars}}
     </chars>
     <kernings count="{{kernings_count}}">
     {{#kernings}}
     {{/kernings}}
     </kernings>
 </font>

How to use?

1 Drag and Drop your font image pre-created (ex. Photoshop)

tuto1

2 Set correct letter in each image. In the future I'll use Tesseract.js

tuto2

3 You can set font properties.

tuto3

4 And test the result.

tuto4

Pixi.js Test

Inside this project you can test the result with Pixi.js engine.

folder: /test/

  1. npm install
  2. Modify /src/index.js PIXI.BitmapText, your correct name font and size.
  3. webpack to compile
  4. Launch a server ( ex. http-server ) in /test/dist/
  5. And look at the result

tuto6

References

This project is based on:

Project Map

https://github.com/rtalon83/multifont-react-app/projects/1

multifont-react-app's People

Contributors

dependabot[bot] avatar rtalon83 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  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.