chore: Mover archivos .md a .claude/ + añadir DLLs/frameworks + fix Makefile Windows

**Cambios organizativos:**
- Archivos .md movidos de raíz a .claude/ (BOIDS_ROADMAP, CLAUDE, REFACTOR_*, ROADMAP, RULES)
- .claude/ ya está en .gitignore, archivos de sesión no versionados

**Nuevos recursos para release:**
- Añadido release/frameworks/SDL3_ttf.xcframework/ para macOS
- Añadidos release/SDL3.dll y release/SDL3_ttf.dll para Windows (forzado con -f)

**Configuración:**
- defines.h: APPLOGO_DISPLAY_INTERVAL 120→90 segundos (logo aparece más frecuente)
- defines.h: Ajustes de formato/indentación (sin cambios funcionales)

**Makefile windows_release:**
- Comandos Unix reemplazados por Windows CMD nativos:
  - rm -rf → if exist + rmdir /S /Q
  - mkdir -p → mkdir
  - cp -f → copy /Y
  - rm -f → if exist + del /Q
- Ahora funciona en Windows CMD sin necesitar Git Bash/MSYS2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-19 08:51:56 +02:00
parent 827d9f0e76
commit dfebd8ece4
53 changed files with 16200 additions and 2215 deletions

BIN
release/SDL3.dll Normal file

Binary file not shown.

BIN
release/SDL3_ttf.dll Normal file

Binary file not shown.

View File

@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>SDL3_ttf.framework/SDL3_ttf</string>
<key>LibraryIdentifier</key>
<string>tvos-arm64</string>
<key>LibraryPath</key>
<string>SDL3_ttf.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>SDL3_ttf.framework/SDL3_ttf</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>SDL3_ttf.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>SDL3_ttf.framework/SDL3_ttf</string>
<key>LibraryIdentifier</key>
<string>tvos-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>SDL3_ttf.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>SDL3_ttf.framework/SDL3_ttf</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>SDL3_ttf.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>SDL3_ttf.framework/Versions/A/SDL3_ttf</string>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>SDL3_ttf.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>

View File

@@ -0,0 +1,181 @@
/*
SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts
Copyright (C) 2001-2025 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.
*/
/**
* \file SDL_textengine.h
*
* Definitions for implementations of the TTF_TextEngine interface.
*/
#ifndef SDL_TTF_TEXTENGINE_H_
#define SDL_TTF_TEXTENGINE_H_
#include <SDL3/SDL.h>
#include <SDL3_ttf/SDL_ttf.h>
#include <SDL3/SDL_begin_code.h>
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/**
* A font atlas draw command.
*
* \since This enum is available since SDL_ttf 3.0.0.
*/
typedef enum TTF_DrawCommand
{
TTF_DRAW_COMMAND_NOOP,
TTF_DRAW_COMMAND_FILL,
TTF_DRAW_COMMAND_COPY
} TTF_DrawCommand;
/**
* A filled rectangle draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa TTF_DrawOperation
*/
typedef struct TTF_FillOperation
{
TTF_DrawCommand cmd; /**< TTF_DRAW_COMMAND_FILL */
SDL_Rect rect; /**< The rectangle to fill, in pixels. The x coordinate is relative to the left side of the text area, going right, and the y coordinate is relative to the top side of the text area, going down. */
} TTF_FillOperation;
/**
* A texture copy draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa TTF_DrawOperation
*/
typedef struct TTF_CopyOperation
{
TTF_DrawCommand cmd; /**< TTF_DRAW_COMMAND_COPY */
int text_offset; /**< The offset in the text corresponding to this glyph.
There may be multiple glyphs with the same text offset
and the next text offset might be several Unicode codepoints
later. In this case the glyphs and codepoints are grouped
together and the group bounding box is the union of the dst
rectangles for the corresponding glyphs. */
TTF_Font *glyph_font; /**< The font containing the glyph to be drawn, can be passed to TTF_GetGlyphImageForIndex() */
Uint32 glyph_index; /**< The glyph index of the glyph to be drawn, can be passed to TTF_GetGlyphImageForIndex() */
SDL_Rect src; /**< The area within the glyph to be drawn */
SDL_Rect dst; /**< The drawing coordinates of the glyph, in pixels. The x coordinate is relative to the left side of the text area, going right, and the y coordinate is relative to the top side of the text area, going down. */
void *reserved;
} TTF_CopyOperation;
/**
* A text engine draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*/
typedef union TTF_DrawOperation
{
TTF_DrawCommand cmd;
TTF_FillOperation fill;
TTF_CopyOperation copy;
} TTF_DrawOperation;
/* Private data in TTF_Text, to assist in text measurement and layout */
typedef struct TTF_TextLayout TTF_TextLayout;
/* Private data in TTF_Text, available to implementations */
struct TTF_TextData
{
TTF_Font *font; /**< The font used by this text, read-only. */
SDL_FColor color; /**< The color of the text, read-only. */
bool needs_layout_update; /**< True if the layout needs to be updated */
TTF_TextLayout *layout; /**< Cached layout information, read-only. */
int x; /**< The x offset of the upper left corner of this text, in pixels, read-only. */
int y; /**< The y offset of the upper left corner of this text, in pixels, read-only. */
int w; /**< The width of this text, in pixels, read-only. */
int h; /**< The height of this text, in pixels, read-only. */
int num_ops; /**< The number of drawing operations to render this text, read-only. */
TTF_DrawOperation *ops; /**< The drawing operations used to render this text, read-only. */
int num_clusters; /**< The number of substrings representing clusters of glyphs in the string, read-only */
TTF_SubString *clusters; /**< Substrings representing clusters of glyphs in the string, read-only */
SDL_PropertiesID props; /**< Custom properties associated with this text, read-only. This field is created as-needed using TTF_GetTextProperties() and the properties may be then set and read normally */
bool needs_engine_update; /**< True if the engine text needs to be updated */
TTF_TextEngine *engine; /**< The engine used to render this text, read-only. */
void *engine_text; /**< The implementation-specific representation of this text */
};
/**
* A text engine interface.
*
* This structure should be initialized using SDL_INIT_INTERFACE()
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa SDL_INIT_INTERFACE
*/
struct TTF_TextEngine
{
Uint32 version; /**< The version of this interface */
void *userdata; /**< User data pointer passed to callbacks */
/* Create a text representation from draw instructions.
*
* All fields of `text` except `internal->engine_text` will already be filled out.
*
* This function should set the `internal->engine_text` field to a non-NULL value.
*
* \param userdata the userdata pointer in this interface.
* \param text the text object being created.
*/
bool (SDLCALL *CreateText)(void *userdata, TTF_Text *text);
/**
* Destroy a text representation.
*/
void (SDLCALL *DestroyText)(void *userdata, TTF_Text *text);
};
/* Check the size of TTF_TextEngine
*
* If this assert fails, either the compiler is padding to an unexpected size,
* or the interface has been updated and this should be updated to match and
* the code using this interface should be updated to handle the old version.
*/
SDL_COMPILE_TIME_ASSERT(TTF_TextEngine_SIZE,
(sizeof(void *) == 4 && sizeof(TTF_TextEngine) == 16) ||
(sizeof(void *) == 8 && sizeof(TTF_TextEngine) == 32));
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include <SDL3/SDL_close_code.h>
#endif /* SDL_TTF_TEXTENGINE_H_ */

View File

@@ -0,0 +1,35 @@
# Using this package
This package contains SDL_ttf built for Xcode.
To use this package in Xcode, drag `SDL3_ttf.framework` into your project.
# Documentation
An API reference and additional documentation is available at:
https://wiki.libsdl.org/SDL3_ttf
# Discussions
## Discord
You can join the official Discord server at:
https://discord.com/invite/BwpFGBWsv8
## Forums/mailing lists
You can join SDL development discussions at:
https://discourse.libsdl.org/
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
## Announcement list
You can sign up for the low traffic announcement list at:
https://www.libsdl.org/mailing-list.php

View File

@@ -0,0 +1,17 @@
Copyright (C) 1997-2025 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,23 @@
SDL_ttf 3.0
This library is a wrapper around the FreeType and Harfbuzz libraries, allowing you to use TrueType fonts to render text in SDL applications.
The latest version of this library is available from GitHub:
https://github.com/libsdl-org/SDL_ttf/releases
Installation instructions and a quick introduction is available in
[INSTALL.md](INSTALL.md)
This library is distributed under the terms of the zlib license,
available in [LICENSE.txt](LICENSE.txt).
This library also uses the following libraries:
- FreeType, licensed under the [FTL](https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/docs/FTL.TXT)
- HarfBuzz, licensed under the [MIT license](https://github.com/harfbuzz/harfbuzz/blob/main/COPYING)
- PlutoSVG, licensed under the [MIT license](https://github.com/sammycage/plutosvg/blob/master/LICENSE)
- PlutoVG, licensed under the [MIT license](https://github.com/sammycage/plutovg/blob/master/LICENSE)
Enjoy!
Sam Lantinga (slouken@libsdl.org)

View File

@@ -0,0 +1,181 @@
/*
SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts
Copyright (C) 2001-2025 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.
*/
/**
* \file SDL_textengine.h
*
* Definitions for implementations of the TTF_TextEngine interface.
*/
#ifndef SDL_TTF_TEXTENGINE_H_
#define SDL_TTF_TEXTENGINE_H_
#include <SDL3/SDL.h>
#include <SDL3_ttf/SDL_ttf.h>
#include <SDL3/SDL_begin_code.h>
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/**
* A font atlas draw command.
*
* \since This enum is available since SDL_ttf 3.0.0.
*/
typedef enum TTF_DrawCommand
{
TTF_DRAW_COMMAND_NOOP,
TTF_DRAW_COMMAND_FILL,
TTF_DRAW_COMMAND_COPY
} TTF_DrawCommand;
/**
* A filled rectangle draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa TTF_DrawOperation
*/
typedef struct TTF_FillOperation
{
TTF_DrawCommand cmd; /**< TTF_DRAW_COMMAND_FILL */
SDL_Rect rect; /**< The rectangle to fill, in pixels. The x coordinate is relative to the left side of the text area, going right, and the y coordinate is relative to the top side of the text area, going down. */
} TTF_FillOperation;
/**
* A texture copy draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa TTF_DrawOperation
*/
typedef struct TTF_CopyOperation
{
TTF_DrawCommand cmd; /**< TTF_DRAW_COMMAND_COPY */
int text_offset; /**< The offset in the text corresponding to this glyph.
There may be multiple glyphs with the same text offset
and the next text offset might be several Unicode codepoints
later. In this case the glyphs and codepoints are grouped
together and the group bounding box is the union of the dst
rectangles for the corresponding glyphs. */
TTF_Font *glyph_font; /**< The font containing the glyph to be drawn, can be passed to TTF_GetGlyphImageForIndex() */
Uint32 glyph_index; /**< The glyph index of the glyph to be drawn, can be passed to TTF_GetGlyphImageForIndex() */
SDL_Rect src; /**< The area within the glyph to be drawn */
SDL_Rect dst; /**< The drawing coordinates of the glyph, in pixels. The x coordinate is relative to the left side of the text area, going right, and the y coordinate is relative to the top side of the text area, going down. */
void *reserved;
} TTF_CopyOperation;
/**
* A text engine draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*/
typedef union TTF_DrawOperation
{
TTF_DrawCommand cmd;
TTF_FillOperation fill;
TTF_CopyOperation copy;
} TTF_DrawOperation;
/* Private data in TTF_Text, to assist in text measurement and layout */
typedef struct TTF_TextLayout TTF_TextLayout;
/* Private data in TTF_Text, available to implementations */
struct TTF_TextData
{
TTF_Font *font; /**< The font used by this text, read-only. */
SDL_FColor color; /**< The color of the text, read-only. */
bool needs_layout_update; /**< True if the layout needs to be updated */
TTF_TextLayout *layout; /**< Cached layout information, read-only. */
int x; /**< The x offset of the upper left corner of this text, in pixels, read-only. */
int y; /**< The y offset of the upper left corner of this text, in pixels, read-only. */
int w; /**< The width of this text, in pixels, read-only. */
int h; /**< The height of this text, in pixels, read-only. */
int num_ops; /**< The number of drawing operations to render this text, read-only. */
TTF_DrawOperation *ops; /**< The drawing operations used to render this text, read-only. */
int num_clusters; /**< The number of substrings representing clusters of glyphs in the string, read-only */
TTF_SubString *clusters; /**< Substrings representing clusters of glyphs in the string, read-only */
SDL_PropertiesID props; /**< Custom properties associated with this text, read-only. This field is created as-needed using TTF_GetTextProperties() and the properties may be then set and read normally */
bool needs_engine_update; /**< True if the engine text needs to be updated */
TTF_TextEngine *engine; /**< The engine used to render this text, read-only. */
void *engine_text; /**< The implementation-specific representation of this text */
};
/**
* A text engine interface.
*
* This structure should be initialized using SDL_INIT_INTERFACE()
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa SDL_INIT_INTERFACE
*/
struct TTF_TextEngine
{
Uint32 version; /**< The version of this interface */
void *userdata; /**< User data pointer passed to callbacks */
/* Create a text representation from draw instructions.
*
* All fields of `text` except `internal->engine_text` will already be filled out.
*
* This function should set the `internal->engine_text` field to a non-NULL value.
*
* \param userdata the userdata pointer in this interface.
* \param text the text object being created.
*/
bool (SDLCALL *CreateText)(void *userdata, TTF_Text *text);
/**
* Destroy a text representation.
*/
void (SDLCALL *DestroyText)(void *userdata, TTF_Text *text);
};
/* Check the size of TTF_TextEngine
*
* If this assert fails, either the compiler is padding to an unexpected size,
* or the interface has been updated and this should be updated to match and
* the code using this interface should be updated to handle the old version.
*/
SDL_COMPILE_TIME_ASSERT(TTF_TextEngine_SIZE,
(sizeof(void *) == 4 && sizeof(TTF_TextEngine) == 16) ||
(sizeof(void *) == 8 && sizeof(TTF_TextEngine) == 32));
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include <SDL3/SDL_close_code.h>
#endif /* SDL_TTF_TEXTENGINE_H_ */

View File

@@ -0,0 +1,35 @@
# Using this package
This package contains SDL_ttf built for Xcode.
To use this package in Xcode, drag `SDL3_ttf.framework` into your project.
# Documentation
An API reference and additional documentation is available at:
https://wiki.libsdl.org/SDL3_ttf
# Discussions
## Discord
You can join the official Discord server at:
https://discord.com/invite/BwpFGBWsv8
## Forums/mailing lists
You can join SDL development discussions at:
https://discourse.libsdl.org/
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
## Announcement list
You can sign up for the low traffic announcement list at:
https://www.libsdl.org/mailing-list.php

View File

@@ -0,0 +1,17 @@
Copyright (C) 1997-2025 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,23 @@
SDL_ttf 3.0
This library is a wrapper around the FreeType and Harfbuzz libraries, allowing you to use TrueType fonts to render text in SDL applications.
The latest version of this library is available from GitHub:
https://github.com/libsdl-org/SDL_ttf/releases
Installation instructions and a quick introduction is available in
[INSTALL.md](INSTALL.md)
This library is distributed under the terms of the zlib license,
available in [LICENSE.txt](LICENSE.txt).
This library also uses the following libraries:
- FreeType, licensed under the [FTL](https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/docs/FTL.TXT)
- HarfBuzz, licensed under the [MIT license](https://github.com/harfbuzz/harfbuzz/blob/main/COPYING)
- PlutoSVG, licensed under the [MIT license](https://github.com/sammycage/plutosvg/blob/master/LICENSE)
- PlutoVG, licensed under the [MIT license](https://github.com/sammycage/plutovg/blob/master/LICENSE)
Enjoy!
Sam Lantinga (slouken@libsdl.org)

View File

@@ -0,0 +1,179 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>CMake/SDL3_ttfConfig.cmake</key>
<data>
V6UpWQTvr/puOrlm1sgAs6fktNA=
</data>
<key>CMake/SDL3_ttfConfigVersion.cmake</key>
<data>
WW2xmNHZyYr9y3/8uAylJuutcPw=
</data>
<key>Headers/SDL_textengine.h</key>
<data>
7QAtKpC/pLIq6TK3F59Ax1hg3tc=
</data>
<key>Headers/SDL_ttf.h</key>
<data>
90S4SFzJy1lUuMotaCRWpTbzRa4=
</data>
<key>INSTALL.md</key>
<data>
3kA+9HE5dF7+nyypVt5YOfU+Uho=
</data>
<key>Info.plist</key>
<data>
9F72T63xvwi9u+kC0p9N011q3IM=
</data>
<key>LICENSE.txt</key>
<data>
dp6e8JHkl0CrYD+oe2IXZfWB/iw=
</data>
<key>README.md</key>
<data>
lm034L4zWKPElKb9O2dmehurfFQ=
</data>
</dict>
<key>files2</key>
<dict>
<key>CMake/SDL3_ttfConfig.cmake</key>
<dict>
<key>hash2</key>
<data>
VpwUT/D8TjpLXBguVImWqsMkqni9HXiIzx91C92Krqc=
</data>
</dict>
<key>CMake/SDL3_ttfConfigVersion.cmake</key>
<dict>
<key>hash2</key>
<data>
tb1RnDTj72GQOzcXp6FPtiqW8tSD886UyUY09c1Ms/U=
</data>
</dict>
<key>Headers/SDL_textengine.h</key>
<dict>
<key>hash2</key>
<data>
Uk27FTzsWoYySpKM1gkwCB/svSxscGViuMzca93gLP8=
</data>
</dict>
<key>Headers/SDL_ttf.h</key>
<dict>
<key>hash2</key>
<data>
6bsCCUp3Uc3tCp+0Xxw7Tt01+UV8bra5YN1dFjpRBL0=
</data>
</dict>
<key>INSTALL.md</key>
<dict>
<key>hash2</key>
<data>
Jq9GEmdnFRmUTNnYYZZ+5mFqqrMelD86Gthhyi2kGJQ=
</data>
</dict>
<key>LICENSE.txt</key>
<dict>
<key>hash2</key>
<data>
eCbsoKD35ZHzjdhE4geiAKrIGlmyDYoww6+MYoKvE+Y=
</data>
</dict>
<key>README.md</key>
<dict>
<key>hash2</key>
<data>
6aipppbEU7MEd3x9OHnKqAGyFXVYiSAL8X8lm271U00=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

View File

@@ -0,0 +1 @@
Versions/Current/Headers

View File

@@ -0,0 +1 @@
Versions/Current/Resources

View File

@@ -0,0 +1 @@
Versions/Current/SDL3_ttf

View File

@@ -0,0 +1,181 @@
/*
SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts
Copyright (C) 2001-2025 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.
*/
/**
* \file SDL_textengine.h
*
* Definitions for implementations of the TTF_TextEngine interface.
*/
#ifndef SDL_TTF_TEXTENGINE_H_
#define SDL_TTF_TEXTENGINE_H_
#include <SDL3/SDL.h>
#include <SDL3_ttf/SDL_ttf.h>
#include <SDL3/SDL_begin_code.h>
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/**
* A font atlas draw command.
*
* \since This enum is available since SDL_ttf 3.0.0.
*/
typedef enum TTF_DrawCommand
{
TTF_DRAW_COMMAND_NOOP,
TTF_DRAW_COMMAND_FILL,
TTF_DRAW_COMMAND_COPY
} TTF_DrawCommand;
/**
* A filled rectangle draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa TTF_DrawOperation
*/
typedef struct TTF_FillOperation
{
TTF_DrawCommand cmd; /**< TTF_DRAW_COMMAND_FILL */
SDL_Rect rect; /**< The rectangle to fill, in pixels. The x coordinate is relative to the left side of the text area, going right, and the y coordinate is relative to the top side of the text area, going down. */
} TTF_FillOperation;
/**
* A texture copy draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa TTF_DrawOperation
*/
typedef struct TTF_CopyOperation
{
TTF_DrawCommand cmd; /**< TTF_DRAW_COMMAND_COPY */
int text_offset; /**< The offset in the text corresponding to this glyph.
There may be multiple glyphs with the same text offset
and the next text offset might be several Unicode codepoints
later. In this case the glyphs and codepoints are grouped
together and the group bounding box is the union of the dst
rectangles for the corresponding glyphs. */
TTF_Font *glyph_font; /**< The font containing the glyph to be drawn, can be passed to TTF_GetGlyphImageForIndex() */
Uint32 glyph_index; /**< The glyph index of the glyph to be drawn, can be passed to TTF_GetGlyphImageForIndex() */
SDL_Rect src; /**< The area within the glyph to be drawn */
SDL_Rect dst; /**< The drawing coordinates of the glyph, in pixels. The x coordinate is relative to the left side of the text area, going right, and the y coordinate is relative to the top side of the text area, going down. */
void *reserved;
} TTF_CopyOperation;
/**
* A text engine draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*/
typedef union TTF_DrawOperation
{
TTF_DrawCommand cmd;
TTF_FillOperation fill;
TTF_CopyOperation copy;
} TTF_DrawOperation;
/* Private data in TTF_Text, to assist in text measurement and layout */
typedef struct TTF_TextLayout TTF_TextLayout;
/* Private data in TTF_Text, available to implementations */
struct TTF_TextData
{
TTF_Font *font; /**< The font used by this text, read-only. */
SDL_FColor color; /**< The color of the text, read-only. */
bool needs_layout_update; /**< True if the layout needs to be updated */
TTF_TextLayout *layout; /**< Cached layout information, read-only. */
int x; /**< The x offset of the upper left corner of this text, in pixels, read-only. */
int y; /**< The y offset of the upper left corner of this text, in pixels, read-only. */
int w; /**< The width of this text, in pixels, read-only. */
int h; /**< The height of this text, in pixels, read-only. */
int num_ops; /**< The number of drawing operations to render this text, read-only. */
TTF_DrawOperation *ops; /**< The drawing operations used to render this text, read-only. */
int num_clusters; /**< The number of substrings representing clusters of glyphs in the string, read-only */
TTF_SubString *clusters; /**< Substrings representing clusters of glyphs in the string, read-only */
SDL_PropertiesID props; /**< Custom properties associated with this text, read-only. This field is created as-needed using TTF_GetTextProperties() and the properties may be then set and read normally */
bool needs_engine_update; /**< True if the engine text needs to be updated */
TTF_TextEngine *engine; /**< The engine used to render this text, read-only. */
void *engine_text; /**< The implementation-specific representation of this text */
};
/**
* A text engine interface.
*
* This structure should be initialized using SDL_INIT_INTERFACE()
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa SDL_INIT_INTERFACE
*/
struct TTF_TextEngine
{
Uint32 version; /**< The version of this interface */
void *userdata; /**< User data pointer passed to callbacks */
/* Create a text representation from draw instructions.
*
* All fields of `text` except `internal->engine_text` will already be filled out.
*
* This function should set the `internal->engine_text` field to a non-NULL value.
*
* \param userdata the userdata pointer in this interface.
* \param text the text object being created.
*/
bool (SDLCALL *CreateText)(void *userdata, TTF_Text *text);
/**
* Destroy a text representation.
*/
void (SDLCALL *DestroyText)(void *userdata, TTF_Text *text);
};
/* Check the size of TTF_TextEngine
*
* If this assert fails, either the compiler is padding to an unexpected size,
* or the interface has been updated and this should be updated to match and
* the code using this interface should be updated to handle the old version.
*/
SDL_COMPILE_TIME_ASSERT(TTF_TextEngine_SIZE,
(sizeof(void *) == 4 && sizeof(TTF_TextEngine) == 16) ||
(sizeof(void *) == 8 && sizeof(TTF_TextEngine) == 32));
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include <SDL3/SDL_close_code.h>
#endif /* SDL_TTF_TEXTENGINE_H_ */

View File

@@ -0,0 +1,35 @@
# Using this package
This package contains SDL_ttf built for Xcode.
To use this package in Xcode, drag `SDL3_ttf.framework` into your project.
# Documentation
An API reference and additional documentation is available at:
https://wiki.libsdl.org/SDL3_ttf
# Discussions
## Discord
You can join the official Discord server at:
https://discord.com/invite/BwpFGBWsv8
## Forums/mailing lists
You can join SDL development discussions at:
https://discourse.libsdl.org/
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
## Announcement list
You can sign up for the low traffic announcement list at:
https://www.libsdl.org/mailing-list.php

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>23H420</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>SDL3_ttf</string>
<key>CFBundleIdentifier</key>
<string>org.libsdl.SDL3-ttf</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>SDL3_ttf</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.2.2</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>3.2.2</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string></string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>14.5</string>
<key>DTSDKBuild</key>
<string>23F73</string>
<key>DTSDKName</key>
<string>macosx14.5</string>
<key>DTXcode</key>
<string>1540</string>
<key>DTXcodeBuild</key>
<string>15F31d</string>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
</dict>
</plist>

View File

@@ -0,0 +1,17 @@
Copyright (C) 1997-2025 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,23 @@
SDL_ttf 3.0
This library is a wrapper around the FreeType and Harfbuzz libraries, allowing you to use TrueType fonts to render text in SDL applications.
The latest version of this library is available from GitHub:
https://github.com/libsdl-org/SDL_ttf/releases
Installation instructions and a quick introduction is available in
[INSTALL.md](INSTALL.md)
This library is distributed under the terms of the zlib license,
available in [LICENSE.txt](LICENSE.txt).
This library also uses the following libraries:
- FreeType, licensed under the [FTL](https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/docs/FTL.TXT)
- HarfBuzz, licensed under the [MIT license](https://github.com/harfbuzz/harfbuzz/blob/main/COPYING)
- PlutoSVG, licensed under the [MIT license](https://github.com/sammycage/plutosvg/blob/master/LICENSE)
- PlutoVG, licensed under the [MIT license](https://github.com/sammycage/plutovg/blob/master/LICENSE)
Enjoy!
Sam Lantinga (slouken@libsdl.org)

View File

@@ -0,0 +1,197 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Resources/CMake/SDL3_ttfConfig.cmake</key>
<data>
V6UpWQTvr/puOrlm1sgAs6fktNA=
</data>
<key>Resources/CMake/SDL3_ttfConfigVersion.cmake</key>
<data>
WW2xmNHZyYr9y3/8uAylJuutcPw=
</data>
<key>Resources/INSTALL.md</key>
<data>
3kA+9HE5dF7+nyypVt5YOfU+Uho=
</data>
<key>Resources/Info.plist</key>
<data>
Q+NCd9YwE/D/Y4ptVnrhOldXz6U=
</data>
<key>Resources/LICENSE.txt</key>
<data>
dp6e8JHkl0CrYD+oe2IXZfWB/iw=
</data>
<key>Resources/README.md</key>
<data>
lm034L4zWKPElKb9O2dmehurfFQ=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/SDL_textengine.h</key>
<dict>
<key>hash2</key>
<data>
Uk27FTzsWoYySpKM1gkwCB/svSxscGViuMzca93gLP8=
</data>
</dict>
<key>Headers/SDL_ttf.h</key>
<dict>
<key>hash2</key>
<data>
6bsCCUp3Uc3tCp+0Xxw7Tt01+UV8bra5YN1dFjpRBL0=
</data>
</dict>
<key>Resources/CMake/SDL3_ttfConfig.cmake</key>
<dict>
<key>hash2</key>
<data>
VpwUT/D8TjpLXBguVImWqsMkqni9HXiIzx91C92Krqc=
</data>
</dict>
<key>Resources/CMake/SDL3_ttfConfigVersion.cmake</key>
<dict>
<key>hash2</key>
<data>
tb1RnDTj72GQOzcXp6FPtiqW8tSD886UyUY09c1Ms/U=
</data>
</dict>
<key>Resources/INSTALL.md</key>
<dict>
<key>hash2</key>
<data>
Jq9GEmdnFRmUTNnYYZZ+5mFqqrMelD86Gthhyi2kGJQ=
</data>
</dict>
<key>Resources/Info.plist</key>
<dict>
<key>hash2</key>
<data>
LwUSgLeBsUUT/M3w+W5AAfTziViNTWX1o7Ly+x3J2u0=
</data>
</dict>
<key>Resources/LICENSE.txt</key>
<dict>
<key>hash2</key>
<data>
eCbsoKD35ZHzjdhE4geiAKrIGlmyDYoww6+MYoKvE+Y=
</data>
</dict>
<key>Resources/README.md</key>
<dict>
<key>hash2</key>
<data>
6aipppbEU7MEd3x9OHnKqAGyFXVYiSAL8X8lm271U00=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

View File

@@ -0,0 +1,181 @@
/*
SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts
Copyright (C) 2001-2025 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.
*/
/**
* \file SDL_textengine.h
*
* Definitions for implementations of the TTF_TextEngine interface.
*/
#ifndef SDL_TTF_TEXTENGINE_H_
#define SDL_TTF_TEXTENGINE_H_
#include <SDL3/SDL.h>
#include <SDL3_ttf/SDL_ttf.h>
#include <SDL3/SDL_begin_code.h>
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/**
* A font atlas draw command.
*
* \since This enum is available since SDL_ttf 3.0.0.
*/
typedef enum TTF_DrawCommand
{
TTF_DRAW_COMMAND_NOOP,
TTF_DRAW_COMMAND_FILL,
TTF_DRAW_COMMAND_COPY
} TTF_DrawCommand;
/**
* A filled rectangle draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa TTF_DrawOperation
*/
typedef struct TTF_FillOperation
{
TTF_DrawCommand cmd; /**< TTF_DRAW_COMMAND_FILL */
SDL_Rect rect; /**< The rectangle to fill, in pixels. The x coordinate is relative to the left side of the text area, going right, and the y coordinate is relative to the top side of the text area, going down. */
} TTF_FillOperation;
/**
* A texture copy draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa TTF_DrawOperation
*/
typedef struct TTF_CopyOperation
{
TTF_DrawCommand cmd; /**< TTF_DRAW_COMMAND_COPY */
int text_offset; /**< The offset in the text corresponding to this glyph.
There may be multiple glyphs with the same text offset
and the next text offset might be several Unicode codepoints
later. In this case the glyphs and codepoints are grouped
together and the group bounding box is the union of the dst
rectangles for the corresponding glyphs. */
TTF_Font *glyph_font; /**< The font containing the glyph to be drawn, can be passed to TTF_GetGlyphImageForIndex() */
Uint32 glyph_index; /**< The glyph index of the glyph to be drawn, can be passed to TTF_GetGlyphImageForIndex() */
SDL_Rect src; /**< The area within the glyph to be drawn */
SDL_Rect dst; /**< The drawing coordinates of the glyph, in pixels. The x coordinate is relative to the left side of the text area, going right, and the y coordinate is relative to the top side of the text area, going down. */
void *reserved;
} TTF_CopyOperation;
/**
* A text engine draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*/
typedef union TTF_DrawOperation
{
TTF_DrawCommand cmd;
TTF_FillOperation fill;
TTF_CopyOperation copy;
} TTF_DrawOperation;
/* Private data in TTF_Text, to assist in text measurement and layout */
typedef struct TTF_TextLayout TTF_TextLayout;
/* Private data in TTF_Text, available to implementations */
struct TTF_TextData
{
TTF_Font *font; /**< The font used by this text, read-only. */
SDL_FColor color; /**< The color of the text, read-only. */
bool needs_layout_update; /**< True if the layout needs to be updated */
TTF_TextLayout *layout; /**< Cached layout information, read-only. */
int x; /**< The x offset of the upper left corner of this text, in pixels, read-only. */
int y; /**< The y offset of the upper left corner of this text, in pixels, read-only. */
int w; /**< The width of this text, in pixels, read-only. */
int h; /**< The height of this text, in pixels, read-only. */
int num_ops; /**< The number of drawing operations to render this text, read-only. */
TTF_DrawOperation *ops; /**< The drawing operations used to render this text, read-only. */
int num_clusters; /**< The number of substrings representing clusters of glyphs in the string, read-only */
TTF_SubString *clusters; /**< Substrings representing clusters of glyphs in the string, read-only */
SDL_PropertiesID props; /**< Custom properties associated with this text, read-only. This field is created as-needed using TTF_GetTextProperties() and the properties may be then set and read normally */
bool needs_engine_update; /**< True if the engine text needs to be updated */
TTF_TextEngine *engine; /**< The engine used to render this text, read-only. */
void *engine_text; /**< The implementation-specific representation of this text */
};
/**
* A text engine interface.
*
* This structure should be initialized using SDL_INIT_INTERFACE()
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa SDL_INIT_INTERFACE
*/
struct TTF_TextEngine
{
Uint32 version; /**< The version of this interface */
void *userdata; /**< User data pointer passed to callbacks */
/* Create a text representation from draw instructions.
*
* All fields of `text` except `internal->engine_text` will already be filled out.
*
* This function should set the `internal->engine_text` field to a non-NULL value.
*
* \param userdata the userdata pointer in this interface.
* \param text the text object being created.
*/
bool (SDLCALL *CreateText)(void *userdata, TTF_Text *text);
/**
* Destroy a text representation.
*/
void (SDLCALL *DestroyText)(void *userdata, TTF_Text *text);
};
/* Check the size of TTF_TextEngine
*
* If this assert fails, either the compiler is padding to an unexpected size,
* or the interface has been updated and this should be updated to match and
* the code using this interface should be updated to handle the old version.
*/
SDL_COMPILE_TIME_ASSERT(TTF_TextEngine_SIZE,
(sizeof(void *) == 4 && sizeof(TTF_TextEngine) == 16) ||
(sizeof(void *) == 8 && sizeof(TTF_TextEngine) == 32));
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include <SDL3/SDL_close_code.h>
#endif /* SDL_TTF_TEXTENGINE_H_ */

View File

@@ -0,0 +1,35 @@
# Using this package
This package contains SDL_ttf built for Xcode.
To use this package in Xcode, drag `SDL3_ttf.framework` into your project.
# Documentation
An API reference and additional documentation is available at:
https://wiki.libsdl.org/SDL3_ttf
# Discussions
## Discord
You can join the official Discord server at:
https://discord.com/invite/BwpFGBWsv8
## Forums/mailing lists
You can join SDL development discussions at:
https://discourse.libsdl.org/
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
## Announcement list
You can sign up for the low traffic announcement list at:
https://www.libsdl.org/mailing-list.php

View File

@@ -0,0 +1,17 @@
Copyright (C) 1997-2025 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,23 @@
SDL_ttf 3.0
This library is a wrapper around the FreeType and Harfbuzz libraries, allowing you to use TrueType fonts to render text in SDL applications.
The latest version of this library is available from GitHub:
https://github.com/libsdl-org/SDL_ttf/releases
Installation instructions and a quick introduction is available in
[INSTALL.md](INSTALL.md)
This library is distributed under the terms of the zlib license,
available in [LICENSE.txt](LICENSE.txt).
This library also uses the following libraries:
- FreeType, licensed under the [FTL](https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/docs/FTL.TXT)
- HarfBuzz, licensed under the [MIT license](https://github.com/harfbuzz/harfbuzz/blob/main/COPYING)
- PlutoSVG, licensed under the [MIT license](https://github.com/sammycage/plutosvg/blob/master/LICENSE)
- PlutoVG, licensed under the [MIT license](https://github.com/sammycage/plutovg/blob/master/LICENSE)
Enjoy!
Sam Lantinga (slouken@libsdl.org)

View File

@@ -0,0 +1,181 @@
/*
SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts
Copyright (C) 2001-2025 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.
*/
/**
* \file SDL_textengine.h
*
* Definitions for implementations of the TTF_TextEngine interface.
*/
#ifndef SDL_TTF_TEXTENGINE_H_
#define SDL_TTF_TEXTENGINE_H_
#include <SDL3/SDL.h>
#include <SDL3_ttf/SDL_ttf.h>
#include <SDL3/SDL_begin_code.h>
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/**
* A font atlas draw command.
*
* \since This enum is available since SDL_ttf 3.0.0.
*/
typedef enum TTF_DrawCommand
{
TTF_DRAW_COMMAND_NOOP,
TTF_DRAW_COMMAND_FILL,
TTF_DRAW_COMMAND_COPY
} TTF_DrawCommand;
/**
* A filled rectangle draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa TTF_DrawOperation
*/
typedef struct TTF_FillOperation
{
TTF_DrawCommand cmd; /**< TTF_DRAW_COMMAND_FILL */
SDL_Rect rect; /**< The rectangle to fill, in pixels. The x coordinate is relative to the left side of the text area, going right, and the y coordinate is relative to the top side of the text area, going down. */
} TTF_FillOperation;
/**
* A texture copy draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa TTF_DrawOperation
*/
typedef struct TTF_CopyOperation
{
TTF_DrawCommand cmd; /**< TTF_DRAW_COMMAND_COPY */
int text_offset; /**< The offset in the text corresponding to this glyph.
There may be multiple glyphs with the same text offset
and the next text offset might be several Unicode codepoints
later. In this case the glyphs and codepoints are grouped
together and the group bounding box is the union of the dst
rectangles for the corresponding glyphs. */
TTF_Font *glyph_font; /**< The font containing the glyph to be drawn, can be passed to TTF_GetGlyphImageForIndex() */
Uint32 glyph_index; /**< The glyph index of the glyph to be drawn, can be passed to TTF_GetGlyphImageForIndex() */
SDL_Rect src; /**< The area within the glyph to be drawn */
SDL_Rect dst; /**< The drawing coordinates of the glyph, in pixels. The x coordinate is relative to the left side of the text area, going right, and the y coordinate is relative to the top side of the text area, going down. */
void *reserved;
} TTF_CopyOperation;
/**
* A text engine draw operation.
*
* \since This struct is available since SDL_ttf 3.0.0.
*/
typedef union TTF_DrawOperation
{
TTF_DrawCommand cmd;
TTF_FillOperation fill;
TTF_CopyOperation copy;
} TTF_DrawOperation;
/* Private data in TTF_Text, to assist in text measurement and layout */
typedef struct TTF_TextLayout TTF_TextLayout;
/* Private data in TTF_Text, available to implementations */
struct TTF_TextData
{
TTF_Font *font; /**< The font used by this text, read-only. */
SDL_FColor color; /**< The color of the text, read-only. */
bool needs_layout_update; /**< True if the layout needs to be updated */
TTF_TextLayout *layout; /**< Cached layout information, read-only. */
int x; /**< The x offset of the upper left corner of this text, in pixels, read-only. */
int y; /**< The y offset of the upper left corner of this text, in pixels, read-only. */
int w; /**< The width of this text, in pixels, read-only. */
int h; /**< The height of this text, in pixels, read-only. */
int num_ops; /**< The number of drawing operations to render this text, read-only. */
TTF_DrawOperation *ops; /**< The drawing operations used to render this text, read-only. */
int num_clusters; /**< The number of substrings representing clusters of glyphs in the string, read-only */
TTF_SubString *clusters; /**< Substrings representing clusters of glyphs in the string, read-only */
SDL_PropertiesID props; /**< Custom properties associated with this text, read-only. This field is created as-needed using TTF_GetTextProperties() and the properties may be then set and read normally */
bool needs_engine_update; /**< True if the engine text needs to be updated */
TTF_TextEngine *engine; /**< The engine used to render this text, read-only. */
void *engine_text; /**< The implementation-specific representation of this text */
};
/**
* A text engine interface.
*
* This structure should be initialized using SDL_INIT_INTERFACE()
*
* \since This struct is available since SDL_ttf 3.0.0.
*
* \sa SDL_INIT_INTERFACE
*/
struct TTF_TextEngine
{
Uint32 version; /**< The version of this interface */
void *userdata; /**< User data pointer passed to callbacks */
/* Create a text representation from draw instructions.
*
* All fields of `text` except `internal->engine_text` will already be filled out.
*
* This function should set the `internal->engine_text` field to a non-NULL value.
*
* \param userdata the userdata pointer in this interface.
* \param text the text object being created.
*/
bool (SDLCALL *CreateText)(void *userdata, TTF_Text *text);
/**
* Destroy a text representation.
*/
void (SDLCALL *DestroyText)(void *userdata, TTF_Text *text);
};
/* Check the size of TTF_TextEngine
*
* If this assert fails, either the compiler is padding to an unexpected size,
* or the interface has been updated and this should be updated to match and
* the code using this interface should be updated to handle the old version.
*/
SDL_COMPILE_TIME_ASSERT(TTF_TextEngine_SIZE,
(sizeof(void *) == 4 && sizeof(TTF_TextEngine) == 16) ||
(sizeof(void *) == 8 && sizeof(TTF_TextEngine) == 32));
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include <SDL3/SDL_close_code.h>
#endif /* SDL_TTF_TEXTENGINE_H_ */

View File

@@ -0,0 +1,35 @@
# Using this package
This package contains SDL_ttf built for Xcode.
To use this package in Xcode, drag `SDL3_ttf.framework` into your project.
# Documentation
An API reference and additional documentation is available at:
https://wiki.libsdl.org/SDL3_ttf
# Discussions
## Discord
You can join the official Discord server at:
https://discord.com/invite/BwpFGBWsv8
## Forums/mailing lists
You can join SDL development discussions at:
https://discourse.libsdl.org/
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
## Announcement list
You can sign up for the low traffic announcement list at:
https://www.libsdl.org/mailing-list.php

View File

@@ -0,0 +1,17 @@
Copyright (C) 1997-2025 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,23 @@
SDL_ttf 3.0
This library is a wrapper around the FreeType and Harfbuzz libraries, allowing you to use TrueType fonts to render text in SDL applications.
The latest version of this library is available from GitHub:
https://github.com/libsdl-org/SDL_ttf/releases
Installation instructions and a quick introduction is available in
[INSTALL.md](INSTALL.md)
This library is distributed under the terms of the zlib license,
available in [LICENSE.txt](LICENSE.txt).
This library also uses the following libraries:
- FreeType, licensed under the [FTL](https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/docs/FTL.TXT)
- HarfBuzz, licensed under the [MIT license](https://github.com/harfbuzz/harfbuzz/blob/main/COPYING)
- PlutoSVG, licensed under the [MIT license](https://github.com/sammycage/plutosvg/blob/master/LICENSE)
- PlutoVG, licensed under the [MIT license](https://github.com/sammycage/plutovg/blob/master/LICENSE)
Enjoy!
Sam Lantinga (slouken@libsdl.org)

View File

@@ -0,0 +1,179 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>CMake/SDL3_ttfConfig.cmake</key>
<data>
V6UpWQTvr/puOrlm1sgAs6fktNA=
</data>
<key>CMake/SDL3_ttfConfigVersion.cmake</key>
<data>
WW2xmNHZyYr9y3/8uAylJuutcPw=
</data>
<key>Headers/SDL_textengine.h</key>
<data>
7QAtKpC/pLIq6TK3F59Ax1hg3tc=
</data>
<key>Headers/SDL_ttf.h</key>
<data>
90S4SFzJy1lUuMotaCRWpTbzRa4=
</data>
<key>INSTALL.md</key>
<data>
3kA+9HE5dF7+nyypVt5YOfU+Uho=
</data>
<key>Info.plist</key>
<data>
+nBymgIjvQrMA5f3CqiBB03/KB0=
</data>
<key>LICENSE.txt</key>
<data>
dp6e8JHkl0CrYD+oe2IXZfWB/iw=
</data>
<key>README.md</key>
<data>
lm034L4zWKPElKb9O2dmehurfFQ=
</data>
</dict>
<key>files2</key>
<dict>
<key>CMake/SDL3_ttfConfig.cmake</key>
<dict>
<key>hash2</key>
<data>
VpwUT/D8TjpLXBguVImWqsMkqni9HXiIzx91C92Krqc=
</data>
</dict>
<key>CMake/SDL3_ttfConfigVersion.cmake</key>
<dict>
<key>hash2</key>
<data>
tb1RnDTj72GQOzcXp6FPtiqW8tSD886UyUY09c1Ms/U=
</data>
</dict>
<key>Headers/SDL_textengine.h</key>
<dict>
<key>hash2</key>
<data>
Uk27FTzsWoYySpKM1gkwCB/svSxscGViuMzca93gLP8=
</data>
</dict>
<key>Headers/SDL_ttf.h</key>
<dict>
<key>hash2</key>
<data>
6bsCCUp3Uc3tCp+0Xxw7Tt01+UV8bra5YN1dFjpRBL0=
</data>
</dict>
<key>INSTALL.md</key>
<dict>
<key>hash2</key>
<data>
Jq9GEmdnFRmUTNnYYZZ+5mFqqrMelD86Gthhyi2kGJQ=
</data>
</dict>
<key>LICENSE.txt</key>
<dict>
<key>hash2</key>
<data>
eCbsoKD35ZHzjdhE4geiAKrIGlmyDYoww6+MYoKvE+Y=
</data>
</dict>
<key>README.md</key>
<dict>
<key>hash2</key>
<data>
6aipppbEU7MEd3x9OHnKqAGyFXVYiSAL8X8lm271U00=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>