Commit graph

22 commits

Author SHA1 Message Date
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
Dennis Felsing 1b08935ad9 Fix some createivecommons links to use https 2023-02-28 20:04:38 +01:00
Jupeyy 18d85fda0d Update icons font 2022-03-19 18:35:37 +01:00
dragere baa09c5f3c
Update Copyright year
Same as last year
2022-02-06 17:43:51 +01:00
Jupeyy d7e67fb275 Fix license 2021-02-11 01:57:21 +01:00
dragere 0b672dbc10
Update Copyright year 2021-02-03 13:15:13 +01:00
Jupeyy b1d5a388f1 Add comfort (entities asset) by louis 2020-10-07 05:11:38 +02:00
def d08535684e Move skins license information to its own file 2020-08-10 18:23:31 +02:00
def 7be7160d9b Remove unlicensed skins (fixes #2518)
and mention skin licenses (fixes #2544)

Still missing: Which skin is by btd?
2020-08-09 15:07:08 +02:00
def 186f917cc9 Update copyright 2020-06-26 13:16:41 +02:00
Chiller Dragon 52e725428a
Happy new year 2k19 2019-01-20 22:37:21 +01:00
Jupeyy e642b14c88 add icon font 2018-03-13 21:43:27 +01:00
ChillerDragon 98f610a4d0
happy new year 2018-01-20 22:56:04 +01:00
ChillerDragon 343e6a671e updated date in license.txt (#764) 2017-05-21 23:00:31 +02:00
def 4b1b7adc4b Further license and cleanup 2015-07-22 22:49:20 +02:00
def 9f7e3dcad6 Update Teeworlds license (fixes #50) 2014-09-29 15:30:43 +02:00
oy f91e2abc6b updated copyright to 2012 and fixed a typo in the license 2012-01-06 12:37:23 +01:00
Choupom ebd93382ea updated copyright 2011-01-05 22:01:33 +01:00
Magnus Auvinen 4f2a21ba04 updated the license.txt 2010-05-29 09:53:44 +00:00
Magnus Auvinen a13b94f9e0 minor update 2008-07-08 09:07:21 +00:00
Magnus Auvinen bc108df382 renamed everything. added the new license 2008-03-22 18:40:27 +00:00
Magnus Auvinen fc3f17abf9 added license.txt 2007-11-25 19:46:43 +00:00