1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00
VVVVVV/desktop_version/fonts
Dav999 d299b42ee8 Replace Chinese font
The original Chinese font (which we call "the Indienova font") was
received from the Chinese translators directly, and didn't come with
any license or copyright information other than that it was made by
Indienova. Questions have now been raised about the actual origin of
the characters in the font, and while we do have confirmation from the
translators that we're probably in the clear, they did suggest another
font for us to use, which we're switching to to be sure.

Some background information: the ideal font would probably be Ark Pixel
(https://github.com/TakWolf/ark-pixel-font/), but this font is not
finished yet. Therefore, the creators of Ark Pixel have made a font
that can be used as a placeholder to use in the meantime, Fusion Pixel
(https://github.com/TakWolf/fusion-pixel-font), which combines some
other fonts together in order to get full coverage. This is the font
we're now switching to.

It's not _that_ simple though - the ASCII part of Fusion Pixel is kinda
bad for us using it as a monospaced font. Normally I just replace the
ASCII set by the fullwidth characters, but in this font they were
almost entirely the same. So I instead picked the fullwidth characters
from Galmuri 12px, which is one of the "fusioned" fonts. Interestingly,
we happen to also use the 10px version of this as our Korean font, and
I like these Latin letters, so yay.

I also made the call to split the Chinese font into separate variants
for Simplified and Traditional Chinese. I was aware of the problem with
the Han Unification, but the Traditional Chinese translator said the
Indienova font also contains all the Traditional Chinese characters,
and they proofread the translation, so it was probably fine. Apparently
the difference between Simplified and Traditional Chinese variants of
the same characters are not that big, and it's acceptable. But
Fusion Pixel gives us separate versions of the font for Simplified and
Traditional Chinese, so this is a chance to get it right. Just kidding,
Fusion Pixel's Traditional variant switches out many characters that
were shared between Simplified and Traditional Chinese to Japanese
variants which are noticeably different. So it would be better to keep
using the SC font for TC, just like the Indienova font is SC only.
However:  Ark Pixel does have a version with correct characters for
Traditional Chinese! So for the TC version of our font, I just took all
Chinese characters from the TC version of Ark Pixel where available.
That way, all characters I checked have changed to TC variants
correctly.
2024-01-16 16:54:28 -08:00
..
buttons_8x8.fontmeta Add button glyph font files 2023-02-20 17:00:06 -08:00
buttons_8x8.png Add button glyph font files 2023-02-20 17:00:06 -08:00
buttons_10x10.fontmeta Add button glyph font files 2023-02-20 17:00:06 -08:00
buttons_10x10.png Add button glyph font files 2023-02-20 17:00:06 -08:00
buttons_12x12.fontmeta Add button glyph font files 2023-02-20 17:00:06 -08:00
buttons_12x12.png Add button glyph font files 2023-02-20 17:00:06 -08:00
font.fontmeta Fixed duplicated/shifted characters 2023-11-29 10:24:07 -08:00
font.png Update Space Station font to latest version 2023-11-28 18:11:42 -08:00
font_ar.fontmeta Last update to Arabic font 2024-01-10 08:00:04 -08:00
font_ar.png Last update to Arabic font 2024-01-10 08:00:04 -08:00
font_ja.fontmeta Add Japanese font (8x12) 2023-09-20 15:29:23 -07:00
font_ja.png Apply Japanese font edits by KabanFriends 2023-09-20 15:29:23 -07:00
font_ko.fontmeta Add Korean font (10x10) 2023-09-20 15:29:23 -07:00
font_ko.png Add Korean font (10x10) 2023-09-20 15:29:23 -07:00
font_ko_license.txt Add Korean font (10x10) 2023-09-20 15:29:23 -07:00
font_sc.fontmeta Replace Chinese font 2024-01-16 16:54:28 -08:00
font_sc.png Replace Chinese font 2024-01-16 16:54:28 -08:00
font_sc_tc_license.txt Replace Chinese font 2024-01-16 16:54:28 -08:00
font_tc.fontmeta Replace Chinese font 2024-01-16 16:54:28 -08:00
font_tc.png Replace Chinese font 2024-01-16 16:54:28 -08:00
README.txt Update fonts/README.txt for button glyphs 2023-02-20 17:00:06 -08:00

=== I N T R O D U C T I O N ===

This file will explain the font format.

If you need a font (like a TTF) converted into the format that the game can read, for now you might want to ask Dav, who has tools for it.



=== F O N T   F O R M A T ===

Fonts consist of two files: a .png and a .fontmeta. The .png contains all the "images" for all glyphs, and the .fontmeta is an XML document containing all information about which characters are in the file and other metadata.

For example, a font for Japanese might be called font_ja.png and font_ja.fontmeta.

The fontmeta file looks like this:


<?xml version="1.0" encoding="UTF-8"?>
<font_metadata>
    <display_name>日本語</display_name>
    <width>12</width>
    <height>12</height>
    <white_teeth>1</white_teeth>
    <chars>
        <range start="0x20" end="0x7F"/>
        <range start="0xA0" end="0x17F"/>
        <range start="0x18F" end="0x18F"/>
        <range start="0x218" end="0x21B"/>
        <range start="0x259" end="0x25A"/>
        <!-- ... -->
    </chars>
    <special>
        <range start="0x00" end="0x1F" advance="6"/>
        <range start="0xEB00" end="0xEBFF" color="1"/>
    </special>
    <fallback>buttons_12x12</fallback>
</font_metadata>


* type: not specified for normal fonts. <type>buttons</type> is used in button glyph fonts.

* display_name: the name of the language the font is specifically meant for - in the language itself. Users will see this in the level editor when choosing a font to use. If this font is used equally by multiple translations, this could be set to a combination like "繁體中文/한국어". (If you are creating a custom player level: don't worry about this)

* width/height: the width and height of each glyph in the font. Every character will always be drawn as a rectangle of this size. VVVVVV is rated to support fonts up to 12 pixels high - anything higher may cause text overlapping or not fitting in place.

* white_teeth: indicates that all characters in the font are white, so the game itself doesn't have to remove all color from the image and make all pixels white like it would in old versions of the game. If this is not set to 1, this font cannot have colored (button) glyphs, and the game has to specifically process the font every time it is loaded, so 1 is highly recommended.

* chars: defines which characters are in the image. Starting at the top left of the image, each character is simply a rectangle of equal size (defined in <width> and <height>) from left to right, top to bottom. In the example given above, the image first has Unicode every character from U+0020 up to and including U+007F, then every character from U+00A0 to U+017F, and so on. To include a single character, simply use a range with equal start and end attributes equal.

* special: defines special attributes that will be applied to a range of characters. One or more of the following attributes can be used:

 - color: set to 1 if these glyphs should be drawn with its original colors (for button glyphs, or even emoji...)

 - advance: instead of <width>, the cursor (for drawing the next character) should be advanced this amount of pixels to the right. This controls the width of a character, but it does not affect how characters are arranged in the image, and the full glyph will still be drawn. While this means the font system has support for variable-width fonts, it's recommended to not use this option. There are some problems arising from using a variable-width font (especially in text boxes), so please consider copying the font's fullwidth forms (U+FF01-U+FF5E) to ASCII U+0021-U+007E instead. One may argue that a monospaced font also fits more with the game's style.

* fallback: specifies the button glyphs font to use. Make sure to choose one that fits fully within your [width]x[height] rectangle, so for an 8x12 font, choose buttons_8x8, not buttons_12x12.