Let's discuss how to import a new font into Adventuron to use with your game.
A highly recommended collection of high-quality fonts is the ZX Origins series, by Damien Guard. The origins fonts are a collection of fonts created by Damien Guard, designed to be usable in the 8 x 8 pixel format used by the old ZX Spectrum computer. They don't have to be used in such a way though, so let's use them in a modern browser instead.
Step By Step Guide
1. Browse to the ZX Origins series page, and locate one or more fonts you would like to try out.
2. Click the name of the font you are interested in then click the button inside the per-font page (as shown) to download a zipfile containing the font.
3 - Decompress the zipfiles for the fonts you downloaded in step 1 (you only require the ttf files, and the README.md (for license info). The screenshot below shows how to decompress the downloaded file in Windows 10 (right click the downloaded zipfile, then select "Extract Here").
4 - In Adventuron, click the MENU button (at the bottom right of the text editor window), then select Import.
5 - Select the ttf (font) file of the font you wish to import.
5 - Confirm that you should now have an assets {} section in your document containing the font you just imported.
NOTE : By default, Adventuron assumes an 8x8 font, but if your imported font is a non ZX Origins font and is based on a different vertical to horizontal number of pixels, then you may need to alter the various numbers shown in the next screenshot(not explained here as does not apply to ZX Origins).
6 - If you already have a theme, add the following parts to your theme, if you don't have a theme, please copy and past this, and add it above the assets {} section in your code:. Important that if you use a custom theme, that you still extend the "two" theme, as the default theme has many many settings set to correct defaults for this gamejam.
themes { my_theme : theme { extends = two theme_settings { // Replace this with the name of the font you import // (userfont_ will always be a prefix). font = userfont_orbiter } screen { // This represents how many virtual pixels of spacing // to add below the baseline of the font in the status // bar area. Generally speaking, 2 works well for 95% // of ZX Origins fonts. status_bar_padding_bottom = 2 } } }
Make sure that the following line is included at the top of your adventuron gamefile (if you just created the theme now).
theme = my_theme
7 - Test by executing your game (press the play icon at the top of the editor window). You may need to adjust the status_bar_padding_bottom or status_bar_padding_top values.
ZX Origins License Text
This font is part of the ZX Origins font collection Copyright (c) 1988-2016 Damien Guard.
Formal licenses are complicated and burdensome so here's the deal. These are some acceptable use examples:
1. Use it in your game (commerical or non-commercial)
2. Print something on a t-shirt
3. Use the embedded font file on your site
4. Set your favorite terminal or OS to use it
Ideally with a credit like "<fontname> font by DamienG https://damieng.com/zx-origins" </fontname>*if* you have a credits section.
If you don't that's fine. Either way dropping me an email at damieng@gmail.com to let me know what you used it for is appreciated.
The only unacceptable use is redistributing this font as a font. i.e. re-hosting the files on your own site or bundling it with other art assets. I have put a lot of time into these and my only reward is seeing download counts on my site which is ad-free so it seems unfair other people would rehost these files on their site and make $ from Google Adwords etc.
If you need to modify the font for your usage - either to add characters (this collection is pure ASCII + copyright + pound sign right now) or if a few are bothering you just change the credit to "Font based on <fontname> by Damieng" or something.
Thanks and enjoy!
[)amien
https://damieng.com/zx-origins/
Some Fonts In Action
NOTE: The colour scheme is entirely up to your own judgement. These screenshots use the colour scheme of TWO, but do add a colors{} block inside your theme if you wish to customise your colours.