Code Monkey home page Code Monkey logo

3b-bmfont's People

Contributors

3b avatar shinmera avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

shinmera

3b-bmfont's Issues

clean up API

Add missing accessors for font/glyph properties, and get rid of plists

text cursors

when using the text layout function, need some way to tell where a text cursor should be

consider replacing jsown

jsown reads numbers as rationals, which is somewhat annoying since we usually want floats for performance, and also allows for DOS by putting huge exponents in the data.

Need to watch performance in general though, since font metadata can get fairly large (have at least 4 files over 400k from testing sdf atlases, largest over 800k).

calculate ascent/descent values?

bmfont doesn't seem to store ascent/descent values, so try to calculate them from character bounds + y-offset etc.

SDF fonts will be more complicated since they will include extra space for the distance field, but possibly can correct for that with the extra distance-range field for sdf fonts?

Possibly add an extension to format to store them explicitly, along with adding it to sdf code and/or a tool to calculate them by actually rendering glyphs and finding bounds, if we can't reliably calculate directly from metadata?

handle layout of multiple blocks of text

when mixing fonts, might need to have multiple chunks of text adjacent to each other, so pass initial x,y coords to map-glyphs, and return final x,y from it?

add option to expand glyph geometry for effects?

blur/glow/drop shadows/etc probably need larger geometry than is provided by default, so add option to expand it.

Possibly also add some accessors for max blur radius (depends on SDF range settings when atlas was generated, which we might not know depending on metadata files?)

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.