Skip to content

Commit 76dbd0d

Browse files
authored
Fully remove bitmap font support (luanti-org#11863)
Freetype is now a build requirement.
1 parent bf22569 commit 76dbd0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+71
-319
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -150,29 +150,6 @@ jobs:
150150
run: |
151151
./bin/minetestserver --run-unittests
152152
153-
# Build without freetype (client-only)
154-
clang_9_no_freetype:
155-
name: "clang_9 (FREETYPE=0)"
156-
runs-on: ubuntu-18.04
157-
steps:
158-
- uses: actions/checkout@v2
159-
- name: Install deps
160-
run: |
161-
source ./util/ci/common.sh
162-
install_linux_deps clang-9
163-
164-
- name: Build
165-
run: |
166-
./util/ci/build.sh
167-
env:
168-
CC: clang-9
169-
CXX: clang++-9
170-
CMAKE_FLAGS: "-DENABLE_FREETYPE=0 -DBUILD_SERVER=0"
171-
172-
- name: Test
173-
run: |
174-
./bin/minetest --run-unittests
175-
176153
docker:
177154
name: "Docker image"
178155
runs-on: ubuntu-18.04

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,16 @@ Compiling
135135
| GCC | 4.9+ | Can be replaced with Clang 3.4+ |
136136
| CMake | 3.5+ | |
137137
| IrrlichtMt | - | Custom version of Irrlicht, see https://github.com/minetest/irrlicht |
138-
| SQLite3 | 3.0+ | |
138+
| Freetype | 2.0+ | |
139+
| SQLite3 | 3+ | |
139140
| Zstd | 1.0+ | |
140141
| LuaJIT | 2.0+ | Bundled Lua 5.1 is used if not present |
141142
| GMP | 5.0.0+ | Bundled mini-GMP is used if not present |
142143
| JsonCPP | 1.0.0+ | Bundled JsonCPP is used if not present |
143144

144145
For Debian/Ubuntu users:
145146

146-
sudo apt install g++ make libc6-dev cmake libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev
147+
sudo apt install g++ make libc6-dev cmake libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev
147148

148149
For Fedora users:
149150

@@ -247,7 +248,6 @@ General options and their default values:
247248
MinSizeRel - Release build with -Os passed to compiler to make executable as small as possible
248249
ENABLE_CURL=ON - Build with cURL; Enables use of online mod repo, public serverlist and remote media fetching via http
249250
ENABLE_CURSES=ON - Build with (n)curses; Enables a server side terminal (command line option: --terminal)
250-
ENABLE_FREETYPE=ON - Build with FreeType2; Allows using TTF fonts
251251
ENABLE_GETTEXT=ON - Build with Gettext; Allows using translations
252252
ENABLE_GLES=OFF - Build for OpenGL ES instead of OpenGL (requires support by IrrlichtMt)
253253
ENABLE_LEVELDB=ON - Build with LevelDB; Enables use of LevelDB map backend
@@ -273,10 +273,10 @@ Library specific options:
273273
EGL_INCLUDE_DIR - Only if building with GLES; directory that contains egl.h
274274
EGL_LIBRARY - Only if building with GLES; path to libEGL.a/libEGL.so
275275
EXTRA_DLL - Only on Windows; optional paths to additional DLLs that should be packaged
276-
FREETYPE_INCLUDE_DIR_freetype2 - Only if building with FreeType 2; directory that contains an freetype directory with files such as ftimage.h in it
277-
FREETYPE_INCLUDE_DIR_ft2build - Only if building with FreeType 2; directory that contains ft2build.h
278-
FREETYPE_LIBRARY - Only if building with FreeType 2; path to libfreetype.a/libfreetype.so/freetype.lib
279-
FREETYPE_DLL - Only if building with FreeType 2 on Windows; path to libfreetype.dll
276+
FREETYPE_INCLUDE_DIR_freetype2 - Directory that contains files such as ftimage.h
277+
FREETYPE_INCLUDE_DIR_ft2build - Directory that contains ft2build.h
278+
FREETYPE_LIBRARY - Path to libfreetype.a/libfreetype.so/freetype.lib
279+
FREETYPE_DLL - Only on Windows; path to libfreetype-6.dll
280280
GETTEXT_DLL - Only when building with gettext on Windows; paths to libintl + libiconv DLLs
281281
GETTEXT_INCLUDE_DIR - Only when building with gettext; directory that contains iconv.h
282282
GETTEXT_LIBRARY - Only when building with gettext on Windows; path to libintl.dll.a
@@ -337,7 +337,6 @@ vcpkg install zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo
337337
- **Don't forget about IrrlichtMt.** The easiest way is to clone it to `lib/irrlichtmt` as described in the Linux section.
338338
- `curl` is optional, but required to read the serverlist, `curl[winssl]` is required to use the content store.
339339
- `openal-soft`, `libvorbis` and `libogg` are optional, but required to use sound.
340-
- `freetype` is optional, it allows true-type font rendering.
341340
- `luajit` is optional, it replaces the integrated Lua interpreter with a faster just-in-time interpreter.
342341
- `gmp` and `jsoncpp` are optional, otherwise the bundled versions will be compiled
343342

@@ -429,8 +428,7 @@ cmake .. \
429428
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \
430429
-DCMAKE_FIND_FRAMEWORK=LAST \
431430
-DCMAKE_INSTALL_PREFIX=../build/macos/ \
432-
-DRUN_IN_PLACE=FALSE \
433-
-DENABLE_FREETYPE=TRUE -DENABLE_GETTEXT=TRUE
431+
-DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE
434432

435433
make -j$(nproc)
436434
make install

android/native/jni/Android.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ LOCAL_CFLAGS += \
9191
-DENABLE_GLES=1 \
9292
-DUSE_CURL=1 \
9393
-DUSE_SOUND=1 \
94-
-DUSE_FREETYPE=1 \
9594
-DUSE_LEVELDB=0 \
9695
-DUSE_LUAJIT=1 \
9796
-DUSE_GETTEXT=1 \

builtin/settingtypes.txt

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -886,10 +886,6 @@ tooltip_show_delay (Tooltip delay) int 400
886886
# Append item name to tooltip.
887887
tooltip_append_itemname (Append item name) bool false
888888

889-
# Whether FreeType fonts are used, requires FreeType support to be compiled in.
890-
# If disabled, bitmap and XML vectors fonts are used instead.
891-
freetype (FreeType fonts) bool true
892-
893889
font_bold (Font bold by default) bool false
894890

895891
font_italic (Font italic by default) bool false
@@ -909,9 +905,7 @@ font_size (Font size) int 16 1
909905
# sized 16, 32, 48, etc., so a mod requesting a size of 25 will get 32.
910906
font_size_divisible_by (Font size divisible by) int 1 1
911907

912-
# Path to the default font.
913-
# If “freetype” setting is enabled: Must be a TrueType font.
914-
# If “freetype” setting is disabled: Must be a bitmap or XML vectors font.
908+
# Path to the default font. Must be a TrueType font.
915909
# The fallback font will be used if the font cannot be loaded.
916910
font_path (Regular font path) filepath fonts/Arimo-Regular.ttf
917911

@@ -928,19 +922,15 @@ mono_font_size (Monospace font size) int 16 1
928922
# sized 16, 32, 48, etc., so a mod requesting a size of 25 will get 32.
929923
mono_font_size_divisible_by (Monospace font size divisible by) int 1 1
930924

931-
# Path to the monospace font.
932-
# If “freetype” setting is enabled: Must be a TrueType font.
933-
# If “freetype” setting is disabled: Must be a bitmap or XML vectors font.
925+
# Path to the monospace font. Must be a TrueType font.
934926
# This font is used for e.g. the console and profiler screen.
935927
mono_font_path (Monospace font path) filepath fonts/Cousine-Regular.ttf
936928

937929
mono_font_path_bold (Bold monospace font path) filepath fonts/Cousine-Bold.ttf
938930
mono_font_path_italic (Italic monospace font path) filepath fonts/Cousine-Italic.ttf
939931
mono_font_path_bold_italic (Bold and italic monospace font path) filepath fonts/Cousine-BoldItalic.ttf
940932

941-
# Path of the fallback font.
942-
# If “freetype” setting is enabled: Must be a TrueType font.
943-
# If “freetype” setting is disabled: Must be a bitmap or XML vectors font.
933+
# Path of the fallback font. Must be a TrueType font.
944934
# This font will be used for certain languages or if the default font is unavailable.
945935
fallback_font_path (Fallback font path) filepath fonts/DroidSansFallbackFull.ttf
946936

doc/Doxyfile.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ PREDEFINED = "USE_SPATIAL=1" \
1616
"USE_REDIS=1" \
1717
"USE_SOUND=1" \
1818
"USE_CURL=1" \
19-
"USE_FREETYPE=1" \
2019
"USE_GETTEXT=1"
2120

2221
# Input

fonts/mono_dejavu_sans_10.xml

-251 KB
Binary file not shown.

fonts/mono_dejavu_sans_100.png

-54.8 KB
Binary file not shown.

fonts/mono_dejavu_sans_11.xml

-257 KB
Binary file not shown.

fonts/mono_dejavu_sans_110.png

-66 KB
Binary file not shown.

fonts/mono_dejavu_sans_12.xml

-263 KB
Binary file not shown.

0 commit comments

Comments
 (0)