Git Product home page Git Product logo

libdsf's Introduction

LibDSF

1. Introduction

This is a library written in C to render text from fonts generated by BMFont. The name of the library (LibDSF) comes from "DS Font library".

In order to use this library, download the Bitmap Font Generator tool (or any other compatible tool), export the font image to PNG, and export the font data in binary format.

This library can load font data from RAM or from the filesystem. It won't load textures for you, you're in charge of converting the PNG files to a DS-compatible format and loading them to RAM (and VRAM).

Currently, only fonts with one single PNG file are supported.

It supports drawing text as a bunch of quads, or generating a texture with the text rendered by software so that it can be loaded as a texture and drawn as one quad.

The software rendering routines support all NDS texture formats except for Tex4x4 compressed textures.

Important: Your source code files (or text data files) need to be encoded as UTF-8.

Note: If the replacement character � (U+FFFD) codepoint is included in the font, it will be used to print missing characters in the font, or when the UTF-8 string has encoding errors.

2. Install

Simply run this to build and install the library in your BlocksDS environment:

make install

3. Example

Once you have installed the library, go to the folder of the example and run:

make

This will generate a NDS file that you can test with flashcards or emulators.

Screenshot

License

This library is released under the Zlib license.

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.