Other Language Font Setup
While GameMaker Studio (and by consequence, VNgen) is designed with Latin text drawing in mind, it is also entirely possible to tell your stories in completely different languages and alphabets, provided you import the appropriate font and special characters to your project. Special characters refers to any non-Latin font elements beyond the scope of English text, numbers, and symbols. While a non-Latin font may contain all the characters it needs to display text in a different language, simply importing the font into Game Maker Studio will not import these characters by default. Instead, GameMaker Studio must be instructed to look for the characters in the font file specified so that more than the standard range of English characters is actually added to the game.
To do this, first create a new font asset in your project and select a non-English font from the dropdown list in the font window. As you will see, by default only the character range 32 to 127 will be imported to GameMaker Studio.
To add additional characters from the font file into the font asset, first open your text editor of choice and begin typing all the basic special characters you will need. This will be used to tell GameMaker Studio which special characters to look for in the font file. Don’t worry about missing one or two--you can always adjust the imported character range later.
With your text file prepared, save it to your local hard drive as a .txt file with encoding set to Unicode. This step is important, as your special characters will be lost if you attempt to save with an unsupported encoding.
Next, return to your font asset in Game Maker Studio and select the + icon beneath the font range indicator.
This will open a new window where you can set the range of characters to be imported from the font file. Rather than guess at these values, you can now instead import your text file by clicking the From File button and GameMaker Studio will detect them automatically.
The font range will now have one or more additional entries in it, indicating the range of characters represented in the imported text file.
If there is more than one new font range, it is likely that some important characters were missed. To avoid encountering missing characters in your game text, select the + icon again and simply edit the values manually so that the range spans from the smallest to the largest value available.
With that, you are now ready to use your new language in VNgen!
To support multiple languages in a single project, see
vngen_get_lang for built-in functions to manage localization!