Index: .github/build64-SDL2.sh
===================================================================
--- .github/build64-SDL2.sh	(revisión: 11176)
+++ .github/build64-SDL2.sh	(copia de trabajo)
@@ -14,9 +14,7 @@
 echo "MSG_LEVEL = 3" >>config.default
 echo "OPTIMISE = 1" >>config.default
 echo "MULTI_THREAD = 1" >>config.default
-echo "USE_FREETYPE = 1" >>config.default
 echo "USE_ZSTD = 1" >>config.default
-echo "USE_FREETYPE = 1" >>config.default
 echo "WITH_REVISION = 0" >>config.default
 echo "FLAGS = -DREVISION=$(svn info --show-item revision svn://servers.simutrans.org/simutrans) " >>config.default
 echo "STATIC = 1" >>config.default
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revisión: 11177)
+++ CMakeLists.txt	(copia de trabajo)
@@ -148,7 +148,7 @@
 	target_link_libraries(simutrans PRIVATE Threads::Threads)
 endif (SIMUTRANS_MULTI_THREAD)
 
-if (SIMUTRANS_BACKEND STREQUAL "sdl2")
+if (SIMUTRANS_BACKEND STREQUAL "sdl2" AND Freetype_FOUND)
 	target_sources(simutrans PRIVATE src/simutrans/display/simgraph16.cc src/simutrans/sys/simsys_s2.cc src/simutrans/sound/sdl2_sound.cc)
 	target_include_directories(simutrans PRIVATE ${SDL2_INCLUDE_DIRS})
 	if (MINGW)
@@ -164,7 +164,7 @@
 	endif ()
 	target_compile_definitions(simutrans PRIVATE COLOUR_DEPTH=16)
 
-elseif (SIMUTRANS_BACKEND STREQUAL "gdi")
+elseif (SIMUTRANS_BACKEND STREQUAL "gdi" AND Freetype_FOUND)
 	target_sources(simutrans PRIVATE src/simutrans/display/simgraph16.cc src/simutrans/sys/simsys_w.cc ${BACKUP_SOUND} )
 	target_link_libraries(simutrans PRIVATE imm32 xaudio2_8)
 	target_compile_definitions(simutrans PRIVATE COLOUR_DEPTH=16)
@@ -171,7 +171,11 @@
 
 else ()
 	if (NOT SIMUTRANS_BACKEND STREQUAL "none")
-		message(WARNING "Unknown backend '${SIMUTRANS_BACKEND}', falling back to headless compilation")
+		if (NOT Freetype_FOUND)
+			message(WARNING "Freetype not found, falling back to headless compilation")
+		else ()
+			message(WARNING "Unknown backend '${SIMUTRANS_BACKEND}', falling back to headless compilation")
+		endif()
 	endif ()
 
 	target_sources(simutrans PRIVATE src/simutrans/display/simgraph0.cc src/simutrans/sys/simsys_posix.cc src/simutrans/sound/no_sound.cc src/simutrans/music/no_midi.cc)
@@ -185,7 +189,8 @@
 target_link_libraries(simutrans PRIVATE ZLIB::ZLIB)
 target_link_libraries(simutrans PRIVATE BZip2::BZip2)
 
-if (SIMUTRANS_USE_FREETYPE)
+# Freetype is mandatory for graphical builds
+if (SIMUTRANS_BACKEND STREQUAL "sdl2" OR SIMUTRANS_BACKEND STREQUAL "gdi")
 	target_include_directories(simutrans PRIVATE ${Freetype_INCLUDE_DIRS})
 	if (MINGW)
 		target_link_libraries(simutrans PRIVATE ${Freetype_STATIC_LIBRARIES})
@@ -200,8 +205,7 @@
 		target_compile_definitions(simutrans PRIVATE USE_FONTCONFIG=1)
 		target_link_libraries(simutrans PRIVATE Fontconfig::Fontconfig)
 	endif ()
-	target_compile_definitions(simutrans PRIVATE USE_FREETYPE=1)
-endif (SIMUTRANS_USE_FREETYPE)
+endif ()
 
 if (SIMUTRANS_USE_UPNP)
 	target_compile_definitions(simutrans PRIVATE USE_UPNP=1)
Index: Makefile
===================================================================
--- Makefile	(revisión: 11176)
+++ Makefile	(copia de trabajo)
@@ -170,33 +170,31 @@
   CFLAGS += -DMSG_LEVEL=$(MSG_LEVEL)
 endif
 
-ifdef USE_FREETYPE
-  ifeq ($(shell expr $(USE_FREETYPE) \>= 1), 1)
-    CFLAGS   += -DUSE_FREETYPE
-    ifneq ($(FREETYPE_CONFIG),)
-      CFLAGS += $(shell $(FREETYPE_CONFIG) --cflags)
-      ifeq ($(shell expr $(STATIC) \>= 1), 1)
-        # since static is not supported by slightly old freetype versions
-        FTF := $(shell $(FREETYPE_CONFIG) --libs --static)
-        ifneq ($(FTF),)
-          LDFLAGS += $(subst -lm ,,$(FTF))
-        else
-          LDFLAGS += $(shell $(FREETYPE_CONFIG) --libs)
-        endif
+ifneq ($(BACKEND),posix)
+  ifneq ($(FREETYPE_CONFIG),)
+    CFLAGS += $(shell $(FREETYPE_CONFIG) --cflags)
+    ifeq ($(shell expr $(STATIC) \>= 1), 1)
+      # since static is not supported by slightly old freetype versions
+      FTF := $(shell $(FREETYPE_CONFIG) --libs --static)
+      ifneq ($(FTF),)
+        LDFLAGS += $(subst -lm ,,$(FTF))
       else
-        LDFLAGS   += $(shell $(FREETYPE_CONFIG) --libs)
+        LDFLAGS += $(shell $(FREETYPE_CONFIG) --libs)
       endif
     else
-      LDFLAGS += -lfreetype
-      ifeq ($(OSTYPE),mingw)
-        LDFLAGS += -lpng -lharfbuzz
-      endif
+      LDFLAGS   += $(shell $(FREETYPE_CONFIG) --libs)
     endif
-
+  else
+    LDFLAGS += -lfreetype
     ifeq ($(OSTYPE),mingw)
-      LDFLAGS += -lfreetype
+      LDFLAGS += -lpng -lharfbuzz
     endif
   endif
+  
+  ifeq ($(OSTYPE),mingw)
+    LDFLAGS += -lfreetype
+  endif
+
   ifdef USE_FONTCONFIG
     CFLAGS  += -DUSE_FONTCONFIG
     CFLAGS  += $(shell $(FONTCONFIG_CONFIG) --cflags)
Index: README.html
===================================================================
--- README.html	(revisión: 11176)
+++ README.html	(copia de trabajo)
@@ -122,7 +122,7 @@
 <tr>
 <td>libfreetype</td>
 <td><a href="http://www.freetype.org/">http://www.freetype.org/</a></td>
-<td>Optional</td>
+<td>Necessary</td>
 <td>TrueType font support</td>
 </tr>
 <tr>
Index: README.md
===================================================================
--- README.md	(revisión: 11176)
+++ README.md	(copia de trabajo)
@@ -82,7 +82,7 @@
 | libpng        | http://www.libpng.org/pub/png/      | Necessary  | Image manipulation                                                        |
 | libSDL2       | http://www.libsdl.org/              | Necessary* | *On Linux & Mac. Optional but recommended for Windows. Graphics back-end  |
 | libzstd       | https://github.com/facebook/zstd    | Optional   | Alternative compression (larger save files than bzip2, but faster)        |
-| libfreetype   | http://www.freetype.org/            | Optional   | TrueType font support                                                     |
+| libfreetype   | http://www.freetype.org/            | Necessary  | TrueType font support                                                     |
 | libminiupnpc  | http://miniupnp.free.fr/            | Optional   | Easy Server option                                                        |
 | libfluidsynth | https://www.fluidsynth.org/         | Optional   | MIDI playback recommended on Linux & temporarily on Mac                   |
 | libSDL2_mixer | http://www.libsdl.org/              | Optional   | Alternative MIDI playback and sound system                                |
Index: Simutrans-GDI.vcxproj
===================================================================
--- Simutrans-GDI.vcxproj	(revisión: 11176)
+++ Simutrans-GDI.vcxproj	(copia de trabajo)
@@ -130,7 +130,7 @@
     <ClCompile>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>USE_ZSTD;USE_UPNP;USE_FREETYPE;COLOUR_DEPTH=16;MULTI_THREAD=1;MSG_LEVEL=3;DEBUG=3;REVISION_FROM_FILE;NOMINMAX;WIN32_LEAN_AND_MEAN;WINVER=_WIN32_WINNT_WINXP</PreprocessorDefinitions>
+      <PreprocessorDefinitions>USE_ZSTD;USE_UPNP;COLOUR_DEPTH=16;MULTI_THREAD=1;MSG_LEVEL=3;DEBUG=3;REVISION_FROM_FILE;NOMINMAX;WIN32_LEAN_AND_MEAN;WINVER=_WIN32_WINNT_WINXP</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     </ClCompile>
@@ -148,12 +148,12 @@
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
     <ClCompile>
-      <PreprocessorDefinitions>USE_ZSTD;USE_UPNP;USE_FREETYPE;COLOUR_DEPTH=16;MULTI_THREAD=1;MSG_LEVEL=3;NDEBUG;REVISION_FROM_FILE;NOMINMAX;WIN32_LEAN_AND_MEAN;WINVER=_WIN32_WINNT_WINXP</PreprocessorDefinitions>
+      <PreprocessorDefinitions>USE_ZSTD;USE_UPNP;COLOUR_DEPTH=16;MULTI_THREAD=1;MSG_LEVEL=3;NDEBUG;REVISION_FROM_FILE;NOMINMAX;WIN32_LEAN_AND_MEAN;WINVER=_WIN32_WINNT_WINXP</PreprocessorDefinitions>
     </ClCompile>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)'=='Stable'">
     <ClCompile>
-      <PreprocessorDefinitions>USE_ZSTD;USE_UPNP;USE_FREETYPE;COLOUR_DEPTH=16;MULTI_THREAD=1;MSG_LEVEL=3;NDEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;WINVER=_WIN32_WINNT_WINXP</PreprocessorDefinitions>
+      <PreprocessorDefinitions>USE_ZSTD;USE_UPNP;COLOUR_DEPTH=16;MULTI_THREAD=1;MSG_LEVEL=3;NDEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;WINVER=_WIN32_WINNT_WINXP</PreprocessorDefinitions>
     </ClCompile>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug' Or '$(Configuration)'=='Release'">
Index: Simutrans-SDL2.vcxproj
===================================================================
--- Simutrans-SDL2.vcxproj	(revisión: 11176)
+++ Simutrans-SDL2.vcxproj	(copia de trabajo)
@@ -109,7 +109,7 @@
     <ClCompile>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>USE_ZSTD;USE_UPNP;USE_FREETYPE;COLOUR_DEPTH=16;MULTI_THREAD=1;MSG_LEVEL=3;DEBUG=3;REVISION_FROM_FILE;NOMINMAX;WIN32_LEAN_AND_MEAN;WINVER=_WIN32_WINNT_WINXP</PreprocessorDefinitions>
+      <PreprocessorDefinitions>USE_ZSTD;USE_UPNP;COLOUR_DEPTH=16;MULTI_THREAD=1;MSG_LEVEL=3;DEBUG=3;REVISION_FROM_FILE;NOMINMAX;WIN32_LEAN_AND_MEAN;WINVER=_WIN32_WINNT_WINXP</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     </ClCompile>
@@ -127,12 +127,12 @@
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
     <ClCompile>
-      <PreprocessorDefinitions>USE_ZSTD;USE_UPNP;USE_FREETYPE;COLOUR_DEPTH=16;MULTI_THREAD=1;MSG_LEVEL=3;NDEBUG;REVISION_FROM_FILE;NOMINMAX;WIN32_LEAN_AND_MEAN;WINVER=_WIN32_WINNT_WINXP</PreprocessorDefinitions>
+      <PreprocessorDefinitions>USE_ZSTD;USE_UPNP;COLOUR_DEPTH=16;MULTI_THREAD=1;MSG_LEVEL=3;NDEBUG;REVISION_FROM_FILE;NOMINMAX;WIN32_LEAN_AND_MEAN;WINVER=_WIN32_WINNT_WINXP</PreprocessorDefinitions>
     </ClCompile>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)'=='Stable'">
     <ClCompile>
-      <PreprocessorDefinitions>USE_ZSTD;USE_UPNP;USE_FREETYPE;COLOUR_DEPTH=16;MULTI_THREAD=1;MSG_LEVEL=3;NDEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;WINVER=_WIN32_WINNT_WINXP</PreprocessorDefinitions>
+      <PreprocessorDefinitions>USE_ZSTD;USE_UPNP;COLOUR_DEPTH=16;MULTI_THREAD=1;MSG_LEVEL=3;NDEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;WINVER=_WIN32_WINNT_WINXP</PreprocessorDefinitions>
     </ClCompile>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug' Or '$(Configuration)'=='Release'">
Index: cmake/SimutransCompileOptions.cmake
===================================================================
--- cmake/SimutransCompileOptions.cmake	(revisión: 11176)
+++ cmake/SimutransCompileOptions.cmake	(copia de trabajo)
@@ -23,10 +23,6 @@
 
 option(SIMUTRANS_VALGRIND_SUPPORT  "Add support for valgrind \"memcheck\" tool" OFF)
 
-if (Freetype_FOUND)
-	option(SIMUTRANS_USE_FREETYPE "Enable TrueType font support using freetype library" ON)
-endif (Freetype_FOUND)
-
 if (MiniUPNP_FOUND)
 	option(SIMUTRANS_USE_UPNP "Use MiniUPNP for easier server setup" ON)
 endif (MiniUPNP_FOUND)
Index: readme.txt
===================================================================
--- readme.txt	(revisión: 11176)
+++ readme.txt	(copia de trabajo)
@@ -28,9 +28,9 @@
 
 You will need pkgconfig (Unix) or vcpkg (Microsoft Visual C++) https://github.com/Microsoft/vcpkg
 
-- Needed (All): libpng2 libbzip2 zlib 
+- Needed (All): libpng2 libbzip2 zlib libfreetype
 - Needed (Linux/Mac): libSDL2 libfluidsynth (for midi music)
-- Optional but recommended: libzstd (faster compression) libfreetype (TrueType font support) miniupnpc (for easy server setup)
+- Optional but recommended: libzstd (faster compression) miniupnpc (for easy server setup)
 
 - MSVC: Copy install-building-libs-{architecture}.bat to the vcpkg folder and run it.
 - MSYS2/Ubuntu/Debian: Run setup-development.sh to get the libraries and set up the environment.
Index: src/android/AndroidBuild.sh
===================================================================
--- src/android/AndroidBuild.sh	(revisión: 11176)
+++ src/android/AndroidBuild.sh	(copia de trabajo)
@@ -11,7 +11,6 @@
 echo COLOUR_DEPTH=16 >> config.$1.txt
 echo BACKEND=sdl2 >> config.$1.txt
 echo USE_SOFTPOINTER=1 >> config.$1.txt
-echo USE_FREETYPE=1 >> config.$1.txt
 echo USE_FLUIDSYNTH_MIDI=1 >> config.$1.txt
 echo WITH_REVISION=1 >> config.$1.txt
 echo MSG_LEVEL=3 >> config.$1.txt
Index: src/simutrans/display/font.cc
===================================================================
--- src/simutrans/display/font.cc	(revisión: 11176)
+++ src/simutrans/display/font.cc	(copia de trabajo)
@@ -11,7 +11,7 @@
 #include "../simtypes.h"
 #include "../utils/simstring.h"
 
-#ifdef USE_FREETYPE
+#if COLOUR_DEPTH != 0
 #include "../dataobj/environment.h"
 #endif
 
@@ -235,7 +235,7 @@
 }
 #endif
 
-#ifdef USE_FREETYPE
+#if COLOUR_DEPTH != 0
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
@@ -456,7 +456,7 @@
 {
 	tstrncpy( fname, srcfilename, lengthof(fname) );
 
-#ifdef USE_FREETYPE
+#if COLOUR_DEPTH != 0
 	bool ok = load_from_freetype( fname, env_t::fontsize );
 
 #if MSG_LEVEL>=4
Index: src/simutrans/display/font.h
===================================================================
--- src/simutrans/display/font.h	(revisión: 11176)
+++ src/simutrans/display/font.h	(copia de trabajo)
@@ -63,7 +63,7 @@
 	const glyph_t& get_glyph(utf32 c) const;
 
 private:
-#ifdef USE_FREETYPE
+#if COLOUR_DEPTH != 0
 	/// Load a freetype font
 	bool load_from_freetype(const char *fname, int pixel_height);
 #endif
Index: src/simutrans/gui/loadfont_frame.cc
===================================================================
--- src/simutrans/gui/loadfont_frame.cc	(revisión: 11176)
+++ src/simutrans/gui/loadfont_frame.cc	(copia de trabajo)
@@ -75,12 +75,8 @@
 	fontsize.add_listener(this);
 	fontsize.enable( is_resizable_font(env_t::fontname.c_str()) );
 
-#ifdef USE_FREETYPE
 	fnlabel.set_text( "font size" );
 	top_frame.add_component(&fontsize);
-#else
-	top_frame.remove_component(&fnlabel);
-#endif
 
 	unicode_only.init( button_t::square_automatic, "Only full Unicode fonts");
 	unicode_only.pressed = use_unicode;
@@ -125,7 +121,7 @@
 	if(  start_extension  &&  !STRICMP( start_extension, ".fon" )  ) {
 		return false;
 	}
-#ifdef USE_FREETYPE
+#if COLOUR_DEPTH != 0
 	if(  ft_library  ) {
 		// if we can open this font, it is probably ok ...
 		FT_Face face;
@@ -154,7 +150,7 @@
 void loadfont_frame_t::fill_list()
 {
 	add_path( ((std::string)env_t::base_dir+"font/").c_str() );
-#ifdef USE_FREETYPE
+#if COLOUR_DEPTH != 0
 	// ok, we can handle TTF fonts
 	ft_library = NULL;
 	if(  FT_Init_FreeType(&ft_library) != FT_Err_Ok  ) {
@@ -187,7 +183,7 @@
 			continue;
 		}
 		i.button->set_typ(button_t::roundbox_state | button_t::flexible);
-#ifndef USE_FREETYPE
+#if COLOUR_DEPTH == 0
 	}
 #else
 		// Use internal name instead the cutted file name
Index: src/simutrans/gui/loadfont_frame.h
===================================================================
--- src/simutrans/gui/loadfont_frame.h	(revisión: 11176)
+++ src/simutrans/gui/loadfont_frame.h	(copia de trabajo)
@@ -6,8 +6,7 @@
 #ifndef GUI_LOADFONT_FRAME_H
 #define GUI_LOADFONT_FRAME_H
 
-
-#ifdef USE_FREETYPE
+#if COLOUR_DEPTH != 0
 #include "gui_theme.h"
 #include "../sys/simsys.h"
 
@@ -31,7 +30,7 @@
 class loadfont_frame_t : public savegame_frame_t
 {
 private:
-#ifdef USE_FREETYPE
+#if COLOUR_DEPTH != 0
 	FT_Library ft_library;
 #endif
 	static bool use_unicode;
Index: src/simutrans/simmain.cc
===================================================================
--- src/simutrans/simmain.cc	(revisión: 11176)
+++ src/simutrans/simmain.cc	(copia de trabajo)
@@ -1590,6 +1590,7 @@
 		// play next tune?
 		check_midi();
 
+#if COLOUR_DEPTH != 0
 		if(  new_world  ) {
 			dbg->message("simu_main()", "Show banner ... " );
 			ticker::add_msg("Welcome to Simutrans", koord3d::invalid, PLAYER_FLAG | color_idx_to_rgb(COL_SOFT_BLUE));
@@ -1597,6 +1598,7 @@
 			// only show new world, if no other dialogue is active ...
 			new_world = win_get_open_count()==0;
 		}
+#endif
 
 		// to purge all previous old messages
 		welt->get_message()->set_message_flags(env_t::message_flags[0], env_t::message_flags[1], env_t::message_flags[2], env_t::message_flags[3]);
