Opentype Pixel Font Renderer for MV/MZ
Introduction:
This plugin displays text using opentype.js. opentype.js is an OpenType and TrueType font parser and writer. It allows you to access the letterforms of text from the browser or node.js.
The plugin is mainly aimed to display clear pixel styled fonts. This function changes meatureText, fillText and strokeText methods of CanvasRenderingContext2D, so usually it shouldn't affect the engine itself.
Usage:
The plugin allows you to load 9 fonts from fonts folder, but most likely you don't need that many. You need to set those parameters manually.
font# file
File name of the font file, for example pixeloperator.ttf
font# family name
This is the font name, for example, if you want to replace gamefont, you name it gamefont.
However, this plugin doesn't provide any method to change in-game fonts. You'll need to do that by yourself.
font# snap to pixel
Whether this font needs to snap to pixel grid. This is important if you don't want the strokes to 'squat' between pixels.
Usually this is for pixel fonts as the name suggested.
font# base size
The base size of the pixel font. Usually it means the size for the font to display clear single pixel strokes.
For example, it is 16 for pixeloperator, 8 for pixeloperator8.
If your game draws text with font size of 28, and base size is 16, the closest whole number scale will be used, so 32 will be used. This only affects how the text is displayed, it will not change in game variables.
You can also provide a map for different sizes, for example: {28:24, 72:80}, it means if the font size is 28, the plugin will use 24, and if the font size is 72, the plugin will use 80.
font# unicode range
Unicdoe range of the font. It follows the same rules of css unicode-range, see here. The default value is U+0-10FFFF, you only need to change it if you use multiple font files for the same font family, to specify which characters font# need to display.
Terms of use:
You can use the plugin in any project, credit is not required.
For the fonts inside the zip archive, you can check their corresponding terms from the links below.
Download
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.