Update to Freetype 2.13.0

Also adds a file to patches which is a required modification
to the update in order to make it compile.

Fixes: QTBUG-111536
Change-Id: Iaabc1b7736cfd98217a8aff2b7f9bc65402d0451
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 18aa3309a4e4b5a874298af1243095db9aa207d3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2023-02-27 17:17:16 +01:00 committed by Qt Cherry-pick Bot
parent 7e4092d7cb
commit ecb118d45e
514 changed files with 6072 additions and 7635 deletions

View File

@ -1,4 +1,4 @@
FreeType 2.12.1
FreeType 2.13.0
===============
Homepage: https://www.freetype.org
@ -16,7 +16,9 @@ Read the files `docs/INSTALL*` for installation instructions; see the
file `docs/LICENSE.TXT` for the available licenses.
For using FreeType's git repository instead of a distribution bundle,
please read file `README.git`.
please read file `README.git`. Note that you have to actually clone
the repository; using a snapshot will not work (in other words, don't
use gitlab's 'Download' button).
The FreeType 2 API reference is located in directory `docs/reference`;
use the file `index.html` as the top entry point. [Please note that
@ -30,9 +32,9 @@ sites. Go to
and download one of the following files.
freetype-doc-2.12.1.tar.xz
freetype-doc-2.12.1.tar.gz
ftdoc2121.zip
freetype-doc-2.13.0.tar.xz
freetype-doc-2.13.0.tar.gz
ftdoc2130.zip
To view the documentation online, go to
@ -92,7 +94,7 @@ Enjoy!
----------------------------------------------------------------------
Copyright (C) 2006-2022 by
Copyright (C) 2006-2023 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Unix-specific FreeType low-level system interface (body).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -70,6 +70,7 @@
#include <string.h>
#include <errno.h>
/**************************************************************************
*
* MEMORY MANAGEMENT INTERFACE

View File

@ -4,7 +4,7 @@
*
* Debugging and logging component for Win32 (body).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -1,4 +1,84 @@
CHANGES BETWEEN 2.12.0 and 2.12.1
CHANGES BETWEEN 2.12.1 and 2.13.0 (2023-Feb-09)
I. IMPORTANT CHANGES
- The demo program `ftinspect` has been completely updated and much
enhanced. It now combines the functionality of almost all other
graphical FreeType demo programs into a single application based
on the Qt framework. This was Charlie Jiang's GSoC 2022 project.
- The 'COLR' v1 API is now considered as stable.
https://learn.microsoft.com/en-us/typography/opentype/spec/colr
III. MISCELLANEOUS
- For OpenType Variable Fonts, `avar` table format 2.0 is now
supported. The code was contributed by Behdad Esfahbod.
Note that this is an extension supported on recent Apple platforms
and by HarfBuzz, but not yet in the OpenType standard! See
https://github.com/harfbuzz/boring-expansion-spec/blob/main/avar2.md
for the specification. To deactivate it, define the configuration
macro 'TT_CONFIG_OPTION_NO_BORING_EXPANSION'.
- A new API `FT_GlyphSlot_Slant` to slant a glyph by a given angle
has been added. Note that this function is part of `ftsynth.h`,
which is still considered to be in alpha stage.
- TrueType interpreter version 38 (also known as 'Infinality') that
was first introduced about 10 years ago in FreeType 2.4.11 is now
deprecated and slated to be removed in the next version. TrueType
interpreter version 40 has been FreeType's default version for six
years now and provides an excellent alternative. This is the last
FreeType version with TT_INTERPRETER_VERSION_38 and
TT_INTERPRETER_VERSION_40 treated differently.
- The only referenced but never documented configuration macro
`FT_CONFIG_OPTION_NO_GLYPH_NAMES` has been removed.
- The `ftbench` demo program got a new command line option `-e` to
set a charmap index.
- Specifying a point size is now optional for the demo programs
`ftgrid`, `ftmulti`, `ftstring`, and `ftview`. If not given, a
default size is used.
- For `ftgrid`, `ftstring`, and `ftview`, option `-e` now also
accepts a numeric value to set a charmap index.
- In `ftstring`, it is now possible to set the displayed text
interactively by pressing the 'Enter' key.
- `ftmulti` can now handle up to 16 design axes.
- To avoid reserved identifiers that are globally defined, the
auto-hinter debugging macros (which are only available if
`FT_DEBUG_AUTOFIT` is defined)
```
_af_debug_disable_horz_hints
_af_debug_disable_vert_hints
_af_debug_disable_blue_hints
_af_debug_hints
```
have been renamed to
```
af_debug_disable_horz_hints_
af_debug_disable_vert_hints_
af_debug_disable_blue_hints_
af_debug_hints_
```
======================================================================
CHANGES BETWEEN 2.12.0 and 2.12.1 (2022-May-01)
I. IMPORTANT BUG FIXES
@ -28,7 +108,7 @@ CHANGES BETWEEN 2.12.0 and 2.12.1
======================================================================
CHANGES BETWEEN 2.11.1 and 2.12.0
CHANGES BETWEEN 2.11.1 and 2.12.0 (2022-Mar-30)
I. IMPORTANT CHANGES
@ -79,7 +159,7 @@ CHANGES BETWEEN 2.11.1 and 2.12.0
======================================================================
CHANGES BETWEEN 2.11.0 and 2.11.1
CHANGES BETWEEN 2.11.0 and 2.11.1 (2021-Dec-01)
I. IMPORTANT CHANGES
@ -111,7 +191,7 @@ CHANGES BETWEEN 2.11.0 and 2.11.1
======================================================================
CHANGES BETWEEN 2.10.4 and 2.11.0
CHANGES BETWEEN 2.10.4 and 2.11.0 (2021-Jul-18)
I. IMPORTANT CHANGES
@ -5530,7 +5610,7 @@ Extensions support:
------------------------------------------------------------------------
Copyright (C) 2000-2022 by
Copyright (C) 2000-2023 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,

View File

@ -139,7 +139,7 @@ IV. Overriding default configuration and module headers
----------------------------------------------------------------------
Copyright (C) 2003-2022 by
Copyright (C) 2003-2023 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,

View File

@ -297,7 +297,7 @@ to access them.
------------------------------------------------------------------------
Copyright (C) 2002-2022 by
Copyright (C) 2002-2023 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,

View File

@ -27,7 +27,7 @@ Other bugs have been registered at the savannah bugzilla of FreeType.
------------------------------------------------------------------------
Copyright (C) 2001-2022 by
Copyright (C) 2001-2023 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,

0
src/3rdparty/freetype/import_from_tarball.sh vendored Normal file → Executable file
View File

270
src/3rdparty/freetype/include/dlg/dlg.h vendored Normal file
View File

@ -0,0 +1,270 @@
// Copyright (c) 2019 nyorain
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt
#ifndef INC_DLG_DLG_H_
#define INC_DLG_DLG_H_
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
// Hosted at https://github.com/nyorain/dlg.
// There are examples and documentation.
// Issue reports and contributions appreciated.
// - CONFIG -
// Define this macro to make all dlg macros have no effect at all
// #define DLG_DISABLE
// the log/assertion levels below which logs/assertions are ignored
// defaulted depending on the NDEBUG macro
#ifndef DLG_LOG_LEVEL
#ifdef NDEBUG
#define DLG_LOG_LEVEL dlg_level_warn
#else
#define DLG_LOG_LEVEL dlg_level_trace
#endif
#endif
#ifndef DLG_ASSERT_LEVEL
#ifdef NDEBUG
#define DLG_ASSERT_LEVEL dlg_level_warn
#else
#define DLG_ASSERT_LEVEL dlg_level_trace
#endif
#endif
// the assert level of dlg_assert
#ifndef DLG_DEFAULT_ASSERT
#define DLG_DEFAULT_ASSERT dlg_level_error
#endif
// evaluated to the 'file' member in dlg_origin
#ifndef DLG_FILE
#define DLG_FILE dlg__strip_root_path(__FILE__, DLG_BASE_PATH)
// the base path stripped from __FILE__. If you don't override DLG_FILE set this to
// the project root to make 'main.c' from '/some/bullshit/main.c'
#ifndef DLG_BASE_PATH
#define DLG_BASE_PATH ""
#endif
#endif
// Default tags applied to all logs/assertions (in the defining file).
// Must be in format ```#define DLG_DEFAULT_TAGS "tag1", "tag2"```
// or just nothing (as defaulted here)
#ifndef DLG_DEFAULT_TAGS
#define DLG_DEFAULT_TAGS_TERM NULL
#else
#define DLG_DEFAULT_TAGS_TERM DLG_DEFAULT_TAGS, NULL
#endif
// The function used for formatting. Can have any signature, but must be callable with
// the arguments the log/assertions macros are called with. Must return a const char*
// that will not be freed by dlg, the formatting function must keep track of it.
// The formatting function might use dlg_thread_buffer or a custom owned buffer.
// The returned const char* has to be valid until the dlg log/assertion ends.
// Usually a c function with ... (i.e. using va_list) or a variadic c++ template do
// allow formatting.
#ifndef DLG_FMT_FUNC
#define DLG_FMT_FUNC dlg__printf_format
#endif
// Only overwrite (i.e. predefine) this if you know what you are doing.
// On windows this is used to add the dllimport specified.
// If you are using the static version of dlg (on windows) define
// DLG_STATIC before including dlg.h
#ifndef DLG_API
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(DLG_STATIC)
#define DLG_API __declspec(dllimport)
#else
#define DLG_API
#endif
#endif
// - utility -
// two methods needed since cplusplus does not support compound literals
// and c does not support uniform initialization/initializer lists
#ifdef __cplusplus
#include <initializer_list>
#define DLG_CREATE_TAGS(...) std::initializer_list<const char*> \
{DLG_DEFAULT_TAGS_TERM, __VA_ARGS__, NULL}.begin()
#else
#define DLG_CREATE_TAGS(...) (const char* const[]) {DLG_DEFAULT_TAGS_TERM, __VA_ARGS__, NULL}
#endif
#ifdef __GNUC__
#define DLG_PRINTF_ATTRIB(a, b) __attribute__ ((format (printf, a, b)))
#else
#define DLG_PRINTF_ATTRIB(a, b)
#endif
#ifdef __cplusplus
extern "C" {
#endif
// Represents the importance of a log/assertion call.
enum dlg_level {
dlg_level_trace = 0, // temporary used debug, e.g. to check if control reaches function
dlg_level_debug, // general debugging, prints e.g. all major events
dlg_level_info, // general useful information
dlg_level_warn, // warning, something went wrong but might have no (really bad) side effect
dlg_level_error, // something really went wrong; expect serious issues
dlg_level_fatal // critical error; application is likely to crash/exit
};
// Holds various information associated with a log/assertion call.
// Forwarded to the output handler.
struct dlg_origin {
const char* file;
unsigned int line;
const char* func;
enum dlg_level level;
const char** tags; // null-terminated
const char* expr; // assertion expression, otherwise null
};
// Type of the output handler, see dlg_set_handler.
typedef void(*dlg_handler)(const struct dlg_origin* origin, const char* string, void* data);
#ifdef DLG_DISABLE
// Tagged/Untagged logging with variable level
// Tags must always be in the format `("tag1", "tag2")` (including brackets)
#define dlg_log(level, ...)
#define dlg_logt(level, tags, ...)
// Dynamic level assert macros in various versions for additional arguments
#define dlg_assertl(level, expr) // assert without tags/message
#define dlg_assertlt(level, tags, expr) // assert with tags
#define dlg_assertlm(level, expr, ...) // assert with message
#define dlg_assertltm(level, tags, expr, ...) // assert with tags & message
// Sets the handler that is responsible for formatting and outputting log calls.
// This function is not thread safe and the handler is set globally.
// The handler itself must not change dlg tags or call a dlg macro (if it
// does so, the provided string or tags array in 'origin' might get invalid).
// The handler can also be used for various other things such as dealing
// with failed assertions or filtering calls based on the passed tags.
// The default handler is dlg_default_output (see its doc for more info).
// If using c++ make sure the registered handler cannot throw e.g. by
// wrapping everything into a try-catch blog.
inline void dlg_set_handler(dlg_handler handler, void* data) {
(void) handler;
(void) data;
}
// Returns the currently active dlg handler and sets `data` to
// its user data pointer. `data` must not be NULL.
// Useful to create handler chains.
// This function is not threadsafe, i.e. retrieving the handler while
// changing it from another thread is unsafe.
// See `dlg_set_handler`.
inline dlg_handler dlg_get_handler(void** data) {
*data = NULL;
return NULL;
}
// The default output handler.
// Only use this to reset the output handler, prefer to use
// dlg_generic_output (from output.h) which this function simply calls.
// It also flushes the stream used and correctly outputs even from multiple threads.
inline void dlg_default_output(const struct dlg_origin* o, const char* str, void* data) {
(void) o;
(void) str;
(void) data;
}
// Adds the given tag associated with the given function to the thread specific list.
// If func is not NULL the tag will only applied to calls from the same function.
// Remove the tag again calling dlg_remove_tag (with exactly the same pointers!).
// Does not check if the tag is already present.
inline void dlg_add_tag(const char* tag, const char* func) {
(void) tag;
(void) func;
}
// Removes a tag added with dlg_add_tag (has no effect for tags no present).
// The pointers must be exactly the same pointers that were supplied to dlg_add_tag,
// this function will not check using strcmp. When the same tag/func combination
// is added multiple times, this function remove exactly one candidate, it is
// undefined which. Returns whether a tag was found (and removed).
inline bool dlg_remove_tag(const char* tag, const char* func) {
(void) tag;
(void) func;
return true;
}
// Returns the thread-specific buffer and its size for dlg.
// The buffer should only be used by formatting functions.
// The buffer can be reallocated and the size changed, just make sure
// to update both values correctly.
inline char** dlg_thread_buffer(size_t** size) {
(void) size;
return NULL;
}
#else // DLG_DISABLE
#define dlg_log(level, ...) if(level >= DLG_LOG_LEVEL) \
dlg__do_log(level, DLG_CREATE_TAGS(NULL), DLG_FILE, __LINE__, __func__, \
DLG_FMT_FUNC(__VA_ARGS__), NULL)
#define dlg_logt(level, tags, ...) if(level >= DLG_LOG_LEVEL) \
dlg__do_log(level, DLG_CREATE_TAGS tags, DLG_FILE, __LINE__, __func__, \
DLG_FMT_FUNC(__VA_ARGS__), NULL)
#define dlg_assertl(level, expr) if(level >= DLG_ASSERT_LEVEL && !(expr)) \
dlg__do_log(level, DLG_CREATE_TAGS(NULL), DLG_FILE, __LINE__, __func__, NULL, #expr)
#define dlg_assertlt(level, tags, expr) if(level >= DLG_ASSERT_LEVEL && !(expr)) \
dlg__do_log(level, DLG_CREATE_TAGS tags, DLG_FILE, __LINE__, __func__, NULL, #expr)
#define dlg_assertlm(level, expr, ...) if(level >= DLG_ASSERT_LEVEL && !(expr)) \
dlg__do_log(level, DLG_CREATE_TAGS(NULL), DLG_FILE, __LINE__, __func__, \
DLG_FMT_FUNC(__VA_ARGS__), #expr)
#define dlg_assertltm(level, tags, expr, ...) if(level >= DLG_ASSERT_LEVEL && !(expr)) \
dlg__do_log(level, DLG_CREATE_TAGS tags, DLG_FILE, __LINE__, \
__func__, DLG_FMT_FUNC(__VA_ARGS__), #expr)
DLG_API void dlg_set_handler(dlg_handler handler, void* data);
DLG_API dlg_handler dlg_get_handler(void** data);
DLG_API void dlg_default_output(const struct dlg_origin*, const char* string, void*);
DLG_API void dlg_add_tag(const char* tag, const char* func);
DLG_API bool dlg_remove_tag(const char* tag, const char* func);
DLG_API char** dlg_thread_buffer(size_t** size);
// - Private interface: not part of the abi/api but needed in macros -
// Formats the given format string and arguments as printf would, uses the thread buffer.
DLG_API const char* dlg__printf_format(const char* format, ...) DLG_PRINTF_ATTRIB(1, 2);
DLG_API void dlg__do_log(enum dlg_level lvl, const char* const*, const char*, int,
const char*, const char*, const char*);
DLG_API const char* dlg__strip_root_path(const char* file, const char* base);
#endif // DLG_DISABLE
// Untagged leveled logging
#define dlg_trace(...) dlg_log(dlg_level_trace, __VA_ARGS__)
#define dlg_debug(...) dlg_log(dlg_level_debug, __VA_ARGS__)
#define dlg_info(...) dlg_log(dlg_level_info, __VA_ARGS__)
#define dlg_warn(...) dlg_log(dlg_level_warn, __VA_ARGS__)
#define dlg_error(...) dlg_log(dlg_level_error, __VA_ARGS__)
#define dlg_fatal(...) dlg_log(dlg_level_fatal, __VA_ARGS__)
// Tagged leveled logging
#define dlg_tracet(tags, ...) dlg_logt(dlg_level_trace, tags, __VA_ARGS__)
#define dlg_debugt(tags, ...) dlg_logt(dlg_level_debug, tags, __VA_ARGS__)
#define dlg_infot(tags, ...) dlg_logt(dlg_level_info, tags, __VA_ARGS__)
#define dlg_warnt(tags, ...) dlg_logt(dlg_level_warn, tags, __VA_ARGS__)
#define dlg_errort(tags, ...) dlg_logt(dlg_level_error, tags, __VA_ARGS__)
#define dlg_fatalt(tags, ...) dlg_logt(dlg_level_fatal, tags, __VA_ARGS__)
// Assert macros useing DLG_DEFAULT_ASSERT as level
#define dlg_assert(expr) dlg_assertl(DLG_DEFAULT_ASSERT, expr)
#define dlg_assertt(tags, expr) dlg_assertlt(DLG_DEFAULT_ASSERT, tags, expr)
#define dlg_assertm(expr, ...) dlg_assertlm(DLG_DEFAULT_ASSERT, expr, __VA_ARGS__)
#define dlg_asserttm(tags, expr, ...) dlg_assertltm(DLG_DEFAULT_ASSERT, tags, expr, __VA_ARGS__)
#ifdef __cplusplus
}
#endif
#endif // header guard

View File

@ -0,0 +1,172 @@
// Copyright (c) 2019 nyorain
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt
#ifndef INC_DLG_OUTPUT_H_
#define INC_DLG_OUTPUT_H_
#include <dlg/dlg.h>
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
// Text style
enum dlg_text_style {
dlg_text_style_reset = 0,
dlg_text_style_bold = 1,
dlg_text_style_dim = 2,
dlg_text_style_italic = 3,
dlg_text_style_underline = 4,
dlg_text_style_blink = 5,
dlg_text_style_rblink = 6,
dlg_text_style_reversed = 7,
dlg_text_style_conceal = 8,
dlg_text_style_crossed = 9,
dlg_text_style_none,
};
// Text color
enum dlg_color {
dlg_color_black = 0,
dlg_color_red,
dlg_color_green,
dlg_color_yellow,
dlg_color_blue,
dlg_color_magenta,
dlg_color_cyan,
dlg_color_gray,
dlg_color_reset = 9,
dlg_color_black2 = 60,
dlg_color_red2,
dlg_color_green2,
dlg_color_yellow2,
dlg_color_blue2,
dlg_color_magenta2,
dlg_color_cyan2,
dlg_color_gray2,
dlg_color_none = 69,
};
struct dlg_style {
enum dlg_text_style style;
enum dlg_color fg;
enum dlg_color bg;
};
// Like fprintf but fixes utf-8 output to console on windows.
// On non-windows sytems just uses the corresponding standard library
// functions. On windows, if dlg was compiled with the win_console option,
// will first try to output it in a way that allows the default console
// to display utf-8. If that fails, will fall back to the standard
// library functions.
DLG_API int dlg_fprintf(FILE* stream, const char* format, ...) DLG_PRINTF_ATTRIB(2, 3);
DLG_API int dlg_vfprintf(FILE* stream, const char* format, va_list list);
// Like dlg_printf, but also applies the given style to this output.
// The style will always be applied (using escape sequences), independent of the given stream.
// On windows escape sequences don't work out of the box, see dlg_win_init_ansi().
DLG_API int dlg_styled_fprintf(FILE* stream, struct dlg_style style,
const char* format, ...) DLG_PRINTF_ATTRIB(3, 4);
// Features to output from the generic output handler.
// Some features might have only an effect in the specializations.
enum dlg_output_feature {
dlg_output_tags = 1, // output tags list
dlg_output_time = 2, // output time of log call (hour:minute:second)
dlg_output_style = 4, // whether to use the supplied styles
dlg_output_func = 8, // output function
dlg_output_file_line = 16, // output file:line,
dlg_output_newline = 32, // output a newline at the end
dlg_output_threadsafe = 64, // locks stream before printing
dlg_output_time_msecs = 128 // output micro seconds (ms on windows)
};
// The default level-dependent output styles. The array values represent the styles
// to be used for the associated level (i.e. [0] for trace level).
DLG_API extern const struct dlg_style dlg_default_output_styles[6];
// Generic output function. Used by the default output handler and might be useful
// for custom output handlers (that don't want to manually format the output).
// Will call the given output func with the given data (and format + args to print)
// for everything it has to print in printf format.
// See also the *_stream and *_buf specializations for common usage.
// The given output function must not be NULL.
typedef void(*dlg_generic_output_handler)(void* data, const char* format, ...);
DLG_API void dlg_generic_output(dlg_generic_output_handler output, void* data,
unsigned int features, const struct dlg_origin* origin, const char* string,
const struct dlg_style styles[6]);
// Generic output function, using a format string instead of feature flags.
// Use following conversion characters:
// %h - output the time in H:M:S format
// %m - output the time in milliseconds
// %t - output the full list of tags, comma separated
// %f - output the function name noted in the origin
// %o - output the file:line of the origin
// %s - print the appropriate style escape sequence.
// %r - print the escape sequence to reset the style.
// %c - The content of the log/assert
// %% - print the '%' character
// Only the above specified conversion characters are valid, the rest are
// written as it is.
DLG_API void dlg_generic_outputf(dlg_generic_output_handler output, void* data,
const char* format_string, const struct dlg_origin* origin,
const char* string, const struct dlg_style styles[6]);
// Generic output function. Used by the default output handler and might be useful
// for custom output handlers (that don't want to manually format the output).
// If stream is NULL uses stdout.
// Automatically uses dlg_fprintf to assure correct utf-8 even on windows consoles.
// Locks the stream (i.e. assures threadsafe access) when the associated feature
// is passed (note that stdout/stderr might still mix from multiple threads).
DLG_API void dlg_generic_output_stream(FILE* stream, unsigned int features,
const struct dlg_origin* origin, const char* string,
const struct dlg_style styles[6]);
DLG_API void dlg_generic_outputf_stream(FILE* stream, const char* format_string,
const struct dlg_origin* origin, const char* string,
const struct dlg_style styles[6], bool lock_stream);
// Generic output function (see dlg_generic_output) that uses a buffer instead of
// a stream. buf must at least point to *size bytes. Will set *size to the number
// of bytes written (capped to the given size), if buf == NULL will set *size
// to the needed size. The size parameter must not be NULL.
DLG_API void dlg_generic_output_buf(char* buf, size_t* size, unsigned int features,
const struct dlg_origin* origin, const char* string,
const struct dlg_style styles[6]);
DLG_API void dlg_generic_outputf_buf(char* buf, size_t* size, const char* format_string,
const struct dlg_origin* origin, const char* string,
const struct dlg_style styles[6]);
// Returns if the given stream is a tty. Useful for custom output handlers
// e.g. to determine whether to use color.
// NOTE: Due to windows limitations currently returns false for wsl ttys.
DLG_API bool dlg_is_tty(FILE* stream);
// Returns the null-terminated escape sequence for the given style into buf.
// Undefined behvaiour if any member of style has a value outside its enum range (will
// probably result in a buffer overflow or garbage being printed).
// If all member of style are 'none' will simply nullterminate the first buf char.
DLG_API void dlg_escape_sequence(struct dlg_style style, char buf[12]);
// The reset style escape sequence.
DLG_API extern const char* const dlg_reset_sequence;
// Just returns true without other effect on non-windows systems or if dlg
// was compiled without the win_console option.
// On windows tries to set the console mode to ansi to make escape sequences work.
// This works only on newer windows 10 versions. Returns false on error.
// Only the first call to it will have an effect, following calls just return the result.
// The function is threadsafe. Automatically called by the default output handler.
// This will only be able to set the mode for the stdout and stderr consoles, so
// other streams to consoles will still not work.
DLG_API bool dlg_win_init_ansi(void);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // header guard

View File

@ -4,7 +4,7 @@
*
* ANSI-specific configuration file (specification only).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Build macros of the FreeType 2 library.
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* User-selectable configuration macros (specification only).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -461,9 +461,9 @@ FT_BEGIN_HEADER
* while compiling in 'release' mode):
*
* ```
* _af_debug_disable_horz_hints
* _af_debug_disable_vert_hints
* _af_debug_disable_blue_hints
* af_debug_disable_horz_hints_
* af_debug_disable_vert_hints_
* af_debug_disable_blue_hints_
* ```
*
* Additionally, the following functions provide dumps of various
@ -480,7 +480,7 @@ FT_BEGIN_HEADER
* As an argument, they use another global variable:
*
* ```
* _af_debug_hints
* af_debug_hints_
* ```
*
* Please have a look at the `ftgrid` demo program to see how those
@ -584,12 +584,12 @@ FT_BEGIN_HEADER
/**************************************************************************
*
* Define `TT_CONFIG_OPTION_POSTSCRIPT_NAMES` if you want to be able to
* load and enumerate the glyph Postscript names in a TrueType or OpenType
* load and enumerate Postscript names of glyphs in a TrueType or OpenType
* file.
*
* Note that when you do not compile the 'psnames' module by undefining the
* above `FT_CONFIG_OPTION_POSTSCRIPT_NAMES`, the 'sfnt' module will
* contain additional code used to read the PS Names table from a font.
* Note that if you do not compile the 'psnames' module by undefining the
* above `FT_CONFIG_OPTION_POSTSCRIPT_NAMES` macro, the 'sfnt' module will
* contain additional code to read the PostScript name table from a font.
*
* (By default, the module uses 'psnames' to extract glyph names.)
*/
@ -739,6 +739,24 @@ FT_BEGIN_HEADER
#define TT_CONFIG_OPTION_GX_VAR_SUPPORT
/**************************************************************************
*
* Define `TT_CONFIG_OPTION_NO_BORING_EXPANSION` if you want to exclude
* support for 'boring' OpenType specification expansions.
*
* https://github.com/harfbuzz/boring-expansion-spec
*
* Right now, the following features are covered:
*
* - 'avar' version 2.0
*
* Most likely, this is a temporary configuration option to be removed in
* the near future, since it is assumed that eventually those features are
* added to the OpenType standard.
*/
/* #define TT_CONFIG_OPTION_NO_BORING_EXPANSION */
/**************************************************************************
*
* Define `TT_CONFIG_OPTION_BDF` if you want to include support for an

View File

@ -5,7 +5,7 @@
* ANSI-specific library and header configuration file (specification
* only).
*
* Copyright (C) 2002-2022 by
* Copyright (C) 2002-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType integer types definitions.
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Mac/OS X support configuration header.
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Define a set of compiler macros used in public FreeType headers.
*
* Copyright (C) 2020-2022 by
* Copyright (C) 2020-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType high-level API and common types (specification only).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -215,7 +215,6 @@ FT_BEGIN_HEADER
* FT_Get_Char_Index
* FT_Get_First_Char
* FT_Get_Next_Char
* FT_Get_Name_Index
* FT_Load_Char
*
* FT_OPEN_MEMORY
@ -254,14 +253,15 @@ FT_BEGIN_HEADER
* FT_Get_Kerning
* FT_Kerning_Mode
* FT_Get_Track_Kerning
* FT_Get_Glyph_Name
* FT_Get_Postscript_Name
*
* FT_CharMapRec
* FT_Select_Charmap
* FT_Set_Charmap
* FT_Get_Charmap_Index
*
* FT_Get_Name_Index
* FT_Get_Glyph_Name
* FT_Get_Postscript_Name
* FT_Get_FSType_Flags
* FT_Get_SubGlyph_Info
*
@ -646,7 +646,7 @@ FT_BEGIN_HEADER
*
* @note:
* Despite the name, this enumeration lists specific character
* repertories (i.e., charsets), and not text encoding methods (e.g.,
* repertoires (i.e., charsets), and not text encoding methods (e.g.,
* UTF-8, UTF-16, etc.).
*
* Other encodings might be defined in the future.
@ -779,7 +779,7 @@ FT_BEGIN_HEADER
* `encoding_id`. If, for example, `encoding_id` is `TT_MAC_ID_ROMAN`
* and the language ID (minus~1) is `TT_MAC_LANGID_GREEK`, it is the
* Greek encoding, not Roman. `TT_MAC_ID_ARABIC` with
* `TT_MAC_LANGID_FARSI` means the Farsi variant the Arabic encoding.
* `TT_MAC_LANGID_FARSI` means the Farsi variant of the Arabic encoding.
*/
typedef enum FT_Encoding_
{
@ -1167,9 +1167,9 @@ FT_BEGIN_HEADER
* FT_FACE_FLAG_KERNING ::
* The face contains kerning information. If set, the kerning distance
* can be retrieved using the function @FT_Get_Kerning. Otherwise the
* function always return the vector (0,0). Note that FreeType doesn't
* handle kerning data from the SFNT 'GPOS' table (as present in many
* OpenType fonts).
* function always returns the vector (0,0). Note that FreeType
* doesn't handle kerning data from the SFNT 'GPOS' table (as present
* in many OpenType fonts).
*
* FT_FACE_FLAG_FAST_GLYPHS ::
* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.
@ -1892,13 +1892,13 @@ FT_BEGIN_HEADER
* The advance width of the unhinted glyph. Its value is expressed in
* 16.16 fractional pixels, unless @FT_LOAD_LINEAR_DESIGN is set when
* loading the glyph. This field can be important to perform correct
* WYSIWYG layout. Only relevant for outline glyphs.
* WYSIWYG layout. Only relevant for scalable glyphs.
*
* linearVertAdvance ::
* The advance height of the unhinted glyph. Its value is expressed in
* 16.16 fractional pixels, unless @FT_LOAD_LINEAR_DESIGN is set when
* loading the glyph. This field can be important to perform correct
* WYSIWYG layout. Only relevant for outline glyphs.
* WYSIWYG layout. Only relevant for scalable glyphs.
*
* advance ::
* This shorthand is, depending on @FT_LOAD_IGNORE_TRANSFORM, the
@ -2593,8 +2593,8 @@ FT_BEGIN_HEADER
* stream attachments.
*/
FT_EXPORT( FT_Error )
FT_Attach_Stream( FT_Face face,
FT_Open_Args* parameters );
FT_Attach_Stream( FT_Face face,
const FT_Open_Args* parameters );
/**************************************************************************
@ -3077,7 +3077,7 @@ FT_BEGIN_HEADER
*
* FT_LOAD_NO_HINTING ::
* Disable hinting. This generally generates 'blurrier' bitmap glyphs
* when the glyph are rendered in any of the anti-aliased modes. See
* when the glyphs are rendered in any of the anti-aliased modes. See
* also the note below.
*
* This flag is implied by @FT_LOAD_NO_SCALE.
@ -3434,7 +3434,7 @@ FT_BEGIN_HEADER
* are not interested in the value.
*
* delta ::
* A pointer a translation vector. Set this to NULL if you are not
* A pointer to a translation vector. Set this to NULL if you are not
* interested in the value.
*
* @since:
@ -3559,9 +3559,10 @@ FT_BEGIN_HEADER
*
* 2. The `sdf` rasterizer has limited support for handling intersecting
* contours and *cannot* handle self-intersecting contours whatsoever.
* Self-intersection happens when a single connected contour intersect
* itself at some point; having these in your font definitely pose a
* problem to the rasterizer and cause artifacts, too.
* Self-intersection happens when a single connected contour
* intersects itself at some point; having these in your font
* definitely poses a problem to the rasterizer and cause artifacts,
* too.
*
* 3. Generating SDF for really small glyphs may result in undesirable
* output; the pixel grid (which stores distance information) becomes
@ -3840,89 +3841,6 @@ FT_BEGIN_HEADER
FT_Fixed* akerning );
/**************************************************************************
*
* @function:
* FT_Get_Glyph_Name
*
* @description:
* Retrieve the ASCII name of a given glyph in a face. This only works
* for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1.
*
* @input:
* face ::
* A handle to a source face object.
*
* glyph_index ::
* The glyph index.
*
* buffer_max ::
* The maximum number of bytes available in the buffer.
*
* @output:
* buffer ::
* A pointer to a target buffer where the name is copied to.
*
* @return:
* FreeType error code. 0~means success.
*
* @note:
* An error is returned if the face doesn't provide glyph names or if the
* glyph index is invalid. In all cases of failure, the first byte of
* `buffer` is set to~0 to indicate an empty name.
*
* The glyph name is truncated to fit within the buffer if it is too
* long. The returned string is always zero-terminated.
*
* Be aware that FreeType reorders glyph indices internally so that glyph
* index~0 always corresponds to the 'missing glyph' (called '.notdef').
*
* This function always returns an error if the config macro
* `FT_CONFIG_OPTION_NO_GLYPH_NAMES` is not defined in `ftoption.h`.
*/
FT_EXPORT( FT_Error )
FT_Get_Glyph_Name( FT_Face face,
FT_UInt glyph_index,
FT_Pointer buffer,
FT_UInt buffer_max );
/**************************************************************************
*
* @function:
* FT_Get_Postscript_Name
*
* @description:
* Retrieve the ASCII PostScript name of a given face, if available.
* This only works with PostScript, TrueType, and OpenType fonts.
*
* @input:
* face ::
* A handle to the source face object.
*
* @return:
* A pointer to the face's PostScript name. `NULL` if unavailable.
*
* @note:
* The returned pointer is owned by the face and is destroyed with it.
*
* For variation fonts, this string changes if you select a different
* instance, and you have to call `FT_Get_PostScript_Name` again to
* retrieve it. FreeType follows Adobe TechNote #5902, 'Generating
* PostScript Names for Fonts Using OpenType Font Variations'.
*
* https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html
*
* [Since 2.9] Special PostScript names for named instances are only
* returned if the named instance is set with @FT_Set_Named_Instance (and
* the font has corresponding entries in its 'fvar' table). If
* @FT_IS_VARIATION returns true, the algorithmically derived PostScript
* name is provided, not looking up special entries for named instances.
*/
FT_EXPORT( const char* )
FT_Get_Postscript_Name( FT_Face face );
/**************************************************************************
*
* @function:
@ -4243,7 +4161,8 @@ FT_BEGIN_HEADER
* FT_Get_Name_Index
*
* @description:
* Return the glyph index of a given glyph name.
* Return the glyph index of a given glyph name. This only works
* for those faces where @FT_HAS_GLYPH_NAMES returns true.
*
* @input:
* face ::
@ -4254,12 +4173,107 @@ FT_BEGIN_HEADER
*
* @return:
* The glyph index. 0~means 'undefined character code'.
*
* @note:
* Acceptable glyph names might come from the [Adobe Glyph
* List](https://github.com/adobe-type-tools/agl-aglfn). See
* @FT_Get_Glyph_Name for the inverse functionality.
*
* This function has limited capabilities if the config macro
* `FT_CONFIG_OPTION_POSTSCRIPT_NAMES` is not defined in `ftoption.h`:
* It then works only for fonts that actually embed glyph names (which
* many recent OpenType fonts do not).
*/
FT_EXPORT( FT_UInt )
FT_Get_Name_Index( FT_Face face,
const FT_String* glyph_name );
/**************************************************************************
*
* @function:
* FT_Get_Glyph_Name
*
* @description:
* Retrieve the ASCII name of a given glyph in a face. This only works
* for those faces where @FT_HAS_GLYPH_NAMES returns true.
*
* @input:
* face ::
* A handle to a source face object.
*
* glyph_index ::
* The glyph index.
*
* buffer_max ::
* The maximum number of bytes available in the buffer.
*
* @output:
* buffer ::
* A pointer to a target buffer where the name is copied to.
*
* @return:
* FreeType error code. 0~means success.
*
* @note:
* An error is returned if the face doesn't provide glyph names or if the
* glyph index is invalid. In all cases of failure, the first byte of
* `buffer` is set to~0 to indicate an empty name.
*
* The glyph name is truncated to fit within the buffer if it is too
* long. The returned string is always zero-terminated.
*
* Be aware that FreeType reorders glyph indices internally so that glyph
* index~0 always corresponds to the 'missing glyph' (called '.notdef').
*
* This function has limited capabilities if the config macro
* `FT_CONFIG_OPTION_POSTSCRIPT_NAMES` is not defined in `ftoption.h`:
* It then works only for fonts that actually embed glyph names (which
* many recent OpenType fonts do not).
*/
FT_EXPORT( FT_Error )
FT_Get_Glyph_Name( FT_Face face,
FT_UInt glyph_index,
FT_Pointer buffer,
FT_UInt buffer_max );
/**************************************************************************
*
* @function:
* FT_Get_Postscript_Name
*
* @description:
* Retrieve the ASCII PostScript name of a given face, if available.
* This only works with PostScript, TrueType, and OpenType fonts.
*
* @input:
* face ::
* A handle to the source face object.
*
* @return:
* A pointer to the face's PostScript name. `NULL` if unavailable.
*
* @note:
* The returned pointer is owned by the face and is destroyed with it.
*
* For variation fonts, this string changes if you select a different
* instance, and you have to call `FT_Get_PostScript_Name` again to
* retrieve it. FreeType follows Adobe TechNote #5902, 'Generating
* PostScript Names for Fonts Using OpenType Font Variations'.
*
* https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html
*
* [Since 2.9] Special PostScript names for named instances are only
* returned if the named instance is set with @FT_Set_Named_Instance (and
* the font has corresponding entries in its 'fvar' table). If
* @FT_IS_VARIATION returns true, the algorithmically derived PostScript
* name is provided, not looking up special entries for named instances.
*/
FT_EXPORT( const char* )
FT_Get_Postscript_Name( FT_Face face );
/**************************************************************************
*
* @enum:
@ -4346,13 +4360,6 @@ FT_BEGIN_HEADER
FT_Matrix *p_transform );
/**************************************************************************
*
* @section:
* base_interface
*
*/
/**************************************************************************
*
* @enum:
@ -4688,7 +4695,8 @@ FT_BEGIN_HEADER
*
* @description:
* This section contains various functions used to perform computations
* on 16.16 fixed-float numbers or 2d vectors.
* on 16.16 fixed-point numbers or 2D vectors. FreeType does not use
* floating-point data types.
*
* **Attention**: Most arithmetic functions take `FT_Long` as arguments.
* For historical reasons, FreeType was designed under the assumption
@ -4941,8 +4949,8 @@ FT_BEGIN_HEADER
*
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 12
#define FREETYPE_PATCH 1
#define FREETYPE_MINOR 13
#define FREETYPE_PATCH 0
/**************************************************************************

View File

@ -4,7 +4,7 @@
*
* Quick computation of advance widths (specification only).
*
* Copyright (C) 2008-2022 by
* Copyright (C) 2008-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType exact bbox computation (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType API for accessing BDF-specific strings (specification).
*
* Copyright (C) 2002-2022 by
* Copyright (C) 2002-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType utility functions for bitmaps (specification).
*
* Copyright (C) 2004-2022 by
* Copyright (C) 2004-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Bzip2-compressed stream support.
*
* Copyright (C) 2010-2022 by
* Copyright (C) 2010-2023 by
* Joel Klinghed.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType Cache subsystem (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -424,7 +424,7 @@ FT_BEGIN_HEADER
* pixel ::
* A Boolean. If 1, the `width` and `height` fields are interpreted as
* integer pixel character sizes. Otherwise, they are expressed as
* 1/64th of points.
* 1/64 of points.
*
* x_res ::
* Only used when `pixel` is value~0 to indicate the horizontal

View File

@ -4,7 +4,7 @@
*
* FreeType API for accessing CID font information (specification).
*
* Copyright (C) 2007-2022 by
* Copyright (C) 2007-2023 by
* Dereg Clegg and Michael Toftdal.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType's glyph color management (specification).
*
* Copyright (C) 2018-2022 by
* Copyright (C) 2018-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -456,6 +456,9 @@ FT_BEGIN_HEADER
* &iterator ) );
* }
* ```
*
* @since:
* 2.10
*/
FT_EXPORT( FT_Bool )
FT_Get_Color_Glyph_Layer( FT_Face face,
@ -475,7 +478,7 @@ FT_BEGIN_HEADER
* extensions to the 'COLR' table, see
* 'https://github.com/googlefonts/colr-gradients-spec'.
*
* The enumeration values losely correspond with the format numbers of
* The enumeration values loosely correspond with the format numbers of
* the specification: FreeType always returns a fully specified 'Paint'
* structure for the 'Transform', 'Translate', 'Scale', 'Rotate', and
* 'Skew' table types even though the specification has different formats
@ -489,9 +492,7 @@ FT_BEGIN_HEADER
* structures.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef enum FT_PaintFormat_
{
@ -521,9 +522,10 @@ FT_BEGIN_HEADER
*
* @description:
* This iterator object is needed for @FT_Get_Colorline_Stops. It keeps
* state while iterating over the stops of an @FT_ColorLine,
* representing the `ColorLine` struct of the v1 extensions to 'COLR',
* see 'https://github.com/googlefonts/colr-gradients-spec'.
* state while iterating over the stops of an @FT_ColorLine, representing
* the `ColorLine` struct of the v1 extensions to 'COLR', see
* 'https://github.com/googlefonts/colr-gradients-spec'. Do not manually
* modify fields of this iterator.
*
* @fields:
* num_color_stops ::
@ -537,10 +539,12 @@ FT_BEGIN_HEADER
* An opaque pointer into 'COLR' table data. Set by @FT_Get_Paint.
* Updated by @FT_Get_Colorline_Stops.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
* read_variable ::
* A boolean keeping track of whether variable color lines are to be
* read. Set by @FT_Get_Paint.
*
* @since:
* 2.13
*/
typedef struct FT_ColorStopIterator_
{
@ -549,6 +553,8 @@ FT_BEGIN_HEADER
FT_Byte* p;
FT_Bool read_variable;
} FT_ColorStopIterator;
@ -569,9 +575,7 @@ FT_BEGIN_HEADER
* Alpha transparency value multiplied with the value from 'CPAL'.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_ColorIndex_
{
@ -592,19 +596,18 @@ FT_BEGIN_HEADER
*
* @fields:
* stop_offset ::
* The stop offset between 0 and 1 along the gradient.
* The stop offset along the gradient, expressed as a 16.16 fixed-point
* coordinate.
*
* color ::
* The color information for this stop, see @FT_ColorIndex.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_ColorStop_
{
FT_F2Dot14 stop_offset;
FT_Fixed stop_offset;
FT_ColorIndex color;
} FT_ColorStop;
@ -621,9 +624,7 @@ FT_BEGIN_HEADER
* It describes how the gradient fill continues at the other boundaries.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef enum FT_PaintExtend_
{
@ -653,9 +654,7 @@ FT_BEGIN_HEADER
* actual @FT_ColorStop's.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_ColorLine_
{
@ -699,9 +698,7 @@ FT_BEGIN_HEADER
* y translation.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_Affine_23_
{
@ -722,9 +719,7 @@ FT_BEGIN_HEADER
* 'https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators'.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef enum FT_Composite_Mode_
{
@ -786,9 +781,7 @@ FT_BEGIN_HEADER
* to be provided. Do not set this value.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_Opaque_Paint_
{
@ -815,9 +808,7 @@ FT_BEGIN_HEADER
* The layer iterator that describes the layers of this paint.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintColrLayers_
{
@ -842,9 +833,7 @@ FT_BEGIN_HEADER
* The color information for this solid paint, see @FT_ColorIndex.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintSolid_
{
@ -883,9 +872,7 @@ FT_BEGIN_HEADER
* Otherwise equal to~p0.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintLinearGradient_
{
@ -908,8 +895,7 @@ FT_BEGIN_HEADER
* A structure representing a `PaintRadialGradient` value of the 'COLR'
* v1 extensions, see
* 'https://github.com/googlefonts/colr-gradients-spec'. The glyph
* layer filled with this paint is drawn filled filled with a radial
* gradient.
* layer filled with this paint is drawn filled with a radial gradient.
*
* @fields:
* colorline ::
@ -933,9 +919,7 @@ FT_BEGIN_HEADER
* units represented as a 16.16 fixed-point value.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintRadialGradient_
{
@ -983,9 +967,7 @@ FT_BEGIN_HEADER
* given counter-clockwise, starting from the (positive) y~axis.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintSweepGradient_
{
@ -1016,9 +998,7 @@ FT_BEGIN_HEADER
* information that is filled with paint.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintGlyph_
{
@ -1042,9 +1022,7 @@ FT_BEGIN_HEADER
* this paint.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintColrGlyph_
{
@ -1070,9 +1048,7 @@ FT_BEGIN_HEADER
* 16.16 fixed-point values.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintTransform_
{
@ -1105,9 +1081,7 @@ FT_BEGIN_HEADER
* 16.16 fixed-point value.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintTranslate_
{
@ -1156,9 +1130,7 @@ FT_BEGIN_HEADER
* 16.16 fixed-point value.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward-compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintScale_
{
@ -1194,16 +1166,14 @@ FT_BEGIN_HEADER
*
* center_x ::
* The x~coordinate of the pivot point of the rotation in font
* units) represented as a 16.16 fixed-point value.
* units represented as a 16.16 fixed-point value.
*
* center_y ::
* The y~coordinate of the pivot point of the rotation in font
* units represented as a 16.16 fixed-point value.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintRotate_
@ -1252,9 +1222,7 @@ FT_BEGIN_HEADER
* represented as a 16.16 fixed-point value.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintSkew_
{
@ -1275,9 +1243,8 @@ FT_BEGIN_HEADER
* FT_PaintComposite
*
* @description:
* A structure representing a 'COLR'v1 `PaintComposite` paint table.
* Used for compositing two paints in a 'COLR' v1 directed acycling
* graph.
* A structure representing a 'COLR' v1 `PaintComposite` paint table.
* Used for compositing two paints in a 'COLR' v1 directed acyclic graph.
*
* @fields:
* source_paint ::
@ -1293,9 +1260,7 @@ FT_BEGIN_HEADER
* `source_paint` is composited onto.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_PaintComposite_
{
@ -1339,9 +1304,7 @@ FT_BEGIN_HEADER
* * @FT_PaintColrGlyph
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_COLR_Paint_
{
@ -1386,9 +1349,7 @@ FT_BEGIN_HEADER
* Do not output an initial root transform.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef enum FT_Color_Root_Transform_
{
@ -1429,9 +1390,7 @@ FT_BEGIN_HEADER
* fixed-point coordinates in 26.6 format.
*
* @since:
* 2.12 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
typedef struct FT_ClipBox_
{
@ -1524,9 +1483,7 @@ FT_BEGIN_HEADER
* error, value~0 is returned also.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
FT_EXPORT( FT_Bool )
FT_Get_Color_Glyph_Paint( FT_Face face,
@ -1568,9 +1525,7 @@ FT_BEGIN_HEADER
* and remove transforms configured using @FT_Set_Transform.
*
* @since:
* 2.12 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
FT_EXPORT( FT_Bool )
FT_Get_Color_Glyph_ClipBox( FT_Face face,
@ -1617,9 +1572,7 @@ FT_BEGIN_HEADER
* object can not be retrieved or any other error occurs.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
FT_EXPORT( FT_Bool )
FT_Get_Paint_Layers( FT_Face face,
@ -1660,9 +1613,7 @@ FT_BEGIN_HEADER
* also.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
FT_EXPORT( FT_Bool )
FT_Get_Colorline_Stops( FT_Face face,
@ -1698,9 +1649,7 @@ FT_BEGIN_HEADER
* this paint or any other error occured.
*
* @since:
* 2.11 -- **currently experimental only!** There might be changes
* without retaining backward compatibility of both the API and ABI.
*
* 2.13
*/
FT_EXPORT( FT_Bool )
FT_Get_Paint( FT_Face face,

View File

@ -4,7 +4,7 @@
*
* FreeType API for controlling driver modules (specification only).
*
* Copyright (C) 2017-2022 by
* Copyright (C) 2017-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -820,7 +820,6 @@ FT_BEGIN_HEADER
* 2.5
*/
/**************************************************************************
*
* @property:

View File

@ -4,7 +4,7 @@
*
* FreeType error codes (specification).
*
* Copyright (C) 2002-2022 by
* Copyright (C) 2002-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType error code handling (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -29,7 +29,7 @@
*
* @description:
* The header file `fterrors.h` (which is automatically included by
* `freetype.h` defines the handling of FreeType's enumeration
* `freetype.h`) defines the handling of FreeType's enumeration
* constants. It can also be used to generate error message strings
* with a small macro trick explained below.
*

View File

@ -4,7 +4,7 @@
*
* Support functions for font formats.
*
* Copyright (C) 2002-2022 by
* Copyright (C) 2002-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Access of TrueType's 'gasp' table (specification).
*
* Copyright (C) 2007-2022 by
* Copyright (C) 2007-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType convenience functions to handle glyphs (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -355,7 +355,7 @@ FT_BEGIN_HEADER
*
* @output:
* aglyph ::
* A handle to the glyph object.
* A handle to the glyph object. `NULL` in case of error.
*
* @return:
* FreeType error code. 0~means success.
@ -385,7 +385,7 @@ FT_BEGIN_HEADER
*
* @output:
* target ::
* A handle to the target glyph object. 0~in case of error.
* A handle to the target glyph object. `NULL` in case of error.
*
* @return:
* FreeType error code. 0~means success.
@ -413,7 +413,7 @@ FT_BEGIN_HEADER
*
* delta ::
* A pointer to a 2d vector to apply. Coordinates are expressed in
* 1/64th of a pixel.
* 1/64 of a pixel.
*
* @return:
* FreeType error code (if not 0, the glyph format is not scalable).
@ -500,7 +500,7 @@ FT_BEGIN_HEADER
* @output:
* acbox ::
* The glyph coordinate bounding box. Coordinates are expressed in
* 1/64th of pixels if it is grid-fitted.
* 1/64 of pixels if it is grid-fitted.
*
* @note:
* Coordinates are relative to the glyph origin, using the y~upwards
@ -671,7 +671,7 @@ FT_BEGIN_HEADER
*
* @input:
* glyph ::
* A handle to the target glyph object.
* A handle to the target glyph object. Can be `NULL`.
*/
FT_EXPORT( void )
FT_Done_Glyph( FT_Glyph glyph );

View File

@ -4,7 +4,7 @@
*
* FreeType API for validating TrueTypeGX/AAT tables (specification).
*
* Copyright (C) 2004-2022 by
* Copyright (C) 2004-2023 by
* Masatake YAMATO, Redhat K.K,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*

View File

@ -4,7 +4,7 @@
*
* Gzip-compressed stream support.
*
* Copyright (C) 2002-2022 by
* Copyright (C) 2002-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -5,7 +5,7 @@
* FreeType glyph image formats and default raster interface
* (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType incremental loading (specification).
*
* Copyright (C) 2002-2022 by
* Copyright (C) 2002-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -5,7 +5,7 @@
* FreeType API for color filtering of subpixel bitmap glyphs
* (specification).
*
* Copyright (C) 2006-2022 by
* Copyright (C) 2006-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -137,11 +137,11 @@ FT_BEGIN_HEADER
*
* FT_LCD_FILTER_DEFAULT ::
* This is a beveled, normalized, and color-balanced five-tap filter
* with weights of [0x08 0x4D 0x56 0x4D 0x08] in 1/256th units.
* with weights of [0x08 0x4D 0x56 0x4D 0x08] in 1/256 units.
*
* FT_LCD_FILTER_LIGHT ::
* this is a boxy, normalized, and color-balanced three-tap filter with
* weights of [0x00 0x55 0x56 0x55 0x00] in 1/256th units.
* weights of [0x00 0x55 0x56 0x55 0x00] in 1/256 units.
*
* FT_LCD_FILTER_LEGACY ::
* FT_LCD_FILTER_LEGACY1 ::
@ -226,7 +226,7 @@ FT_BEGIN_HEADER
*
* weights ::
* A pointer to an array; the function copies the first five bytes and
* uses them to specify the filter weights in 1/256th units.
* uses them to specify the filter weights in 1/256 units.
*
* @return:
* FreeType error code. 0~means success.

View File

@ -4,7 +4,7 @@
*
* Generic list support for FreeType (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Additional debugging APIs.
*
* Copyright (C) 2020-2022 by
* Copyright (C) 2020-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* LZW-compressed stream support.
*
* Copyright (C) 2004-2022 by
* Copyright (C) 2004-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Additional Mac-specific API.
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType Multiple Master font interface (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -398,6 +398,10 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success.
*
* @note:
* The design coordinates are 16.16 fractional values for TrueType GX and
* OpenType variation fonts. For Adobe MM fonts, the values are
* integers.
*
* [Since 2.8.1] To reset all axes to the default values, call the
* function with `num_coords` set to zero and `coords` set to `NULL`.
* [Since 2.9] 'Default values' means the currently selected named
@ -440,6 +444,11 @@ FT_BEGIN_HEADER
* @return:
* FreeType error code. 0~means success.
*
* @note:
* The design coordinates are 16.16 fractional values for TrueType GX and
* OpenType variation fonts. For Adobe MM fonts, the values are
* integers.
*
* @since:
* 2.7.1
*/
@ -471,9 +480,9 @@ FT_BEGIN_HEADER
* the number of axes, use default values for the remaining axes.
*
* coords ::
* The design coordinates array (each element must be between 0 and 1.0
* for Adobe MM fonts, and between -1.0 and 1.0 for TrueType GX and
* OpenType variation fonts).
* The design coordinates array. Each element is a 16.16 fractional
* value and must be between 0 and 1.0 for Adobe MM fonts, and between
* -1.0 and 1.0 for TrueType GX and OpenType variation fonts.
*
* @return:
* FreeType error code. 0~means success.
@ -518,7 +527,7 @@ FT_BEGIN_HEADER
*
* @output:
* coords ::
* The normalized blend coordinates array.
* The normalized blend coordinates array (as 16.16 fractional values).
*
* @return:
* FreeType error code. 0~means success.

View File

@ -4,7 +4,7 @@
*
* FreeType modules public interface (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType module error offsets (specification).
*
* Copyright (C) 2001-2022 by
* Copyright (C) 2001-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType API for validating OpenType tables (specification).
*
* Copyright (C) 2004-2022 by
* Copyright (C) 2004-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -5,7 +5,7 @@
* Support for the FT_Outline type used to store glyph shapes of
* most scalable font formats (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType API for possible FT_Parameter tags (specification only).
*
* Copyright (C) 2017-2022 by
* Copyright (C) 2017-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType API for accessing PFR-specific data (specification only).
*
* Copyright (C) 2002-2022 by
* Copyright (C) 2002-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -161,7 +161,7 @@ FT_BEGIN_HEADER
*
* @note:
* You can use the `x_scale` or `y_scale` results of @FT_Get_PFR_Metrics
* to convert the advance to device subpixels (i.e., 1/64th of pixels).
* to convert the advance to device subpixels (i.e., 1/64 of pixels).
*/
FT_EXPORT( FT_Error )
FT_Get_PFR_Advance( FT_Face face,

View File

@ -4,7 +4,7 @@
*
* FreeType renderer modules public interface (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType size objects management (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -7,7 +7,7 @@
*
* This is _not_ used to retrieve glyph names!
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType path stroker (specification).
*
* Copyright (C) 2002-2022 by
* Copyright (C) 2002-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -293,7 +293,7 @@ FT_BEGIN_HEADER
*
* miter_limit ::
* The maximum reciprocal sine of half-angle at the miter join,
* expressed as 16.16 fixed point value.
* expressed as 16.16 fixed-point value.
*
* @note:
* The `radius` is expressed in the same units as the outline

View File

@ -5,7 +5,7 @@
* FreeType synthesizing code for emboldening and slanting
* (specification).
*
* Copyright (C) 2000-2022 by
* Copyright (C) 2000-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -68,10 +68,19 @@ FT_BEGIN_HEADER
FT_EXPORT( void )
FT_GlyphSlot_Embolden( FT_GlyphSlot slot );
/* Slant an outline glyph to the right by about 12 degrees. */
/* Slant an outline glyph to the right by about 12 degrees. */
FT_EXPORT( void )
FT_GlyphSlot_Oblique( FT_GlyphSlot slot );
/* Slant an outline glyph by a given sine of an angle. You can apply */
/* slant along either x- or y-axis by choosing a corresponding non-zero */
/* argument. If both slants are non-zero, some affine transformation */
/* will result. */
FT_EXPORT( void )
FT_GlyphSlot_Slant( FT_GlyphSlot slot,
FT_Fixed xslant,
FT_Fixed yslant );
/* */

View File

@ -4,7 +4,7 @@
*
* FreeType low-level system interface definition (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -229,7 +229,8 @@ FT_BEGIN_HEADER
* A handle to the source stream.
*
* offset ::
* The offset of read in stream (always from start).
* The offset from the start of the stream to seek to if this is a seek
* operation (see note).
*
* buffer ::
* The address of the read buffer.
@ -241,8 +242,13 @@ FT_BEGIN_HEADER
* The number of bytes effectively read by the stream.
*
* @note:
* This function might be called to perform a seek or skip operation with
* a `count` of~0. A non-zero return value then indicates an error.
* This function performs a seek *or* a read operation depending on the
* argument values. If `count` is zero, the operation is a seek to
* `offset` bytes. If `count` is >~0, the operation is a read of `count`
* bytes from the current position in the stream, and the `offset` value
* should be ignored.
*
* For seek operations, a non-zero return value indicates an error.
*
*/
typedef unsigned long

View File

@ -4,7 +4,7 @@
*
* FreeType trigonometric functions (specification).
*
* Copyright (C) 2001-2022 by
* Copyright (C) 2001-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType simple types definitions (specification only).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -45,7 +45,10 @@ FT_BEGIN_HEADER
* @description:
* This section contains the basic data types defined by FreeType~2,
* ranging from simple scalar types to bitmap descriptors. More
* font-specific structures are defined in a different section.
* font-specific structures are defined in a different section. Note
* that FreeType does not use floating-point data types. Fractional
* values are represented by fixed-point integers, with lower bits
* storing the fractional part.
*
* @order:
* FT_Byte

View File

@ -4,7 +4,7 @@
*
* FreeType API for accessing Windows fnt-specific data.
*
* Copyright (C) 2003-2022 by
* Copyright (C) 2003-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* High-level 'autohint' module-specific interface (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Basic OpenType/CFF object type definitions (specification).
*
* Copyright (C) 2017-2022 by
* Copyright (C) 2017-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -5,7 +5,7 @@
* Basic OpenType/CFF type definitions and interface (specification
* only).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -315,7 +315,7 @@ FT_BEGIN_HEADER
/* The normal stack then points to these values instead of the DICT */
/* because all other operators in Private DICT clear the stack. */
/* `blend_stack' could be cleared at each operator other than blend. */
/* Blended values are stored as 5-byte fixed point values. */
/* Blended values are stored as 5-byte fixed-point values. */
FT_Byte* blend_stack; /* base of stack allocation */
FT_Byte* blend_top; /* first empty slot */

View File

@ -4,7 +4,7 @@
*
* Compiler-specific macro definitions used internally by FreeType.
*
* Copyright (C) 2020-2022 by
* Copyright (C) 2020-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -34,6 +34,19 @@ FT_BEGIN_HEADER
# if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
# pragma set woff 3505
# endif
#endif
/* Newer compilers warn for fall-through case statements. */
#ifndef FALL_THROUGH
# if ( defined( __STDC_VERSION__ ) && __STDC_VERSION__ > 201710L ) || \
( defined( __cplusplus ) && __cplusplus > 201402L )
# define FALL_THROUGH [[__fallthrough__]]
# elif ( defined( __GNUC__ ) && __GNUC__ >= 7 ) || \
( defined( __clang__ ) && __clang_major__ >= 10 )
# define FALL_THROUGH __attribute__(( __fallthrough__ ))
# else
# define FALL_THROUGH ( (void)0 )
# endif
#endif
/*
@ -258,7 +271,7 @@ FT_BEGIN_HEADER
* To export a variable, use `FT_EXPORT_VAR`.
*/
/* See `freetype/config/compiler_macros.h` for the `FT_EXPORT` definition */
/* See `freetype/config/public-macros.h` for the `FT_EXPORT` definition */
#define FT_EXPORT_DEF( x ) FT_FUNCTION_DEFINITION( x )
/*

View File

@ -4,7 +4,7 @@
*
* Arithmetic computations (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -278,6 +278,40 @@ FT_BEGIN_HEADER
FT_Long c );
/**************************************************************************
*
* @function:
* FT_MulAddFix
*
* @description:
* Compute `(s[0] * f[0] + s[1] * f[1] + ...) / 0x10000`, where `s[n]` is
* usually a 16.16 scalar.
*
* @input:
* s ::
* The array of scalars.
* f ::
* The array of factors.
* count ::
* The number of entries in the array.
*
* @return:
* The result of `(s[0] * f[0] + s[1] * f[1] + ...) / 0x10000`.
*
* @note:
* This function is currently used for the scaled delta computation of
* variation stores. It internally uses 64-bit data types when
* available, otherwise it emulates 64-bit math by using 32-bit
* operations, which produce a correct result but most likely at a slower
* performance in comparison to the implementation base on `int64_t`.
*
*/
FT_BASE( FT_Int32 )
FT_MulAddFix( FT_Fixed* s,
FT_Int32* f,
FT_UInt count );
/*
* A variant of FT_Matrix_Multiply which scales its result afterwards. The
* idea is that both `a' and `b' are scaled by factors of 10 so that the
@ -413,11 +447,11 @@ FT_BEGIN_HEADER
extern __inline FT_Int32
FT_MSB_i386( FT_UInt32 x );
#pragma aux FT_MSB_i386 = \
"bsr eax, eax" \
parm [eax] nomemory \
value [eax] \
modify exact [eax] nomemory;
#pragma aux FT_MSB_i386 = \
"bsr eax, eax" \
__parm [__eax] __nomemory \
__value [__eax] \
__modify __exact [__eax] __nomemory;
#define FT_MSB( x ) FT_MSB_i386( x )

View File

@ -4,7 +4,7 @@
*
* Debugging and logging component (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType internal font driver interface (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType glyph loader (specification).
*
* Copyright (C) 2002-2022 by
* Copyright (C) 2002-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType memory management macros (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg
*
* This file is part of the FreeType project, and may only be used,
@ -96,15 +96,15 @@ extern "C++"
#ifdef FT_DEBUG_MEMORY
FT_BASE( const char* ) _ft_debug_file;
FT_BASE( long ) _ft_debug_lineno;
FT_BASE( const char* ) ft_debug_file_;
FT_BASE( long ) ft_debug_lineno_;
#define FT_DEBUG_INNER( exp ) ( _ft_debug_file = __FILE__, \
_ft_debug_lineno = __LINE__, \
#define FT_DEBUG_INNER( exp ) ( ft_debug_file_ = __FILE__, \
ft_debug_lineno_ = __LINE__, \
(exp) )
#define FT_ASSIGNP_INNER( p, exp ) ( _ft_debug_file = __FILE__, \
_ft_debug_lineno = __LINE__, \
#define FT_ASSIGNP_INNER( p, exp ) ( ft_debug_file_ = __FILE__, \
ft_debug_lineno_ = __LINE__, \
FT_ASSIGNP( p, exp ) )
#else /* !FT_DEBUG_MEMORY */

View File

@ -0,0 +1,85 @@
/****************************************************************************
*
* ftmmtypes.h
*
* OpenType Variations type definitions for internal use
* with the multi-masters service (specification).
*
* Copyright (C) 2022-2023 by
* David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and
* Dominik Röttsches.
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
* license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
*/
#ifndef FTMMTYPES_H_
#define FTMMTYPES_H_
FT_BEGIN_HEADER
typedef FT_Int32 FT_ItemVarDelta;
typedef struct GX_ItemVarDataRec_
{
FT_UInt itemCount; /* number of delta sets per item */
FT_UInt regionIdxCount; /* number of region indices */
FT_UInt* regionIndices; /* array of `regionCount' indices; */
/* these index `varRegionList' */
FT_ItemVarDelta* deltaSet; /* array of `itemCount' deltas */
/* use `innerIndex' for this array */
} GX_ItemVarDataRec, *GX_ItemVarData;
/* contribution of one axis to a region */
typedef struct GX_AxisCoordsRec_
{
FT_Fixed startCoord;
FT_Fixed peakCoord; /* zero means no effect (factor = 1) */
FT_Fixed endCoord;
} GX_AxisCoordsRec, *GX_AxisCoords;
typedef struct GX_VarRegionRec_
{
GX_AxisCoords axisList; /* array of axisCount records */
} GX_VarRegionRec, *GX_VarRegion;
/* item variation store */
typedef struct GX_ItemVarStoreRec_
{
FT_UInt dataCount;
GX_ItemVarData varData; /* array of dataCount records; */
/* use `outerIndex' for this array */
FT_UShort axisCount;
FT_UInt regionCount; /* total number of regions defined */
GX_VarRegion varRegionList;
} GX_ItemVarStoreRec, *GX_ItemVarStore;
typedef struct GX_DeltaSetIdxMapRec_
{
FT_ULong mapCount;
FT_UInt* outerIndex; /* indices to item var data */
FT_UInt* innerIndex; /* indices to delta set */
} GX_DeltaSetIdxMapRec, *GX_DeltaSetIdxMap;
FT_END_HEADER
#endif /* FTMMTYPES_H_ */
/* END */

View File

@ -4,7 +4,7 @@
*
* The FreeType private base classes (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Get and set properties of PostScript drivers (specification).
*
* Copyright (C) 2017-2022 by
* Copyright (C) 2017-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Embedded resource forks accessor (specification).
*
* Copyright (C) 2004-2022 by
* Copyright (C) 2004-2023 by
* Masatake YAMATO and Redhat K.K.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType services (specification only).
*
* Copyright (C) 2003-2022 by
* Copyright (C) 2003-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Stream handling (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -238,42 +238,42 @@ FT_BEGIN_HEADER
#define FT_NEXT_BYTE( buffer ) \
( (unsigned char)*buffer++ )
#define FT_NEXT_SHORT( buffer ) \
( (short)( buffer += 2, FT_PEEK_SHORT( buffer - 2 ) ) )
#define FT_NEXT_SHORT( buffer ) \
( buffer += 2, FT_PEEK_SHORT( buffer - 2 ) )
#define FT_NEXT_USHORT( buffer ) \
( (unsigned short)( buffer += 2, FT_PEEK_USHORT( buffer - 2 ) ) )
#define FT_NEXT_USHORT( buffer ) \
( buffer += 2, FT_PEEK_USHORT( buffer - 2 ) )
#define FT_NEXT_OFF3( buffer ) \
( (long)( buffer += 3, FT_PEEK_OFF3( buffer - 3 ) ) )
#define FT_NEXT_OFF3( buffer ) \
( buffer += 3, FT_PEEK_OFF3( buffer - 3 ) )
#define FT_NEXT_UOFF3( buffer ) \
( (unsigned long)( buffer += 3, FT_PEEK_UOFF3( buffer - 3 ) ) )
#define FT_NEXT_UOFF3( buffer ) \
( buffer += 3, FT_PEEK_UOFF3( buffer - 3 ) )
#define FT_NEXT_LONG( buffer ) \
( (long)( buffer += 4, FT_PEEK_LONG( buffer - 4 ) ) )
#define FT_NEXT_LONG( buffer ) \
( buffer += 4, FT_PEEK_LONG( buffer - 4 ) )
#define FT_NEXT_ULONG( buffer ) \
( (unsigned long)( buffer += 4, FT_PEEK_ULONG( buffer - 4 ) ) )
#define FT_NEXT_ULONG( buffer ) \
( buffer += 4, FT_PEEK_ULONG( buffer - 4 ) )
#define FT_NEXT_SHORT_LE( buffer ) \
( (short)( buffer += 2, FT_PEEK_SHORT_LE( buffer - 2 ) ) )
#define FT_NEXT_SHORT_LE( buffer ) \
( buffer += 2, FT_PEEK_SHORT_LE( buffer - 2 ) )
#define FT_NEXT_USHORT_LE( buffer ) \
( (unsigned short)( buffer += 2, FT_PEEK_USHORT_LE( buffer - 2 ) ) )
#define FT_NEXT_USHORT_LE( buffer ) \
( buffer += 2, FT_PEEK_USHORT_LE( buffer - 2 ) )
#define FT_NEXT_OFF3_LE( buffer ) \
( (long)( buffer += 3, FT_PEEK_OFF3_LE( buffer - 3 ) ) )
#define FT_NEXT_OFF3_LE( buffer ) \
( buffer += 3, FT_PEEK_OFF3_LE( buffer - 3 ) )
#define FT_NEXT_UOFF3_LE( buffer ) \
( (unsigned long)( buffer += 3, FT_PEEK_UOFF3_LE( buffer - 3 ) ) )
#define FT_NEXT_UOFF3_LE( buffer ) \
( buffer += 3, FT_PEEK_UOFF3_LE( buffer - 3 ) )
#define FT_NEXT_LONG_LE( buffer ) \
( (long)( buffer += 4, FT_PEEK_LONG_LE( buffer - 4 ) ) )
#define FT_NEXT_LONG_LE( buffer ) \
( buffer += 4, FT_PEEK_LONG_LE( buffer - 4 ) )
#define FT_NEXT_ULONG_LE( buffer ) \
( (unsigned long)( buffer += 4, FT_PEEK_ULONG_LE( buffer - 4 ) ) )
#define FT_NEXT_ULONG_LE( buffer ) \
( buffer += 4, FT_PEEK_ULONG_LE( buffer - 4 ) )
/**************************************************************************
@ -307,17 +307,17 @@ FT_BEGIN_HEADER
#define FT_GET_CHAR() FT_GET_MACRO( FT_Stream_GetByte, FT_Char )
#define FT_GET_BYTE() FT_GET_MACRO( FT_Stream_GetByte, FT_Byte )
#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_Short )
#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_UShort )
#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_ULong )
#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetULong, FT_Long )
#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong )
#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong )
#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_Int16 )
#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_UInt16 )
#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_UInt32 )
#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetULong, FT_Int32 )
#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetULong, FT_UInt32 )
#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetULong, FT_UInt32 )
#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_Short )
#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_UShort )
#define FT_GET_LONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_Long )
#define FT_GET_ULONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_ULong )
#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_Int16 )
#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_UInt16 )
#define FT_GET_LONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_Int32 )
#define FT_GET_ULONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_UInt32 )
#endif
@ -334,16 +334,16 @@ FT_BEGIN_HEADER
*/
#define FT_READ_BYTE( var ) FT_READ_MACRO( FT_Stream_ReadByte, FT_Byte, var )
#define FT_READ_CHAR( var ) FT_READ_MACRO( FT_Stream_ReadByte, FT_Char, var )
#define FT_READ_SHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_Short, var )
#define FT_READ_USHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_UShort, var )
#define FT_READ_UOFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_ULong, var )
#define FT_READ_LONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_Long, var )
#define FT_READ_ULONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_ULong, var )
#define FT_READ_SHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_Int16, var )
#define FT_READ_USHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_UInt16, var )
#define FT_READ_UOFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_UInt32, var )
#define FT_READ_LONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_Int32, var )
#define FT_READ_ULONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_UInt32, var )
#define FT_READ_SHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_Short, var )
#define FT_READ_USHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_UShort, var )
#define FT_READ_LONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_Long, var )
#define FT_READ_ULONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_ULong, var )
#define FT_READ_SHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_Int16, var )
#define FT_READ_USHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_UInt16, var )
#define FT_READ_LONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_Int32, var )
#define FT_READ_ULONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_UInt32, var )
#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
@ -459,23 +459,23 @@ FT_BEGIN_HEADER
FT_Stream_GetByte( FT_Stream stream );
/* read a 16-bit big-endian unsigned integer from an entered frame */
FT_BASE( FT_UShort )
FT_BASE( FT_UInt16 )
FT_Stream_GetUShort( FT_Stream stream );
/* read a 24-bit big-endian unsigned integer from an entered frame */
FT_BASE( FT_ULong )
FT_BASE( FT_UInt32 )
FT_Stream_GetUOffset( FT_Stream stream );
/* read a 32-bit big-endian unsigned integer from an entered frame */
FT_BASE( FT_ULong )
FT_BASE( FT_UInt32 )
FT_Stream_GetULong( FT_Stream stream );
/* read a 16-bit little-endian unsigned integer from an entered frame */
FT_BASE( FT_UShort )
FT_BASE( FT_UInt16 )
FT_Stream_GetUShortLE( FT_Stream stream );
/* read a 32-bit little-endian unsigned integer from an entered frame */
FT_BASE( FT_ULong )
FT_BASE( FT_UInt32 )
FT_Stream_GetULongLE( FT_Stream stream );
@ -485,7 +485,7 @@ FT_BEGIN_HEADER
FT_Error* error );
/* read a 16-bit big-endian unsigned integer from a stream */
FT_BASE( FT_UShort )
FT_BASE( FT_UInt16 )
FT_Stream_ReadUShort( FT_Stream stream,
FT_Error* error );
@ -495,17 +495,17 @@ FT_BEGIN_HEADER
FT_Error* error );
/* read a 32-bit big-endian integer from a stream */
FT_BASE( FT_ULong )
FT_BASE( FT_UInt32 )
FT_Stream_ReadULong( FT_Stream stream,
FT_Error* error );
/* read a 16-bit little-endian unsigned integer from a stream */
FT_BASE( FT_UShort )
FT_BASE( FT_UInt16 )
FT_Stream_ReadUShortLE( FT_Stream stream,
FT_Error* error );
/* read a 32-bit little-endian unsigned integer from a stream */
FT_BASE( FT_ULong )
FT_BASE( FT_UInt32 )
FT_Stream_ReadULongLE( FT_Stream stream,
FT_Error* error );

View File

@ -4,7 +4,7 @@
*
* Tracing handling (specification only).
*
* Copyright (C) 2002-2022 by
* Copyright (C) 2002-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType validation support (specification).
*
* Copyright (C) 2004-2022 by
* Copyright (C) 2004-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -5,7 +5,7 @@
* Auxiliary functions and data structures related to PostScript fonts
* (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -132,9 +132,6 @@ FT_BEGIN_HEADER
* max_elems ::
* The maximum number of elements in table.
*
* num_elems ::
* The current number of elements in table.
*
* elements ::
* A table of element addresses within the block.
*
@ -155,7 +152,6 @@ FT_BEGIN_HEADER
FT_ULong init;
FT_Int max_elems;
FT_Int num_elems;
FT_Byte** elements; /* addresses of table elements */
FT_UInt* lengths; /* lengths of table elements */

View File

@ -6,7 +6,7 @@
* recorders (specification only). These are used to support native
* T1/T2 hints in the 'type1', 'cid', and 'cff' font drivers.
*
* Copyright (C) 2001-2022 by
* Copyright (C) 2001-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -294,7 +294,7 @@ FT_BEGIN_HEADER
*
* @note:
* On input, all points within the outline are in font coordinates. On
* output, they are in 1/64th of pixels.
* output, they are in 1/64 of pixels.
*
* The scaling transformation is taken from the 'globals' object which
* must correspond to the same font as the glyph.
@ -607,7 +607,7 @@ FT_BEGIN_HEADER
*
* @note:
* On input, all points within the outline are in font coordinates. On
* output, they are in 1/64th of pixels.
* output, they are in 1/64 of pixels.
*
* The scaling transformation is taken from the 'globals' object which
* must correspond to the same font than the glyph.

View File

@ -4,7 +4,7 @@
*
* The FreeType BDF services (specification).
*
* Copyright (C) 2003-2022 by
* Copyright (C) 2003-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType CFF tables loader service (specification).
*
* Copyright (C) 2017-2022 by
* Copyright (C) 2017-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType CID font services (specification).
*
* Copyright (C) 2007-2022 by
* Copyright (C) 2007-2023 by
* Derek Clegg and Michael Toftdal.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType font format service (specification only).
*
* Copyright (C) 2003-2022 by
* Copyright (C) 2003-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType glyph dictionary services (specification).
*
* Copyright (C) 2003-2022 by
* Copyright (C) 2003-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* FreeType API for validating TrueTypeGX/AAT tables (specification).
*
* Copyright (C) 2004-2022 by
* Copyright (C) 2004-2023 by
* Masatake YAMATO, Red Hat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*

View File

@ -4,7 +4,7 @@
*
* The FreeType Kerning service (specification).
*
* Copyright (C) 2006-2022 by
* Copyright (C) 2006-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType services for metrics variations (specification).
*
* Copyright (C) 2016-2022 by
* Copyright (C) 2016-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,8 +4,8 @@
*
* The FreeType Multiple Masters and GX var services (specification).
*
* Copyright (C) 2003-2022 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
* Copyright (C) 2003-2023 by
* David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches.
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
@ -19,7 +19,9 @@
#ifndef SVMM_H_
#define SVMM_H_
#include <freetype/ftmm.h>
#include <freetype/internal/ftserv.h>
#include <freetype/internal/ftmmtypes.h>
FT_BEGIN_HEADER
@ -96,53 +98,94 @@ FT_BEGIN_HEADER
FT_UInt* len,
FT_Fixed* weight_vector );
typedef FT_Error
(*FT_Var_Load_Delta_Set_Idx_Map_Func)( FT_Face face,
FT_ULong offset,
GX_DeltaSetIdxMap map,
GX_ItemVarStore itemStore,
FT_ULong table_len );
typedef FT_Error
(*FT_Var_Load_Item_Var_Store_Func)( FT_Face face,
FT_ULong offset,
GX_ItemVarStore itemStore );
typedef FT_ItemVarDelta
(*FT_Var_Get_Item_Delta_Func)( FT_Face face,
GX_ItemVarStore itemStore,
FT_UInt outerIndex,
FT_UInt innerIndex );
typedef void
(*FT_Var_Done_Item_Var_Store_Func)( FT_Face face,
GX_ItemVarStore itemStore );
typedef void
(*FT_Var_Done_Delta_Set_Idx_Map_Func)( FT_Face face,
GX_DeltaSetIdxMap deltaSetIdxMap );
FT_DEFINE_SERVICE( MultiMasters )
{
FT_Get_MM_Func get_mm;
FT_Set_MM_Design_Func set_mm_design;
FT_Set_MM_Blend_Func set_mm_blend;
FT_Get_MM_Blend_Func get_mm_blend;
FT_Get_MM_Var_Func get_mm_var;
FT_Set_Var_Design_Func set_var_design;
FT_Get_Var_Design_Func get_var_design;
FT_Set_Instance_Func set_instance;
FT_Set_MM_WeightVector_Func set_mm_weightvector;
FT_Get_MM_WeightVector_Func get_mm_weightvector;
FT_Get_MM_Func get_mm;
FT_Set_MM_Design_Func set_mm_design;
FT_Set_MM_Blend_Func set_mm_blend;
FT_Get_MM_Blend_Func get_mm_blend;
FT_Get_MM_Var_Func get_mm_var;
FT_Set_Var_Design_Func set_var_design;
FT_Get_Var_Design_Func get_var_design;
FT_Set_Instance_Func set_instance;
FT_Set_MM_WeightVector_Func set_mm_weightvector;
FT_Get_MM_WeightVector_Func get_mm_weightvector;
/* for internal use; only needed for code sharing between modules */
FT_Get_Var_Blend_Func get_var_blend;
FT_Done_Blend_Func done_blend;
FT_Var_Load_Delta_Set_Idx_Map_Func load_delta_set_idx_map;
FT_Var_Load_Item_Var_Store_Func load_item_var_store;
FT_Var_Get_Item_Delta_Func get_item_delta;
FT_Var_Done_Item_Var_Store_Func done_item_var_store;
FT_Var_Done_Delta_Set_Idx_Map_Func done_delta_set_idx_map;
FT_Get_Var_Blend_Func get_var_blend;
FT_Done_Blend_Func done_blend;
};
#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_, \
get_mm_, \
set_mm_design_, \
set_mm_blend_, \
get_mm_blend_, \
get_mm_var_, \
set_var_design_, \
get_var_design_, \
set_instance_, \
set_weightvector_, \
get_weightvector_, \
get_var_blend_, \
done_blend_ ) \
static const FT_Service_MultiMastersRec class_ = \
{ \
get_mm_, \
set_mm_design_, \
set_mm_blend_, \
get_mm_blend_, \
get_mm_var_, \
set_var_design_, \
get_var_design_, \
set_instance_, \
set_weightvector_, \
get_weightvector_, \
get_var_blend_, \
done_blend_ \
#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_, \
get_mm_, \
set_mm_design_, \
set_mm_blend_, \
get_mm_blend_, \
get_mm_var_, \
set_var_design_, \
get_var_design_, \
set_instance_, \
set_weightvector_, \
get_weightvector_, \
load_delta_set_idx_map_, \
load_item_var_store_, \
get_item_delta_, \
done_item_var_store_, \
done_delta_set_idx_map_, \
get_var_blend_, \
done_blend_ ) \
static const FT_Service_MultiMastersRec class_ = \
{ \
get_mm_, \
set_mm_design_, \
set_mm_blend_, \
get_mm_blend_, \
get_mm_var_, \
set_var_design_, \
get_var_design_, \
set_instance_, \
set_weightvector_, \
get_weightvector_, \
load_delta_set_idx_map_, \
load_item_var_store_, \
get_item_delta_, \
done_item_var_store_, \
done_delta_set_idx_map_, \
get_var_blend_, \
done_blend_ \
};
/* */

View File

@ -4,7 +4,7 @@
*
* The FreeType OpenType validation service (specification).
*
* Copyright (C) 2004-2022 by
* Copyright (C) 2004-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Internal PFR service functions (specification).
*
* Copyright (C) 2003-2022 by
* Copyright (C) 2003-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType PostScript name services (specification).
*
* Copyright (C) 2003-2022 by
* Copyright (C) 2003-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType property service (specification).
*
* Copyright (C) 2012-2022 by
* Copyright (C) 2012-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType PostScript charmap service (specification).
*
* Copyright (C) 2003-2022 by
* Copyright (C) 2003-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType PostScript info service (specification).
*
* Copyright (C) 2003-2022 by
* Copyright (C) 2003-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType SFNT table loading service (specification).
*
* Copyright (C) 2003-2022 by
* Copyright (C) 2003-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType TrueType/sfnt cmap extra information service.
*
* Copyright (C) 2003-2022 by
* Copyright (C) 2003-2023 by
* Masatake YAMATO, Redhat K.K.,
* David Turner, Robert Wilhelm, and Werner Lemberg.
*

View File

@ -4,7 +4,7 @@
*
* The FreeType TrueType engine query service (specification).
*
* Copyright (C) 2006-2022 by
* Copyright (C) 2006-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType TrueType glyph service.
*
* Copyright (C) 2007-2022 by
* Copyright (C) 2007-2023 by
* David Turner.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* The FreeType Windows FNT/FONT service (specification).
*
* Copyright (C) 2003-2022 by
* Copyright (C) 2003-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* High-level 'sfnt' driver interface (specification).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -4,7 +4,7 @@
*
* Interface of ot-svg module (specification only).
*
* Copyright (C) 2022 by
* Copyright (C) 2022-2023 by
* David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti.
*
* This file is part of the FreeType project, and may only be used,

View File

@ -5,7 +5,7 @@
* Basic Type1/Type2 type definitions and interface (specification
* only).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@ -172,8 +172,8 @@ FT_BEGIN_HEADER
{
FT_Bool IsCIDFont;
FT_BBox FontBBox;
FT_Fixed Ascender;
FT_Fixed Descender;
FT_Fixed Ascender; /* optional, mind the zero */
FT_Fixed Descender; /* optional, mind the zero */
AFM_TrackKern TrackKerns; /* free if non-NULL */
FT_UInt NumTrackKern;
AFM_KernPair KernPairs; /* free if non-NULL */

View File

@ -5,7 +5,7 @@
* Basic SFNT/TrueType type definitions and interface (specification
* only).
*
* Copyright (C) 1996-2022 by
* Copyright (C) 1996-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,

Some files were not shown because too many files have changed in this diff Show More