ddnet/data
Robert Müller d642abd722 Add font index, support font family variants depending on language
Add `fonts/index.json` which specifies:

- List of all font files that should be loaded (filenames).
- Default font (specified by family name or by family and style name).
- Font variants for different languages, using the name of the language file as key.
- Fallback fonts.
- Icon font.

There are characters (e.g. all in `刃直海角骨入`) that look different depending on the language of the content being Japanese, Simplified Chinese, Traditional Chinese and Hangul, because Unicode uses the same codepoint for characters regardless of the language. To render these characters correctly, the active variant font is switched depending on the selected language.

The `ITextRender` interface is changed so the current language variant can be set using `SetFontLanguageVariant` and the default and icon fonts can be toggled using `SetFontPreset`. The class `CFont` is removed entirely.

The text render is restructured: The font faces and font atlas are now managed by a separate class `CGlyphMap` like on upstream. As the text fill and outline textures always have the same size, the texture skyline only needs to be stored once and free positions in the atlas only need to be calculated once for each glyph instead of separately for the fill and outline textures.

The font files and their licenses are also updated:

- Update Source Han Sans to version 2.001.
- Update Glow Sans Japanese Compressed to version 0.93.
- Update Deja Vu Sans to version 2.37.
- Update Font Awesome icons font to March 2023 version.

Closes #6881.
2023-08-01 19:30:25 +02:00
..
assets Revert "Add comic emoticons by Ravie" 2023-03-01 00:10:37 +01:00
audio Rename rifle to laser 2019-11-22 15:37:18 +01:00
countryflags Add Galician flag from gu (overdue_) from Discord 2023-07-07 12:59:44 +02:00
editor Add missing attribute shield entities for front and switch layers 2023-05-16 20:15:24 +02:00
fonts Add font index, support font family variants depending on language 2023-08-01 19:30:25 +02:00
languages Fix malformed lines in some translation files 2023-07-29 19:13:24 +02:00
mapres Update grass_doodads_0.7.png to match upstream 2023-07-29 14:02:28 +02:00
maps Update Tutorial map by unique_2 2022-10-03 10:17:13 +02:00
maps7 Update Tutorial map by unique_2 2022-10-03 10:17:13 +02:00
menuimages Revert "Dilate & optimize non-dilated images" 2021-02-03 20:40:10 +01:00
shader Fix misspellings 2022-10-25 13:51:56 -03:00
skins Fix copyright for kitty_x_ninja (fixes #6830) 2023-07-11 15:01:24 +02:00
themes Add New Year season theme by mind and use for 2 days 2020-12-28 17:45:04 +01:00
arrow.png Optimize PNGs 2016-04-27 01:27:57 +02:00
autoexec_server.cfg Fix other occurences of DDNet.tw 2022-09-23 10:59:36 +02:00
blob.png Merge remote-tracking branch 'timakro/new_hookthrough' 2016-04-27 18:59:51 +02:00
censorlist.txt Implement censoring words on server 2020-09-18 19:18:08 +02:00
console.png Optimize PNGs 2016-04-27 01:27:57 +02:00
console_bar.png Optimize PNGs 2016-04-27 01:27:57 +02:00
debug_font.png Optimize PNGs 2016-04-27 01:27:57 +02:00
emoticons.png Revert "Dilate & optimize non-dilated images" 2021-02-03 20:40:10 +01:00
extras.png simplify the snowflake 2022-06-30 00:02:51 +02:00
game.png Move ninja shield to other position (fixes #5047) 2022-04-30 11:42:26 +02:00
gui_buttons.png Optimize PNGs 2016-04-27 01:27:57 +02:00
gui_cursor.png 0.7 cursor 2020-09-15 16:18:12 +02:00
gui_icons.png Revert "Dilate & optimize non-dilated images" 2021-02-03 20:40:10 +01:00
gui_logo.png Revert "Dilate & optimize non-dilated images" 2021-02-03 20:40:10 +01:00
hud.png Add new textures by ravie; Also add no gun hit for teleport gun 2022-06-25 16:05:38 +02:00
particles.png Revert "Dilate & optimize non-dilated images" 2021-02-03 20:40:10 +01:00
strong_weak.png change name file 2021-08-14 18:40:58 +05:00
wordlist.txt Generate passphrase for save-code 2020-06-15 11:14:15 +02:00