add a lib for rendering text in sdl2 and rules to make in makefile

This commit is contained in:
2026-01-21 14:45:11 -06:00
parent f3c0aafe2f
commit e7d9c013f4
1754 changed files with 850297 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
# based on the files generated by CMake's write_basic_package_version_file
# SDL2_ttf CMake version configuration file:
# This file is meant to be placed in Resources/CMake of a SDL2_ttf framework
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_ttf.h")
message(AUTHOR_WARNING "Could not find SDL_ttf.h. This script is meant to be placed in the Resources/CMake directory of SDL2_ttf.framework")
return()
endif()
file(READ "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_ttf.h" _sdl_ttf_h)
string(REGEX MATCH "#define[ \t]+SDL_TTF_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_ttf_h}")
set(_sdl_major "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define[ \t]+SDL_TTF_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_ttf_h}")
set(_sdl_minor "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define[ \t]+SDL_TTF_PATCHLEVEL[ \t]+([0-9]+)" _sdl_patch_re "${_sdl_ttf_h}")
set(_sdl_patch "${CMAKE_MATCH_1}")
if(_sdl_major_re AND _sdl_minor_re AND _sdl_patch_re)
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_patch}")
else()
message(AUTHOR_WARNING "Could not extract version from SDL_ttf.h.")
return()
endif()
if(PACKAGE_FIND_VERSION_RANGE)
# Package version must be in the requested version range
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
endif()
else()
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
endif()
# if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail.
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()

View File

@@ -0,0 +1,39 @@
# SDL2_ttf CMake configuration file:
# This file is meant to be placed in Resources/CMake of a SDL2_ttf framework
# INTERFACE_LINK_OPTIONS needs CMake 3.12
cmake_minimum_required(VERSION 3.12)
include(FeatureSummary)
set_package_properties(SDL2_ttf PROPERTIES
URL "https://www.libsdl.org/projects/SDL_ttf/"
DESCRIPTION "Support for TrueType (.ttf) font files with Simple Directmedia Layer"
)
set(SDL2_ttf_FOUND TRUE)
set(SDL2TTF_VENDORED TRUE)
set(SDL2TTF_HARFBUZZ TRUE)
set(SDL2TTF_FREETYPE TRUE)
string(REGEX REPLACE "SDL2_ttf\\.framework.*" "SDL2_ttf.framework" _sdl2ttf_framework_path "${CMAKE_CURRENT_LIST_DIR}")
string(REGEX REPLACE "SDL2_ttf\\.framework.*" "" _sdl2ttf_framework_parent_path "${CMAKE_CURRENT_LIST_DIR}")
# All targets are created, even when some might not be requested though COMPONENTS.
# This is done for compatibility with CMake generated SDL2_ttf-target.cmake files.
if(NOT TARGET SDL2_ttf::SDL2_ttf)
add_library(SDL2_ttf::SDL2_ttf INTERFACE IMPORTED)
set_target_properties(SDL2_ttf::SDL2_ttf
PROPERTIES
INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${_sdl2ttf_framework_parent_path}\""
INTERFACE_INCLUDE_DIRECTORIES "${_sdl2ttf_framework_path}/Headers"
INTERFACE_LINK_OPTIONS "SHELL:-F \"${_sdl2ttf_framework_parent_path}\";SHELL:-framework SDL2_ttf"
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
INTERFACE_SDL2_SHARED "ON"
)
endif()
unset(_sdl2ttf_framework_path)
unset(_sdl2ttf_framework_parent_path)

View File

@@ -0,0 +1,39 @@
The FreeType 2 font engine is copyrighted work and cannot be used
legally without a software license. In order to make this project
usable to a vast majority of developers, we distribute it under two
mutually exclusive open-source licenses.
This means that *you* must choose *one* of the two licenses described
below, then obey all its terms and conditions when using FreeType 2 in
any of your projects or products.
- The FreeType License, found in the file `FTL.TXT', which is similar
to the original BSD license *with* an advertising clause that forces
you to explicitly cite the FreeType project in your product's
documentation. All details are in the license file. This license
is suited to products which don't use the GNU General Public
License.
Note that this license is compatible to the GNU General Public
License version 3, but not version 2.
- The GNU General Public License version 2, found in `GPLv2.TXT' (any
later version can be used also), for programs which already use the
GPL. Note that the FTL is incompatible with GPLv2 due to its
advertisement clause.
The contributed BDF and PCF drivers come with a license similar to that
of the X Window System. It is compatible to the above two licenses (see
file src/bdf/README and src/pcf/README). The same holds for the files
`fthash.c' and `fthash.h'; their code was part of the BDF driver in
earlier FreeType versions.
The gzip module uses the zlib license (see src/gzip/zlib.h) which too is
compatible to the above two licenses.
The MD5 checksum support (only used for debugging in development builds)
is in the public domain.
--- end of LICENSE.TXT ---

View File

@@ -0,0 +1,38 @@
HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
For parts of HarfBuzz that are licensed under different licenses see individual
files names COPYING in subdirectories where applicable.
Copyright © 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 Google, Inc.
Copyright © 2018,2019,2020 Ebrahim Byagowi
Copyright © 2019,2020 Facebook, Inc.
Copyright © 2012 Mozilla Foundation
Copyright © 2011 Codethink Limited
Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies)
Copyright © 2009 Keith Stribley
Copyright © 2009 Martin Hosken and SIL International
Copyright © 2007 Chris Wilson
Copyright © 2006 Behdad Esfahbod
Copyright © 2005 David Turner
Copyright © 2004,2007,2008,2009,2010 Red Hat, Inc.
Copyright © 1998-2004 David Turner and Werner Lemberg
For full copyright notices consult the individual files in the package.
Permission is hereby granted, without written agreement and without
license or royalty fees, to use, copy, modify, and distribute this
software and its documentation for any purpose, provided that the
above copyright notice and the following two paragraphs appear in
all copies of this software.
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

View File

@@ -0,0 +1,28 @@
SDL_ttf is an example portable font rendering library for use with SDL.
The source code is available from: http://www.libsdl.org/projects/SDL_ttf
This library is distributed under the terms of the zlib license: http://www.zlib.net/zlib_license.html
Portions of this software are copyright © 2013 The FreeType Project (www.freetype.org). All rights reserved.
This packages contains the SDL2_ttf.framework for OS X. Conforming with Apple guidelines, this framework contains both the SDL runtime component and development header files.
Requirements:
You must have the SDL2.framework installed.
To Install:
Copy the SDL2_ttf.framework to /Library/Frameworks
You may alternatively install it in <your home directory>/Library/Frameworks if your access privileges are not high enough. (Be aware that the Xcode templates we provide in the SDL Developer Extras package may require some adjustment for your system if you do this.)
(Partial) History of PB/Xcode projects:
2009-09-21 - Updated for 64-bit (Snow Leopard) Universal Binaries.
Switched to 10.4 minimum requirement.
Now dynamic linking Mac OS X bundled freetype directly in /usr/X11R6. (We used to just copy this one into our package since older versions of Mac OS X didn't ship with the library.)
Reason: We no longer statically link libfreetype.a into the binary because Apple stopped supplying a libfreetype.a in the 10.5 and 10.6 SDKs.
For static library target, you will need to link against libfreetype.dylib for your final app.
2006-01-31 - First entry in history. Updated for Universal Binaries. Static library of libfreetype has been updated by copying the version Apple provides from the 10.4u SDK.