Git Product home page Git Product logo

spritefont's Introduction

SpriteFont for GM8.X

SpriteFont is some scripts for GM8.X to draw non-English text.

Why

GM8.X currently does not support non-English text drawing. Although there is a nice text drawing extension called FoxWrting (https://github.com/Noisyfox/FoxWriting), it only supports GM8.0 and has some compatibility issues.

Use

1. Build Font

SpriteFont is essentially a large sprite and some glyph information. So you have to convert .ttf to them first. Open FontBuilder.exe:

First select a TTF file, then set its size (text height), then select the text range you want on the right, and finally click Build, the tool will automatically generate Sprite images and glyph information.

Then you need to click the "Save" button below them to save both the generated image and glyph information to a .png file and a .glyphs file.

2. Draw Font

Open your GM8 project, then import SpriteFont.gml (you can drag and drop), call sf_init() once when the game starts, then use sf_font_add() to load the font, and finally use sf_draw_text() to draw the text.

spritefont's People

Contributors

cubeww avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

gm-archive

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.