This commit is contained in:
2024-02-27 10:10:02 +01:00
parent c0aea669c7
commit 547809c898
131 changed files with 65609 additions and 0 deletions

View File

@@ -0,0 +1,99 @@
2.22.1:
* Updated autotools to use ax_compute_relative_paths, fixing homebrew on macOS
2.20.0:
* Added support for building with CMake
* Added TTF_GetFontWrappedAlign() and TTF_SetFontWrappedAlign() to set alignment on wrapped text
* Added functions to render using FreeType LCD algorithm:
TTF_RenderText_LCD()
TTF_RenderUTF8_LCD()
TTF_RenderUNICODE_LCD()
TTF_RenderText_LCD_Wrapped()
TTF_RenderUTF8_LCD_Wrapped()
TTF_RenderUNICODE_LCD_Wrapped()
TTF_RenderGlyph_LCD()
TTF_RenderGlyph32_LCD()
* Added TTF_SetFontDirection() and TTF_SetFontScriptName() for additional control over fonts using HarfBuzz
* Updated to FreeType version 2.12.1 and HarfBuzz version 2.9.1, fixing CVE-2018-25032
* Fixed crash when loading fonts at certain sizes on Windows
* Fix memory corruption loading malformed TTF files (CVE-2022-27470)
2.0.18:
Ozkan Sezer - Wed Jan 5 14:15:46 PST 2022
* Added TTF_GetFreeTypeVersion() and TTF_GetHarfBuzzVersion()
Sylvain - Jan 16, 2021
* Added support for Signed Distance Field rendering with TTF_SetFontSDF() and TTF_GetFontSDF()
David Ludwig - Dec 28, 2019
* Added optional DPI-scaling of fonts, with the following new functions:
TTF_OpenFontDPI()
TTF_OpenFontIndexDPI()
TTF_OpenFontDPIRW()
TTF_OpenFontIndexDPIRW()
TTF_SetFontSizeDPI()
Weard Anaether - Dec 2, 2019
* Added 32-bit character support with:
TTF_RenderGlyph32_Solid()
TTF_RenderGlyph32_Shaded()
TTF_RenderGlyph32_Blended()
TTF_GetFontKerningSizeGlyphs32()
Arthur Danskin - Sep 3, 2019
* Added 32-bit character support with TTF_GlyphIsProvided32() and TTF_GlyphMetrics32()
Sylvain - Apr 5, 2019
* Added functions to set direction and script when using Harfbuzz:
TTF_SetDirection()
TTF_SetScript()
Sylvain - Mar 25, 2019
* Added extended API for text measurement:
TTF_MeasureText()
TTF_MeasureUTF8()
TTF_MeasureUNICODE()
Sylvain - Jan 31, 2019
* Added TTF_SetFontSize() to set font size dynamically
* Added 'Shaded' and 'Solid' text wrapped functions:
TTF_RenderText_Solid_Wrapped()
TTF_RenderUTF8_Solid_Wrapped()
TTF_RenderUNICODE_Solid_Wrapped()
TTF_RenderText_Shaded_Wrapped()
TTF_RenderUTF8_Shaded_Wrapped()
TTF_RenderUNICODE_Shaded_Wrapped()
* Added TTF_HINTING_LIGHT_SUBPIXEL for better results at small text sizes at a performance cost
2.0.15:
Sam Lantinga - Fri Oct 26 13:26:54 PDT 2018
* Updated to FreeType version 2.9.1
Sam Lantinga - Sun Sep 10 00:18:45 PDT 2017
* Text rendering functions now use the alpha component of the text colors
Sam Lantinga - Sat Sep 9 22:21:55 PDT 2017
* Added support for characters greater than 0xFFFF (e.g. emoji) in the UTF-8 APIs
2.0.14:
Ryan Gordon - Fri Jan 29 12:53:29 PST 2016
* Deprecated TTF_GetFontKerningSize() which takes font glyph indices and added TTF_GetFontKerningSizeGlyphs() which takes characters
2.0.13:
Sylvain - Sat Jun 28 11:42:42 2014
* Fixed bug rendering text starting with a glyph with negative starting offset
beuc - Sun Jun 15 18:27:28 2014
* Fixed regression loading non-scalable fonts
Sam Lantinga - Sun Jun 15 18:21:04 PDT 2014
* TTF_GetFontKerningSize() gets kerning between two characters, not two glyph indices
David Ludwig - Sun Apr 13 22:28:26 2014
* Added support for building for Windows RT and Windows Phone
2.0.12:
Sam Lantinga - Sat Jun 1 19:11:26 PDT 2013
* Updated for SDL 2.0 release
2.0.11:
Sam Lantinga - Sat Dec 31 10:49:42 EST 2011
* SDL_ttf is now under the zlib license
Peter Kosyh - Mon Feb 28 14:57:03 PST 2011
* Improved font glyph caching for non-latin languages
Erik Snoek - Wed Jan 12 09:10:15 PST 2011
* Added API to get kerning info: TTF_GetFontKerningSize()
Sam Lantinga - Mon Jan 10 10:58:34 2011 -0800
* Added Android.mk to build on the Android platform
2.0.10:
Adam Strzelecki - Wed Oct 21 21:02:37 PDT 2009
* Find the Unicode or symbol character map if it's available in the font

View File

@@ -0,0 +1,17 @@
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

View File

@@ -0,0 +1,15 @@
SDL_ttf 2.0
The latest version of this library is available from GitHub:
https://github.com/libsdl-org/SDL_ttf/releases
This library is a wrapper around the FreeType and Harfbuzz libraries, allowing you to use TrueType fonts to render text in SDL applications.
See the header file SDL_ttf.h and the example showfont.c for documentation on this library. This documentation is also available online at https://wiki.libsdl.org/SDL_ttf
Be careful when including fonts with your application, as many of them are copyrighted. The Microsoft fonts, for example, are not freely redistributable and even the free "web" fonts they provide are only redistributable in their special executable installer form (May 1998). There are plenty of freeware and shareware fonts available on the Internet though, and may suit your purposes.
This library is under the zlib license, see the file "LICENSE.txt" for details.
Portions of this software are copyright © 2013 The FreeType Project (www.freetype.org). All rights reserved.

View File

@@ -0,0 +1,54 @@
# 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 a cmake subfolder of SDL2_ttf-devel-2.x.y-VC
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../include/SDL_ttf.h")
message(AUTHOR_WARNING "Could not find SDL_ttf.h. This script is meant to be placed in a CMake subfolder of SDL2_ttf-devel-2.x.y-VC")
return()
endif()
file(READ "${CMAKE_CURRENT_LIST_DIR}/../include/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()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT (CMAKE_SIZEOF_VOID_P STREQUAL "8" OR CMAKE_SIZEOF_VOID_P STREQUAL "4"))
set(PACKAGE_VERSION "${PACKAGE_VERSION} (32+64bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()

View File

@@ -0,0 +1,51 @@
# SDL2_image CMake configuration file:
# This file is meant to be placed in a cmake subfolder of SDL2_image-devel-2.x.y-VC
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"
)
cmake_minimum_required(VERSION 3.0)
set(SDL2_ttf_FOUND TRUE)
set(SDL2TTF_VENDORED TRUE)
set(SDL2TTF_HARFBUZZ TRUE)
set(SDL2TTF_FREETYPE TRUE)
if(CMAKE_SIZEOF_VOID_P STREQUAL "4")
set(_sdl_arch_subdir "x86")
elseif(CMAKE_SIZEOF_VOID_P STREQUAL "8")
set(_sdl_arch_subdir "x64")
else()
unset(_sdl_arch_subdir)
set(SDL2_image_FOUND FALSE)
return()
endif()
set(_sdl2ttf_incdir "${CMAKE_CURRENT_LIST_DIR}/../include")
set(_sdl2ttf_library "${CMAKE_CURRENT_LIST_DIR}/../lib/${_sdl_arch_subdir}/SDL2_ttf.lib")
set(_sdl2ttf_dll "${CMAKE_CURRENT_LIST_DIR}/../lib/${_sdl_arch_subdir}/SDL2_ttf.dll")
# All targets are created, even when some might not be requested though COMPONENTS.
# This is done for compatibility with CMake generated SDL2_image-target.cmake files.
if(NOT TARGET SDL2_ttf::SDL2_ttf)
add_library(SDL2_ttf::SDL2_ttf SHARED IMPORTED)
set_target_properties(SDL2_ttf::SDL2_ttf
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_sdl2ttf_incdir}"
IMPORTED_IMPLIB "${_sdl2ttf_library}"
IMPORTED_LOCATION "${_sdl2ttf_dll}"
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
INTERFACE_SDL2_SHARED "ON"
)
endif()
unset(_sdl_arch_subdir)
unset(_sdl2ttf_incdir)
unset(_sdl2ttf_library)
unset(_sdl2ttf_dll)

File diff suppressed because it is too large Load Diff