ddnet/.gitignore
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

146 lines
1.7 KiB
Plaintext

# Ignore data-folders outside the root, these are copied around to build
# directories.
data/
!/data/
docs/
bundle/
!/other/bundle/
.DS_Store
.ninja_deps
.ninja_log
CACHEDIR.TAG
CMakeCache.txt
CMakeFiles
CMakeSettings*
CPackConfig.cmake
CPackSourceConfig.cmake
CTestTestfile.cmake
Debug
Makefile
Release
SAN.*
_CPack_Packages/
build.ninja
checksummed_*
cmake_install.cmake
debug
gmock.pc
gmock_main.pc
googletest-build/
googletest-download/
googletest-src/
gtest.pc
gtest_main.pc
install_manifest*.txt
ninja_package
pack_*/
release
rules.ninja
testrunner\[1\]_include.cmake
/SDL2.framework
# Ignore all the generated executables without extensions (for non-Windows
# systems).
DDNet
!DDNet/
DDNet-Server
DDNet-Server-Launcher
libsteam_api.a
config_retrieve
config_store
crapnet
dilate
dummy_map
fake_server
map_convert_07
map_create_pixelart
map_diff
map_extract
map_find_env
map_optimize
map_replace_area
map_replace_image
map_resave
map_version
mastersrv
packetgen
stun
testrunner
twping
unicode_confusables
uuid
versionsrv
# But we still should allow to download mastersrv/twping sources
!src/mastersrv
!src/twping
generated
target
/build*
/integration_test/*
# IDE project files
.cache
.cproject
.cmake
.gdb_history
.idea
.project
.settings
.vs
.vscode
compile_commands.json
cmake-build-*/*
cscope.files
cscope.out
out
tags
# don't ignore this, it's used for the vscode workspace that ddnet provides
!ddnet-cmake-tools-kits.json
# bam ignores
/.bam
/config.lua
/objs
*.a
*.cmd
*.csv
*.dll
*.dmg
*.dtb
*.dylib
*.exe
*.fifo
*.filters
*.lnk
*.log
*.opensdf
*.patch
*.pdb
*.prefs
*.pyc
*.res
*.sdf
*.sln
*.so
*.spv
*.sqlite
*.sqlite-shm
*.sqlite-wal
*.suo
*.swp
*.tar.gz
*.tar.xz
*.teehistorian
*.tmp
*.user
*.vcxproj
*.zip