├── CHANGES.txt ├── FTL.TXT ├── GPLv2.TXT ├── LICENSE.TXT ├── README.md ├── demos ├── win32 │ ├── freetype.dll │ ├── ftbench.exe │ ├── ftdump.exe │ ├── ftgamma.exe │ ├── ftgrid.exe │ ├── ftlint.exe │ ├── ftmulti.exe │ ├── ftstring.exe │ └── ftview.exe └── win64 │ ├── freetype.dll │ ├── ftbench.exe │ ├── ftdump.exe │ ├── ftgamma.exe │ ├── ftgrid.exe │ ├── ftlint.exe │ ├── ftmulti.exe │ ├── ftstring.exe │ └── ftview.exe ├── include ├── freetype │ ├── config │ │ ├── ftconfig.h │ │ ├── ftheader.h │ │ ├── ftmodule.h │ │ ├── ftoption.h │ │ ├── ftstdlib.h │ │ ├── integer-types.h │ │ ├── mac-support.h │ │ └── public-macros.h │ ├── freetype.h │ ├── ftadvanc.h │ ├── ftbbox.h │ ├── ftbdf.h │ ├── ftbitmap.h │ ├── ftbzip2.h │ ├── ftcache.h │ ├── ftchapters.h │ ├── ftcid.h │ ├── ftcolor.h │ ├── ftdriver.h │ ├── fterrdef.h │ ├── fterrors.h │ ├── ftfntfmt.h │ ├── ftgasp.h │ ├── ftglyph.h │ ├── ftgxval.h │ ├── ftgzip.h │ ├── ftimage.h │ ├── ftincrem.h │ ├── ftlcdfil.h │ ├── ftlist.h │ ├── ftlogging.h │ ├── ftlzw.h │ ├── ftmac.h │ ├── ftmm.h │ ├── ftmodapi.h │ ├── ftmoderr.h │ ├── ftotval.h │ ├── ftoutln.h │ ├── ftparams.h │ ├── ftpfr.h │ ├── ftrender.h │ ├── ftsizes.h │ ├── ftsnames.h │ ├── ftstroke.h │ ├── ftsynth.h │ ├── ftsystem.h │ ├── fttrigon.h │ ├── fttypes.h │ ├── ftwinfnt.h │ ├── otsvg.h │ ├── t1tables.h │ ├── ttnameid.h │ ├── tttables.h │ └── tttags.h └── ft2build.h ├── release dll ├── win32 │ ├── freetype.dll │ └── freetype.lib └── win64 │ ├── freetype.dll │ └── freetype.lib └── release static ├── README.TXT └── vs2015-2022 ├── win32 └── freetype.lib └── win64 └── freetype.lib /FTL.TXT: -------------------------------------------------------------------------------- 1 | The FreeType Project LICENSE 2 | ---------------------------- 3 | 4 | 2006-Jan-27 5 | 6 | Copyright 1996-2002, 2006 by 7 | David Turner, Robert Wilhelm, and Werner Lemberg 8 | 9 | 10 | 11 | Introduction 12 | ============ 13 | 14 | The FreeType Project is distributed in several archive packages; 15 | some of them may contain, in addition to the FreeType font engine, 16 | various tools and contributions which rely on, or relate to, the 17 | FreeType Project. 18 | 19 | This license applies to all files found in such packages, and 20 | which do not fall under their own explicit license. The license 21 | affects thus the FreeType font engine, the test programs, 22 | documentation and makefiles, at the very least. 23 | 24 | This license was inspired by the BSD, Artistic, and IJG 25 | (Independent JPEG Group) licenses, which all encourage inclusion 26 | and use of free software in commercial and freeware products 27 | alike. As a consequence, its main points are that: 28 | 29 | o We don't promise that this software works. However, we will be 30 | interested in any kind of bug reports. (`as is' distribution) 31 | 32 | o You can use this software for whatever you want, in parts or 33 | full form, without having to pay us. (`royalty-free' usage) 34 | 35 | o You may not pretend that you wrote this software. If you use 36 | it, or only parts of it, in a program, you must acknowledge 37 | somewhere in your documentation that you have used the 38 | FreeType code. (`credits') 39 | 40 | We specifically permit and encourage the inclusion of this 41 | software, with or without modifications, in commercial products. 42 | We disclaim all warranties covering The FreeType Project and 43 | assume no liability related to The FreeType Project. 44 | 45 | 46 | Finally, many people asked us for a preferred form for a 47 | credit/disclaimer to use in compliance with this license. We thus 48 | encourage you to use the following text: 49 | 50 | """ 51 | Portions of this software are copyright © The FreeType 52 | Project (www.freetype.org). All rights reserved. 53 | """ 54 | 55 | Please replace with the value from the FreeType version you 56 | actually use. 57 | 58 | 59 | Legal Terms 60 | =========== 61 | 62 | 0. Definitions 63 | -------------- 64 | 65 | Throughout this license, the terms `package', `FreeType Project', 66 | and `FreeType archive' refer to the set of files originally 67 | distributed by the authors (David Turner, Robert Wilhelm, and 68 | Werner Lemberg) as the `FreeType Project', be they named as alpha, 69 | beta or final release. 70 | 71 | `You' refers to the licensee, or person using the project, where 72 | `using' is a generic term including compiling the project's source 73 | code as well as linking it to form a `program' or `executable'. 74 | This program is referred to as `a program using the FreeType 75 | engine'. 76 | 77 | This license applies to all files distributed in the original 78 | FreeType Project, including all source code, binaries and 79 | documentation, unless otherwise stated in the file in its 80 | original, unmodified form as distributed in the original archive. 81 | If you are unsure whether or not a particular file is covered by 82 | this license, you must contact us to verify this. 83 | 84 | The FreeType Project is copyright (C) 1996-2000 by David Turner, 85 | Robert Wilhelm, and Werner Lemberg. All rights reserved except as 86 | specified below. 87 | 88 | 1. No Warranty 89 | -------------- 90 | 91 | THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY 92 | KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 93 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 94 | PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS 95 | BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO 96 | USE, OF THE FREETYPE PROJECT. 97 | 98 | 2. Redistribution 99 | ----------------- 100 | 101 | This license grants a worldwide, royalty-free, perpetual and 102 | irrevocable right and license to use, execute, perform, compile, 103 | display, copy, create derivative works of, distribute and 104 | sublicense the FreeType Project (in both source and object code 105 | forms) and derivative works thereof for any purpose; and to 106 | authorize others to exercise some or all of the rights granted 107 | herein, subject to the following conditions: 108 | 109 | o Redistribution of source code must retain this license file 110 | (`FTL.TXT') unaltered; any additions, deletions or changes to 111 | the original files must be clearly indicated in accompanying 112 | documentation. The copyright notices of the unaltered, 113 | original files must be preserved in all copies of source 114 | files. 115 | 116 | o Redistribution in binary form must provide a disclaimer that 117 | states that the software is based in part of the work of the 118 | FreeType Team, in the distribution documentation. We also 119 | encourage you to put an URL to the FreeType web page in your 120 | documentation, though this isn't mandatory. 121 | 122 | These conditions apply to any software derived from or based on 123 | the FreeType Project, not just the unmodified files. If you use 124 | our work, you must acknowledge us. However, no fee need be paid 125 | to us. 126 | 127 | 3. Advertising 128 | -------------- 129 | 130 | Neither the FreeType authors and contributors nor you shall use 131 | the name of the other for commercial, advertising, or promotional 132 | purposes without specific prior written permission. 133 | 134 | We suggest, but do not require, that you use one or more of the 135 | following phrases to refer to this software in your documentation 136 | or advertising materials: `FreeType Project', `FreeType Engine', 137 | `FreeType library', or `FreeType Distribution'. 138 | 139 | As you have not signed this license, you are not required to 140 | accept it. However, as the FreeType Project is copyrighted 141 | material, only this license, or another one contracted with the 142 | authors, grants you the right to use, distribute, and modify it. 143 | Therefore, by using, distributing, or modifying the FreeType 144 | Project, you indicate that you understand and accept all the terms 145 | of this license. 146 | 147 | 4. Contacts 148 | ----------- 149 | 150 | There are two mailing lists related to FreeType: 151 | 152 | o freetype@nongnu.org 153 | 154 | Discusses general use and applications of FreeType, as well as 155 | future and wanted additions to the library and distribution. 156 | If you are looking for support, start in this list if you 157 | haven't found anything to help you in the documentation. 158 | 159 | o freetype-devel@nongnu.org 160 | 161 | Discusses bugs, as well as engine internals, design issues, 162 | specific licenses, porting, etc. 163 | 164 | Our home page can be found at 165 | 166 | https://www.freetype.org 167 | 168 | 169 | --- end of FTL.TXT --- 170 | -------------------------------------------------------------------------------- /LICENSE.TXT: -------------------------------------------------------------------------------- 1 | FREETYPE LICENSES 2 | ----------------- 3 | 4 | The FreeType 2 font engine is copyrighted work and cannot be used 5 | legally without a software license. In order to make this project 6 | usable to a vast majority of developers, we distribute it under two 7 | mutually exclusive open-source licenses. 8 | 9 | This means that *you* must choose *one* of the two licenses described 10 | below, then obey all its terms and conditions when using FreeType 2 in 11 | any of your projects or products. 12 | 13 | - The FreeType License, found in the file `docs/FTL.TXT`, which is 14 | similar to the original BSD license *with* an advertising clause 15 | that forces you to explicitly cite the FreeType project in your 16 | product's documentation. All details are in the license file. 17 | This license is suited to products which don't use the GNU General 18 | Public License. 19 | 20 | Note that this license is compatible to the GNU General Public 21 | License version 3, but not version 2. 22 | 23 | - The GNU General Public License version 2, found in 24 | `docs/GPLv2.TXT` (any later version can be used also), for 25 | programs which already use the GPL. Note that the FTL is 26 | incompatible with GPLv2 due to its advertisement clause. 27 | 28 | The contributed BDF and PCF drivers come with a license similar to 29 | that of the X Window System. It is compatible to the above two 30 | licenses (see files `src/bdf/README` and `src/pcf/README`). The same 31 | holds for the source code files `src/base/fthash.c` and 32 | `include/freetype/internal/fthash.h`; they were part of the BDF driver 33 | in earlier FreeType versions. 34 | 35 | The gzip module uses the zlib license (see `src/gzip/zlib.h`) which 36 | too is compatible to the above two licenses. 37 | 38 | The files `src/autofit/ft-hb.c` and `src/autofit/ft-hb.h` contain code 39 | taken almost verbatim from the HarfBuzz file `hb-ft.cc`, which uses 40 | the 'Old MIT' license, compatible to the above two licenses. 41 | 42 | The MD5 checksum support (only used for debugging in development 43 | builds) is in the public domain. 44 | 45 | 46 | --- end of LICENSE.TXT --- 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | FreeType 2.13.3 2 | ========================= 3 | ###### FreeType Windows libraries (win32/win64) 4 | Compiled with VS 2022 (SDK 10.0.26100) 5 | > The *freetype* libraries use the *Universal CRT* and therefore **_requires_** Visual C++ 2015-2022 Redistributable to be present on system. 6 | ###### Supported operating systems 7 | - Windows 10 version 1507 or higher 8 | - Windows Server 2022, Windows Server 2019, Windows Server 2016 and Windows Server 2012 R2 9 | - Windows 8.1 10 | - Windows 7 SP1 11 | ###### Hash values for DLL files 12 | | filename | sha256 | 13 | | :-- | :-- | 14 | | release dll\\win32\\**freetype.dll** | `F8F398B7E4F0D45348520FF4A7CC05FB81B6E241A3067B9D85D5D381E1FB1E7A` | 15 | | release dll\\win32\\**freetype.lib** | `0B69476D66A32F22C1FF3DFBEFE1984DE6292159D36BD2ECC8144A26C76B2FAE` | 16 | | release dll\\win64\\**freetype.dll** | `48267DF7F4619AB4B12A8EE75D513C4C378A30BFEC5C48CBABCB678B72F8F697` | 17 | | release dll\\win64\\**freetype.lib** | `869E821E5072B507F06B36640336E08B9F8FCD65A3A63C6C27A55B0F33599AB1` | 18 | ###### Hash values for static library files 19 | | filename | sha256 | 20 | | :-- | :-- | 21 | | release static\\vs2015-2022\\win32\\**freetype.lib** | `58391E31438D7182A62596C48CCB5E0C6B76B8F37B7EE6565BADF3564D1465F8` | 22 | | release static\\vs2015-2022\\win64\\**freetype.lib** | `74856E22714BF99F2F04E59CFE77D7C85729E5AA3570030B939048115EF528AD` | 23 | -------------------------------------------------------------------------------- /demos/win32/freetype.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win32/freetype.dll -------------------------------------------------------------------------------- /demos/win32/ftbench.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win32/ftbench.exe -------------------------------------------------------------------------------- /demos/win32/ftdump.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win32/ftdump.exe -------------------------------------------------------------------------------- /demos/win32/ftgamma.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win32/ftgamma.exe -------------------------------------------------------------------------------- /demos/win32/ftgrid.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win32/ftgrid.exe -------------------------------------------------------------------------------- /demos/win32/ftlint.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win32/ftlint.exe -------------------------------------------------------------------------------- /demos/win32/ftmulti.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win32/ftmulti.exe -------------------------------------------------------------------------------- /demos/win32/ftstring.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win32/ftstring.exe -------------------------------------------------------------------------------- /demos/win32/ftview.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win32/ftview.exe -------------------------------------------------------------------------------- /demos/win64/freetype.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win64/freetype.dll -------------------------------------------------------------------------------- /demos/win64/ftbench.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win64/ftbench.exe -------------------------------------------------------------------------------- /demos/win64/ftdump.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win64/ftdump.exe -------------------------------------------------------------------------------- /demos/win64/ftgamma.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win64/ftgamma.exe -------------------------------------------------------------------------------- /demos/win64/ftgrid.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win64/ftgrid.exe -------------------------------------------------------------------------------- /demos/win64/ftlint.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win64/ftlint.exe -------------------------------------------------------------------------------- /demos/win64/ftmulti.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win64/ftmulti.exe -------------------------------------------------------------------------------- /demos/win64/ftstring.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win64/ftstring.exe -------------------------------------------------------------------------------- /demos/win64/ftview.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/demos/win64/ftview.exe -------------------------------------------------------------------------------- /include/freetype/config/ftconfig.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftconfig.h 4 | * 5 | * ANSI-specific configuration file (specification only). 6 | * 7 | * Copyright (C) 1996-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This header file contains a number of macro definitions that are used by 22 | * the rest of the engine. Most of the macros here are automatically 23 | * determined at compile time, and you should not need to change it to port 24 | * FreeType, except to compile the library with a non-ANSI compiler. 25 | * 26 | * Note however that if some specific modifications are needed, we advise 27 | * you to place a modified copy in your build directory. 28 | * 29 | * The build directory is usually `builds/`, and contains 30 | * system-specific files that are always included first when building the 31 | * library. 32 | * 33 | * This ANSI version should stay in `include/config/`. 34 | * 35 | */ 36 | 37 | #ifndef FTCONFIG_H_ 38 | #define FTCONFIG_H_ 39 | 40 | #include 41 | #include FT_CONFIG_OPTIONS_H 42 | #include FT_CONFIG_STANDARD_LIBRARY_H 43 | 44 | #include 45 | #include 46 | #include 47 | 48 | #endif /* FTCONFIG_H_ */ 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /include/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file registers the FreeType modules compiled into the library. 3 | * 4 | * If you use GNU make, this file IS NOT USED! Instead, it is created in 5 | * the objects directory (normally `/objs/`) based on information 6 | * from `/modules.cfg`. 7 | * 8 | * Please read `docs/INSTALL.ANY` and `docs/CUSTOMIZE` how to compile 9 | * FreeType without GNU make. 10 | * 11 | */ 12 | 13 | FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 14 | FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 15 | FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 16 | FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 17 | FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 18 | FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 19 | FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 20 | FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 21 | FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 22 | FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 23 | FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 24 | FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 25 | FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 26 | FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 27 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 28 | FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 29 | FT_USE_MODULE( FT_Renderer_Class, ft_sdf_renderer_class ) 30 | FT_USE_MODULE( FT_Renderer_Class, ft_bitmap_sdf_renderer_class ) 31 | FT_USE_MODULE( FT_Renderer_Class, ft_svg_renderer_class ) 32 | 33 | /* EOF */ 34 | -------------------------------------------------------------------------------- /include/freetype/config/ftstdlib.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftstdlib.h 4 | * 5 | * ANSI-specific library and header configuration file (specification 6 | * only). 7 | * 8 | * Copyright (C) 2002-2024 by 9 | * David Turner, Robert Wilhelm, and Werner Lemberg. 10 | * 11 | * This file is part of the FreeType project, and may only be used, 12 | * modified, and distributed under the terms of the FreeType project 13 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 14 | * this file you indicate that you have read the license and 15 | * understand and accept it fully. 16 | * 17 | */ 18 | 19 | 20 | /************************************************************************** 21 | * 22 | * This file is used to group all `#includes` to the ANSI~C library that 23 | * FreeType normally requires. It also defines macros to rename the 24 | * standard functions within the FreeType source code. 25 | * 26 | * Load a file which defines `FTSTDLIB_H_` before this one to override it. 27 | * 28 | */ 29 | 30 | 31 | #ifndef FTSTDLIB_H_ 32 | #define FTSTDLIB_H_ 33 | 34 | 35 | #include 36 | 37 | #define ft_ptrdiff_t ptrdiff_t 38 | 39 | 40 | /************************************************************************** 41 | * 42 | * integer limits 43 | * 44 | * `UINT_MAX` and `ULONG_MAX` are used to automatically compute the size of 45 | * `int` and `long` in bytes at compile-time. So far, this works for all 46 | * platforms the library has been tested on. We also check `ULLONG_MAX` 47 | * to see whether we can use 64-bit `long long` later on. 48 | * 49 | * Note that on the extremely rare platforms that do not provide integer 50 | * types that are _exactly_ 16 and 32~bits wide (e.g., some old Crays where 51 | * `int` is 36~bits), we do not make any guarantee about the correct 52 | * behaviour of FreeType~2 with all fonts. 53 | * 54 | * In these cases, `ftconfig.h` will refuse to compile anyway with a 55 | * message like 'couldn't find 32-bit type' or something similar. 56 | * 57 | */ 58 | 59 | 60 | #include 61 | 62 | #define FT_CHAR_BIT CHAR_BIT 63 | #define FT_USHORT_MAX USHRT_MAX 64 | #define FT_INT_MAX INT_MAX 65 | #define FT_INT_MIN INT_MIN 66 | #define FT_UINT_MAX UINT_MAX 67 | #define FT_LONG_MIN LONG_MIN 68 | #define FT_LONG_MAX LONG_MAX 69 | #define FT_ULONG_MAX ULONG_MAX 70 | #ifdef LLONG_MAX 71 | #define FT_LLONG_MAX LLONG_MAX 72 | #endif 73 | #ifdef LLONG_MIN 74 | #define FT_LLONG_MIN LLONG_MIN 75 | #endif 76 | #ifdef ULLONG_MAX 77 | #define FT_ULLONG_MAX ULLONG_MAX 78 | #endif 79 | 80 | 81 | /************************************************************************** 82 | * 83 | * character and string processing 84 | * 85 | */ 86 | 87 | 88 | #include 89 | 90 | #define ft_memchr memchr 91 | #define ft_memcmp memcmp 92 | #define ft_memcpy memcpy 93 | #define ft_memmove memmove 94 | #define ft_memset memset 95 | #define ft_strcat strcat 96 | #define ft_strcmp strcmp 97 | #define ft_strcpy strcpy 98 | #define ft_strlen strlen 99 | #define ft_strncmp strncmp 100 | #define ft_strncpy strncpy 101 | #define ft_strrchr strrchr 102 | #define ft_strstr strstr 103 | 104 | 105 | /************************************************************************** 106 | * 107 | * file handling 108 | * 109 | */ 110 | 111 | 112 | #include 113 | 114 | #define FT_FILE FILE 115 | #define ft_fclose fclose 116 | #define ft_fopen fopen 117 | #define ft_fread fread 118 | #define ft_fseek fseek 119 | #define ft_ftell ftell 120 | #define ft_snprintf snprintf 121 | 122 | 123 | /************************************************************************** 124 | * 125 | * sorting 126 | * 127 | */ 128 | 129 | 130 | #include 131 | 132 | #define ft_qsort qsort 133 | 134 | 135 | /************************************************************************** 136 | * 137 | * memory allocation 138 | * 139 | */ 140 | 141 | 142 | #define ft_scalloc calloc 143 | #define ft_sfree free 144 | #define ft_smalloc malloc 145 | #define ft_srealloc realloc 146 | 147 | 148 | /************************************************************************** 149 | * 150 | * miscellaneous 151 | * 152 | */ 153 | 154 | 155 | #define ft_strtol strtol 156 | #define ft_getenv getenv 157 | 158 | 159 | /************************************************************************** 160 | * 161 | * execution control 162 | * 163 | */ 164 | 165 | 166 | #include 167 | 168 | #define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */ 169 | /* `jmp_buf` is defined as a macro */ 170 | /* on certain platforms */ 171 | 172 | #define ft_longjmp longjmp 173 | #define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */ 174 | 175 | 176 | /* The following is only used for debugging purposes, i.e., if */ 177 | /* `FT_DEBUG_LEVEL_ERROR` or `FT_DEBUG_LEVEL_TRACE` are defined. */ 178 | 179 | #include 180 | 181 | 182 | #endif /* FTSTDLIB_H_ */ 183 | 184 | 185 | /* END */ 186 | -------------------------------------------------------------------------------- /include/freetype/config/integer-types.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * config/integer-types.h 4 | * 5 | * FreeType integer types definitions. 6 | * 7 | * Copyright (C) 1996-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | #ifndef FREETYPE_CONFIG_INTEGER_TYPES_H_ 18 | #define FREETYPE_CONFIG_INTEGER_TYPES_H_ 19 | 20 | /* There are systems (like the Texas Instruments 'C54x) where a `char` */ 21 | /* has 16~bits. ANSI~C says that `sizeof(char)` is always~1. Since an */ 22 | /* `int` has 16~bits also for this system, `sizeof(int)` gives~1 which */ 23 | /* is probably unexpected. */ 24 | /* */ 25 | /* `CHAR_BIT` (defined in `limits.h`) gives the number of bits in a */ 26 | /* `char` type. */ 27 | 28 | #ifndef FT_CHAR_BIT 29 | #define FT_CHAR_BIT CHAR_BIT 30 | #endif 31 | 32 | #ifndef FT_SIZEOF_INT 33 | 34 | /* The size of an `int` type. */ 35 | #if FT_UINT_MAX == 0xFFFFUL 36 | #define FT_SIZEOF_INT ( 16 / FT_CHAR_BIT ) 37 | #elif FT_UINT_MAX == 0xFFFFFFFFUL 38 | #define FT_SIZEOF_INT ( 32 / FT_CHAR_BIT ) 39 | #elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL 40 | #define FT_SIZEOF_INT ( 64 / FT_CHAR_BIT ) 41 | #else 42 | #error "Unsupported size of `int' type!" 43 | #endif 44 | 45 | #endif /* !defined(FT_SIZEOF_INT) */ 46 | 47 | #ifndef FT_SIZEOF_LONG 48 | 49 | /* The size of a `long` type. A five-byte `long` (as used e.g. on the */ 50 | /* DM642) is recognized but avoided. */ 51 | #if FT_ULONG_MAX == 0xFFFFFFFFUL 52 | #define FT_SIZEOF_LONG ( 32 / FT_CHAR_BIT ) 53 | #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL 54 | #define FT_SIZEOF_LONG ( 32 / FT_CHAR_BIT ) 55 | #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL 56 | #define FT_SIZEOF_LONG ( 64 / FT_CHAR_BIT ) 57 | #else 58 | #error "Unsupported size of `long' type!" 59 | #endif 60 | 61 | #endif /* !defined(FT_SIZEOF_LONG) */ 62 | 63 | #ifndef FT_SIZEOF_LONG_LONG 64 | 65 | /* The size of a `long long` type if available */ 66 | #if defined( FT_ULLONG_MAX ) && FT_ULLONG_MAX >= 0xFFFFFFFFFFFFFFFFULL 67 | #define FT_SIZEOF_LONG_LONG ( 64 / FT_CHAR_BIT ) 68 | #else 69 | #define FT_SIZEOF_LONG_LONG 0 70 | #endif 71 | 72 | #endif /* !defined(FT_SIZEOF_LONG_LONG) */ 73 | 74 | 75 | /************************************************************************** 76 | * 77 | * @section: 78 | * basic_types 79 | * 80 | */ 81 | 82 | 83 | /************************************************************************** 84 | * 85 | * @type: 86 | * FT_Int16 87 | * 88 | * @description: 89 | * A typedef for a 16bit signed integer type. 90 | */ 91 | typedef signed short FT_Int16; 92 | 93 | 94 | /************************************************************************** 95 | * 96 | * @type: 97 | * FT_UInt16 98 | * 99 | * @description: 100 | * A typedef for a 16bit unsigned integer type. 101 | */ 102 | typedef unsigned short FT_UInt16; 103 | 104 | /* */ 105 | 106 | 107 | /* this #if 0 ... #endif clause is for documentation purposes */ 108 | #if 0 109 | 110 | /************************************************************************** 111 | * 112 | * @type: 113 | * FT_Int32 114 | * 115 | * @description: 116 | * A typedef for a 32bit signed integer type. The size depends on the 117 | * configuration. 118 | */ 119 | typedef signed XXX FT_Int32; 120 | 121 | 122 | /************************************************************************** 123 | * 124 | * @type: 125 | * FT_UInt32 126 | * 127 | * A typedef for a 32bit unsigned integer type. The size depends on the 128 | * configuration. 129 | */ 130 | typedef unsigned XXX FT_UInt32; 131 | 132 | 133 | /************************************************************************** 134 | * 135 | * @type: 136 | * FT_Int64 137 | * 138 | * A typedef for a 64bit signed integer type. The size depends on the 139 | * configuration. Only defined if there is real 64bit support; 140 | * otherwise, it gets emulated with a structure (if necessary). 141 | */ 142 | typedef signed XXX FT_Int64; 143 | 144 | 145 | /************************************************************************** 146 | * 147 | * @type: 148 | * FT_UInt64 149 | * 150 | * A typedef for a 64bit unsigned integer type. The size depends on the 151 | * configuration. Only defined if there is real 64bit support; 152 | * otherwise, it gets emulated with a structure (if necessary). 153 | */ 154 | typedef unsigned XXX FT_UInt64; 155 | 156 | /* */ 157 | 158 | #endif 159 | 160 | #if FT_SIZEOF_INT == ( 32 / FT_CHAR_BIT ) 161 | 162 | typedef signed int FT_Int32; 163 | typedef unsigned int FT_UInt32; 164 | 165 | #elif FT_SIZEOF_LONG == ( 32 / FT_CHAR_BIT ) 166 | 167 | typedef signed long FT_Int32; 168 | typedef unsigned long FT_UInt32; 169 | 170 | #else 171 | #error "no 32bit type found -- please check your configuration files" 172 | #endif 173 | 174 | 175 | /* look up an integer type that is at least 32~bits */ 176 | #if FT_SIZEOF_INT >= ( 32 / FT_CHAR_BIT ) 177 | 178 | typedef int FT_Fast; 179 | typedef unsigned int FT_UFast; 180 | 181 | #elif FT_SIZEOF_LONG >= ( 32 / FT_CHAR_BIT ) 182 | 183 | typedef long FT_Fast; 184 | typedef unsigned long FT_UFast; 185 | 186 | #endif 187 | 188 | 189 | /* determine whether we have a 64-bit integer type */ 190 | #if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT ) 191 | 192 | #define FT_INT64 long 193 | #define FT_UINT64 unsigned long 194 | 195 | #elif FT_SIZEOF_LONG_LONG >= ( 64 / FT_CHAR_BIT ) 196 | 197 | #define FT_INT64 long long int 198 | #define FT_UINT64 unsigned long long int 199 | 200 | /************************************************************************** 201 | * 202 | * A 64-bit data type may create compilation problems if you compile in 203 | * strict ANSI mode. To avoid them, we disable other 64-bit data types if 204 | * `__STDC__` is defined. You can however ignore this rule by defining the 205 | * `FT_CONFIG_OPTION_FORCE_INT64` configuration macro. 206 | */ 207 | #elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 ) 208 | 209 | #if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ 210 | 211 | /* this compiler provides the `__int64` type */ 212 | #define FT_INT64 __int64 213 | #define FT_UINT64 unsigned __int64 214 | 215 | #elif defined( __BORLANDC__ ) /* Borland C++ */ 216 | 217 | /* XXXX: We should probably check the value of `__BORLANDC__` in order */ 218 | /* to test the compiler version. */ 219 | 220 | /* this compiler provides the `__int64` type */ 221 | #define FT_INT64 __int64 222 | #define FT_UINT64 unsigned __int64 223 | 224 | #elif defined( __WATCOMC__ ) && __WATCOMC__ >= 1100 /* Watcom C++ */ 225 | 226 | #define FT_INT64 long long int 227 | #define FT_UINT64 unsigned long long int 228 | 229 | #elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ 230 | 231 | #define FT_INT64 long long int 232 | #define FT_UINT64 unsigned long long int 233 | 234 | #elif defined( __GNUC__ ) 235 | 236 | /* GCC provides the `long long` type */ 237 | #define FT_INT64 long long int 238 | #define FT_UINT64 unsigned long long int 239 | 240 | #endif /* !__STDC__ */ 241 | 242 | #endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ 243 | 244 | #ifdef FT_INT64 245 | typedef FT_INT64 FT_Int64; 246 | typedef FT_UINT64 FT_UInt64; 247 | #endif 248 | 249 | 250 | #endif /* FREETYPE_CONFIG_INTEGER_TYPES_H_ */ 251 | -------------------------------------------------------------------------------- /include/freetype/config/mac-support.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * config/mac-support.h 4 | * 5 | * Mac/OS X support configuration header. 6 | * 7 | * Copyright (C) 1996-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | #ifndef FREETYPE_CONFIG_MAC_SUPPORT_H_ 18 | #define FREETYPE_CONFIG_MAC_SUPPORT_H_ 19 | 20 | /************************************************************************** 21 | * 22 | * Mac support 23 | * 24 | * This is the only necessary change, so it is defined here instead 25 | * providing a new configuration file. 26 | */ 27 | #if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) 28 | /* No Carbon frameworks for 64bit 10.4.x. */ 29 | /* `AvailabilityMacros.h` is available since Mac OS X 10.2, */ 30 | /* so guess the system version by maximum errno before inclusion. */ 31 | #include 32 | #ifdef ECANCELED /* defined since 10.2 */ 33 | #include "AvailabilityMacros.h" 34 | #endif 35 | #if defined( __LP64__ ) && \ 36 | ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) 37 | #undef FT_MACINTOSH 38 | #endif 39 | 40 | #elif defined( __SC__ ) || defined( __MRC__ ) 41 | /* Classic MacOS compilers */ 42 | #include "ConditionalMacros.h" 43 | #if TARGET_OS_MAC 44 | #define FT_MACINTOSH 1 45 | #endif 46 | 47 | #endif /* Mac support */ 48 | 49 | #endif /* FREETYPE_CONFIG_MAC_SUPPORT_H_ */ 50 | -------------------------------------------------------------------------------- /include/freetype/config/public-macros.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * config/public-macros.h 4 | * 5 | * Define a set of compiler macros used in public FreeType headers. 6 | * 7 | * Copyright (C) 2020-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | /* 19 | * The definitions in this file are used by the public FreeType headers 20 | * and thus should be considered part of the public API. 21 | * 22 | * Other compiler-specific macro definitions that are not exposed by the 23 | * FreeType API should go into 24 | * `include/freetype/internal/compiler-macros.h` instead. 25 | */ 26 | #ifndef FREETYPE_CONFIG_PUBLIC_MACROS_H_ 27 | #define FREETYPE_CONFIG_PUBLIC_MACROS_H_ 28 | 29 | /* 30 | * `FT_BEGIN_HEADER` and `FT_END_HEADER` might have already been defined 31 | * by `freetype/config/ftheader.h`, but we don't want to include this 32 | * header here, so redefine the macros here only when needed. Their 33 | * definition is very stable, so keeping them in sync with the ones in the 34 | * header should not be a maintenance issue. 35 | */ 36 | #ifndef FT_BEGIN_HEADER 37 | #ifdef __cplusplus 38 | #define FT_BEGIN_HEADER extern "C" { 39 | #else 40 | #define FT_BEGIN_HEADER /* empty */ 41 | #endif 42 | #endif /* FT_BEGIN_HEADER */ 43 | 44 | #ifndef FT_END_HEADER 45 | #ifdef __cplusplus 46 | #define FT_END_HEADER } 47 | #else 48 | #define FT_END_HEADER /* empty */ 49 | #endif 50 | #endif /* FT_END_HEADER */ 51 | 52 | 53 | FT_BEGIN_HEADER 54 | 55 | /* 56 | * Mark a function declaration as public. This ensures it will be 57 | * properly exported to client code. Place this before a function 58 | * declaration. 59 | * 60 | * NOTE: This macro should be considered an internal implementation 61 | * detail, and not part of the FreeType API. It is only defined here 62 | * because it is needed by `FT_EXPORT`. 63 | */ 64 | 65 | /* Visual C, mingw */ 66 | #if defined( _WIN32 ) 67 | 68 | #if defined( FT2_BUILD_LIBRARY ) && defined( DLL_EXPORT ) 69 | #define FT_PUBLIC_FUNCTION_ATTRIBUTE __declspec( dllexport ) 70 | #elif defined( DLL_IMPORT ) 71 | #define FT_PUBLIC_FUNCTION_ATTRIBUTE __declspec( dllimport ) 72 | #endif 73 | 74 | /* gcc, clang */ 75 | #elif ( defined( __GNUC__ ) && __GNUC__ >= 4 ) || defined( __clang__ ) 76 | #define FT_PUBLIC_FUNCTION_ATTRIBUTE \ 77 | __attribute__(( visibility( "default" ) )) 78 | 79 | /* Sun */ 80 | #elif defined( __SUNPRO_C ) && __SUNPRO_C >= 0x550 81 | #define FT_PUBLIC_FUNCTION_ATTRIBUTE __global 82 | #endif 83 | 84 | 85 | #ifndef FT_PUBLIC_FUNCTION_ATTRIBUTE 86 | #define FT_PUBLIC_FUNCTION_ATTRIBUTE /* empty */ 87 | #endif 88 | 89 | 90 | /* 91 | * Define a public FreeType API function. This ensures it is properly 92 | * exported or imported at build time. The macro parameter is the 93 | * function's return type as in: 94 | * 95 | * FT_EXPORT( FT_Bool ) 96 | * FT_Object_Method( FT_Object obj, 97 | * ... ); 98 | * 99 | * NOTE: This requires that all `FT_EXPORT` uses are inside 100 | * `FT_BEGIN_HEADER ... FT_END_HEADER` blocks. This guarantees that the 101 | * functions are exported with C linkage, even when the header is included 102 | * by a C++ source file. 103 | */ 104 | #define FT_EXPORT( x ) FT_PUBLIC_FUNCTION_ATTRIBUTE extern x 105 | 106 | 107 | /* 108 | * `FT_UNUSED` indicates that a given parameter is not used -- this is 109 | * only used to get rid of unpleasant compiler warnings. 110 | * 111 | * Technically, this was not meant to be part of the public API, but some 112 | * third-party code depends on it. 113 | */ 114 | #ifndef FT_UNUSED 115 | #define FT_UNUSED( arg ) ( (arg) = (arg) ) 116 | #endif 117 | 118 | 119 | /* 120 | * Support for casts in both C and C++. 121 | */ 122 | #ifdef __cplusplus 123 | #define FT_STATIC_CAST( type, var ) static_cast(var) 124 | #define FT_REINTERPRET_CAST( type, var ) reinterpret_cast(var) 125 | 126 | #define FT_STATIC_BYTE_CAST( type, var ) \ 127 | static_cast( static_cast( var ) ) 128 | #else 129 | #define FT_STATIC_CAST( type, var ) (type)(var) 130 | #define FT_REINTERPRET_CAST( type, var ) (type)(var) 131 | 132 | #define FT_STATIC_BYTE_CAST( type, var ) (type)(unsigned char)(var) 133 | #endif 134 | 135 | 136 | FT_END_HEADER 137 | 138 | #endif /* FREETYPE_CONFIG_PUBLIC_MACROS_H_ */ 139 | -------------------------------------------------------------------------------- /include/freetype/ftadvanc.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftadvanc.h 4 | * 5 | * Quick computation of advance widths (specification only). 6 | * 7 | * Copyright (C) 2008-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTADVANC_H_ 20 | #define FTADVANC_H_ 21 | 22 | 23 | #include 24 | 25 | #ifdef FREETYPE_H 26 | #error "freetype.h of FreeType 1 has been loaded!" 27 | #error "Please fix the directory search order for header files" 28 | #error "so that freetype.h of FreeType 2 is found first." 29 | #endif 30 | 31 | 32 | FT_BEGIN_HEADER 33 | 34 | 35 | /************************************************************************** 36 | * 37 | * @section: 38 | * quick_advance 39 | * 40 | * @title: 41 | * Quick retrieval of advance values 42 | * 43 | * @abstract: 44 | * Retrieve horizontal and vertical advance values without processing 45 | * glyph outlines, if possible. 46 | * 47 | * @description: 48 | * This section contains functions to quickly extract advance values 49 | * without handling glyph outlines, if possible. 50 | * 51 | * @order: 52 | * FT_Get_Advance 53 | * FT_Get_Advances 54 | * 55 | */ 56 | 57 | 58 | /************************************************************************** 59 | * 60 | * @enum: 61 | * FT_ADVANCE_FLAG_FAST_ONLY 62 | * 63 | * @description: 64 | * A bit-flag to be OR-ed with the `flags` parameter of the 65 | * @FT_Get_Advance and @FT_Get_Advances functions. 66 | * 67 | * If set, it indicates that you want these functions to fail if the 68 | * corresponding hinting mode or font driver doesn't allow for very quick 69 | * advance computation. 70 | * 71 | * Typically, glyphs that are either unscaled, unhinted, bitmapped, or 72 | * light-hinted can have their advance width computed very quickly. 73 | * 74 | * Normal and bytecode hinted modes that require loading, scaling, and 75 | * hinting of the glyph outline, are extremely slow by comparison. 76 | */ 77 | #define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000L 78 | 79 | 80 | /************************************************************************** 81 | * 82 | * @function: 83 | * FT_Get_Advance 84 | * 85 | * @description: 86 | * Retrieve the advance value of a given glyph outline in an @FT_Face. 87 | * 88 | * @input: 89 | * face :: 90 | * The source @FT_Face handle. 91 | * 92 | * gindex :: 93 | * The glyph index. 94 | * 95 | * load_flags :: 96 | * A set of bit flags similar to those used when calling 97 | * @FT_Load_Glyph, used to determine what kind of advances you need. 98 | * 99 | * @output: 100 | * padvance :: 101 | * The advance value. If scaling is performed (based on the value of 102 | * `load_flags`), the advance value is in 16.16 format. Otherwise, it 103 | * is in font units. 104 | * 105 | * If @FT_LOAD_VERTICAL_LAYOUT is set, this is the vertical advance 106 | * corresponding to a vertical layout. Otherwise, it is the horizontal 107 | * advance in a horizontal layout. 108 | * 109 | * @return: 110 | * FreeType error code. 0 means success. 111 | * 112 | * @note: 113 | * This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and if 114 | * the corresponding font backend doesn't have a quick way to retrieve 115 | * the advances. 116 | * 117 | * A scaled advance is returned in 16.16 format but isn't transformed by 118 | * the affine transformation specified by @FT_Set_Transform. 119 | */ 120 | FT_EXPORT( FT_Error ) 121 | FT_Get_Advance( FT_Face face, 122 | FT_UInt gindex, 123 | FT_Int32 load_flags, 124 | FT_Fixed *padvance ); 125 | 126 | 127 | /************************************************************************** 128 | * 129 | * @function: 130 | * FT_Get_Advances 131 | * 132 | * @description: 133 | * Retrieve the advance values of several glyph outlines in an @FT_Face. 134 | * 135 | * @input: 136 | * face :: 137 | * The source @FT_Face handle. 138 | * 139 | * start :: 140 | * The first glyph index. 141 | * 142 | * count :: 143 | * The number of advance values you want to retrieve. 144 | * 145 | * load_flags :: 146 | * A set of bit flags similar to those used when calling 147 | * @FT_Load_Glyph. 148 | * 149 | * @output: 150 | * padvance :: 151 | * The advance values. This array, to be provided by the caller, must 152 | * contain at least `count` elements. 153 | * 154 | * If scaling is performed (based on the value of `load_flags`), the 155 | * advance values are in 16.16 format. Otherwise, they are in font 156 | * units. 157 | * 158 | * If @FT_LOAD_VERTICAL_LAYOUT is set, these are the vertical advances 159 | * corresponding to a vertical layout. Otherwise, they are the 160 | * horizontal advances in a horizontal layout. 161 | * 162 | * @return: 163 | * FreeType error code. 0 means success. 164 | * 165 | * @note: 166 | * This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and if 167 | * the corresponding font backend doesn't have a quick way to retrieve 168 | * the advances. 169 | * 170 | * Scaled advances are returned in 16.16 format but aren't transformed by 171 | * the affine transformation specified by @FT_Set_Transform. 172 | */ 173 | FT_EXPORT( FT_Error ) 174 | FT_Get_Advances( FT_Face face, 175 | FT_UInt start, 176 | FT_UInt count, 177 | FT_Int32 load_flags, 178 | FT_Fixed *padvances ); 179 | 180 | /* */ 181 | 182 | 183 | FT_END_HEADER 184 | 185 | #endif /* FTADVANC_H_ */ 186 | 187 | 188 | /* END */ 189 | -------------------------------------------------------------------------------- /include/freetype/ftbbox.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftbbox.h 4 | * 5 | * FreeType exact bbox computation (specification). 6 | * 7 | * Copyright (C) 1996-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This component has a _single_ role: to compute exact outline bounding 22 | * boxes. 23 | * 24 | * It is separated from the rest of the engine for various technical 25 | * reasons. It may well be integrated in 'ftoutln' later. 26 | * 27 | */ 28 | 29 | 30 | #ifndef FTBBOX_H_ 31 | #define FTBBOX_H_ 32 | 33 | 34 | #include 35 | 36 | #ifdef FREETYPE_H 37 | #error "freetype.h of FreeType 1 has been loaded!" 38 | #error "Please fix the directory search order for header files" 39 | #error "so that freetype.h of FreeType 2 is found first." 40 | #endif 41 | 42 | 43 | FT_BEGIN_HEADER 44 | 45 | 46 | /************************************************************************** 47 | * 48 | * @section: 49 | * outline_processing 50 | * 51 | */ 52 | 53 | 54 | /************************************************************************** 55 | * 56 | * @function: 57 | * FT_Outline_Get_BBox 58 | * 59 | * @description: 60 | * Compute the exact bounding box of an outline. This is slower than 61 | * computing the control box. However, it uses an advanced algorithm 62 | * that returns _very_ quickly when the two boxes coincide. Otherwise, 63 | * the outline Bezier arcs are traversed to extract their extrema. 64 | * 65 | * @input: 66 | * outline :: 67 | * A pointer to the source outline. 68 | * 69 | * @output: 70 | * abbox :: 71 | * The outline's exact bounding box. 72 | * 73 | * @return: 74 | * FreeType error code. 0~means success. 75 | * 76 | * @note: 77 | * If the font is tricky and the glyph has been loaded with 78 | * @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get 79 | * reasonable values for the BBox it is necessary to load the glyph at a 80 | * large ppem value (so that the hinting instructions can properly shift 81 | * and scale the subglyphs), then extracting the BBox, which can be 82 | * eventually converted back to font units. 83 | */ 84 | FT_EXPORT( FT_Error ) 85 | FT_Outline_Get_BBox( FT_Outline* outline, 86 | FT_BBox *abbox ); 87 | 88 | /* */ 89 | 90 | 91 | FT_END_HEADER 92 | 93 | #endif /* FTBBOX_H_ */ 94 | 95 | 96 | /* END */ 97 | 98 | 99 | /* Local Variables: */ 100 | /* coding: utf-8 */ 101 | /* End: */ 102 | -------------------------------------------------------------------------------- /include/freetype/ftbdf.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftbdf.h 4 | * 5 | * FreeType API for accessing BDF-specific strings (specification). 6 | * 7 | * Copyright (C) 2002-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTBDF_H_ 20 | #define FTBDF_H_ 21 | 22 | #include 23 | 24 | #ifdef FREETYPE_H 25 | #error "freetype.h of FreeType 1 has been loaded!" 26 | #error "Please fix the directory search order for header files" 27 | #error "so that freetype.h of FreeType 2 is found first." 28 | #endif 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | 34 | /************************************************************************** 35 | * 36 | * @section: 37 | * bdf_fonts 38 | * 39 | * @title: 40 | * BDF and PCF Files 41 | * 42 | * @abstract: 43 | * BDF and PCF specific API. 44 | * 45 | * @description: 46 | * This section contains the declaration of functions specific to BDF and 47 | * PCF fonts. 48 | * 49 | */ 50 | 51 | 52 | /************************************************************************** 53 | * 54 | * @enum: 55 | * BDF_PropertyType 56 | * 57 | * @description: 58 | * A list of BDF property types. 59 | * 60 | * @values: 61 | * BDF_PROPERTY_TYPE_NONE :: 62 | * Value~0 is used to indicate a missing property. 63 | * 64 | * BDF_PROPERTY_TYPE_ATOM :: 65 | * Property is a string atom. 66 | * 67 | * BDF_PROPERTY_TYPE_INTEGER :: 68 | * Property is a 32-bit signed integer. 69 | * 70 | * BDF_PROPERTY_TYPE_CARDINAL :: 71 | * Property is a 32-bit unsigned integer. 72 | */ 73 | typedef enum BDF_PropertyType_ 74 | { 75 | BDF_PROPERTY_TYPE_NONE = 0, 76 | BDF_PROPERTY_TYPE_ATOM = 1, 77 | BDF_PROPERTY_TYPE_INTEGER = 2, 78 | BDF_PROPERTY_TYPE_CARDINAL = 3 79 | 80 | } BDF_PropertyType; 81 | 82 | 83 | /************************************************************************** 84 | * 85 | * @type: 86 | * BDF_Property 87 | * 88 | * @description: 89 | * A handle to a @BDF_PropertyRec structure to model a given BDF/PCF 90 | * property. 91 | */ 92 | typedef struct BDF_PropertyRec_* BDF_Property; 93 | 94 | 95 | /************************************************************************** 96 | * 97 | * @struct: 98 | * BDF_PropertyRec 99 | * 100 | * @description: 101 | * This structure models a given BDF/PCF property. 102 | * 103 | * @fields: 104 | * type :: 105 | * The property type. 106 | * 107 | * u.atom :: 108 | * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. May be 109 | * `NULL`, indicating an empty string. 110 | * 111 | * u.integer :: 112 | * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER. 113 | * 114 | * u.cardinal :: 115 | * An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL. 116 | */ 117 | typedef struct BDF_PropertyRec_ 118 | { 119 | BDF_PropertyType type; 120 | union { 121 | const char* atom; 122 | FT_Int32 integer; 123 | FT_UInt32 cardinal; 124 | 125 | } u; 126 | 127 | } BDF_PropertyRec; 128 | 129 | 130 | /************************************************************************** 131 | * 132 | * @function: 133 | * FT_Get_BDF_Charset_ID 134 | * 135 | * @description: 136 | * Retrieve a BDF font character set identity, according to the BDF 137 | * specification. 138 | * 139 | * @input: 140 | * face :: 141 | * A handle to the input face. 142 | * 143 | * @output: 144 | * acharset_encoding :: 145 | * Charset encoding, as a C~string, owned by the face. 146 | * 147 | * acharset_registry :: 148 | * Charset registry, as a C~string, owned by the face. 149 | * 150 | * @return: 151 | * FreeType error code. 0~means success. 152 | * 153 | * @note: 154 | * This function only works with BDF faces, returning an error otherwise. 155 | */ 156 | FT_EXPORT( FT_Error ) 157 | FT_Get_BDF_Charset_ID( FT_Face face, 158 | const char* *acharset_encoding, 159 | const char* *acharset_registry ); 160 | 161 | 162 | /************************************************************************** 163 | * 164 | * @function: 165 | * FT_Get_BDF_Property 166 | * 167 | * @description: 168 | * Retrieve a BDF property from a BDF or PCF font file. 169 | * 170 | * @input: 171 | * face :: 172 | * A handle to the input face. 173 | * 174 | * name :: 175 | * The property name. 176 | * 177 | * @output: 178 | * aproperty :: 179 | * The property. 180 | * 181 | * @return: 182 | * FreeType error code. 0~means success. 183 | * 184 | * @note: 185 | * This function works with BDF _and_ PCF fonts. It returns an error 186 | * otherwise. It also returns an error if the property is not in the 187 | * font. 188 | * 189 | * A 'property' is a either key-value pair within the STARTPROPERTIES 190 | * ... ENDPROPERTIES block of a BDF font or a key-value pair from the 191 | * `info->props` array within a `FontRec` structure of a PCF font. 192 | * 193 | * Integer properties are always stored as 'signed' within PCF fonts; 194 | * consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value 195 | * for BDF fonts only. 196 | * 197 | * In case of error, `aproperty->type` is always set to 198 | * @BDF_PROPERTY_TYPE_NONE. 199 | */ 200 | FT_EXPORT( FT_Error ) 201 | FT_Get_BDF_Property( FT_Face face, 202 | const char* prop_name, 203 | BDF_PropertyRec *aproperty ); 204 | 205 | /* */ 206 | 207 | FT_END_HEADER 208 | 209 | #endif /* FTBDF_H_ */ 210 | 211 | 212 | /* END */ 213 | -------------------------------------------------------------------------------- /include/freetype/ftbitmap.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftbitmap.h 4 | * 5 | * FreeType utility functions for bitmaps (specification). 6 | * 7 | * Copyright (C) 2004-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTBITMAP_H_ 20 | #define FTBITMAP_H_ 21 | 22 | 23 | #include 24 | #include 25 | 26 | #ifdef FREETYPE_H 27 | #error "freetype.h of FreeType 1 has been loaded!" 28 | #error "Please fix the directory search order for header files" 29 | #error "so that freetype.h of FreeType 2 is found first." 30 | #endif 31 | 32 | 33 | FT_BEGIN_HEADER 34 | 35 | 36 | /************************************************************************** 37 | * 38 | * @section: 39 | * bitmap_handling 40 | * 41 | * @title: 42 | * Bitmap Handling 43 | * 44 | * @abstract: 45 | * Handling FT_Bitmap objects. 46 | * 47 | * @description: 48 | * This section contains functions for handling @FT_Bitmap objects, 49 | * automatically adjusting the target's bitmap buffer size as needed. 50 | * 51 | * Note that none of the functions changes the bitmap's 'flow' (as 52 | * indicated by the sign of the `pitch` field in @FT_Bitmap). 53 | * 54 | * To set the flow, assign an appropriate positive or negative value to 55 | * the `pitch` field of the target @FT_Bitmap object after calling 56 | * @FT_Bitmap_Init but before calling any of the other functions 57 | * described here. 58 | */ 59 | 60 | 61 | /************************************************************************** 62 | * 63 | * @function: 64 | * FT_Bitmap_Init 65 | * 66 | * @description: 67 | * Initialize a pointer to an @FT_Bitmap structure. 68 | * 69 | * @inout: 70 | * abitmap :: 71 | * A pointer to the bitmap structure. 72 | * 73 | * @note: 74 | * A deprecated name for the same function is `FT_Bitmap_New`. 75 | */ 76 | FT_EXPORT( void ) 77 | FT_Bitmap_Init( FT_Bitmap *abitmap ); 78 | 79 | 80 | /* deprecated */ 81 | FT_EXPORT( void ) 82 | FT_Bitmap_New( FT_Bitmap *abitmap ); 83 | 84 | 85 | /************************************************************************** 86 | * 87 | * @function: 88 | * FT_Bitmap_Copy 89 | * 90 | * @description: 91 | * Copy a bitmap into another one. 92 | * 93 | * @input: 94 | * library :: 95 | * A handle to a library object. 96 | * 97 | * source :: 98 | * A handle to the source bitmap. 99 | * 100 | * @output: 101 | * target :: 102 | * A handle to the target bitmap. 103 | * 104 | * @return: 105 | * FreeType error code. 0~means success. 106 | * 107 | * @note: 108 | * `source->buffer` and `target->buffer` must neither be equal nor 109 | * overlap. 110 | */ 111 | FT_EXPORT( FT_Error ) 112 | FT_Bitmap_Copy( FT_Library library, 113 | const FT_Bitmap *source, 114 | FT_Bitmap *target ); 115 | 116 | 117 | /************************************************************************** 118 | * 119 | * @function: 120 | * FT_Bitmap_Embolden 121 | * 122 | * @description: 123 | * Embolden a bitmap. The new bitmap will be about `xStrength` pixels 124 | * wider and `yStrength` pixels higher. The left and bottom borders are 125 | * kept unchanged. 126 | * 127 | * @input: 128 | * library :: 129 | * A handle to a library object. 130 | * 131 | * xStrength :: 132 | * How strong the glyph is emboldened horizontally. Expressed in 26.6 133 | * pixel format. 134 | * 135 | * yStrength :: 136 | * How strong the glyph is emboldened vertically. Expressed in 26.6 137 | * pixel format. 138 | * 139 | * @inout: 140 | * bitmap :: 141 | * A handle to the target bitmap. 142 | * 143 | * @return: 144 | * FreeType error code. 0~means success. 145 | * 146 | * @note: 147 | * The current implementation restricts `xStrength` to be less than or 148 | * equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. 149 | * 150 | * If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, you 151 | * should call @FT_GlyphSlot_Own_Bitmap on the slot first. 152 | * 153 | * Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format are 154 | * converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp). 155 | */ 156 | FT_EXPORT( FT_Error ) 157 | FT_Bitmap_Embolden( FT_Library library, 158 | FT_Bitmap* bitmap, 159 | FT_Pos xStrength, 160 | FT_Pos yStrength ); 161 | 162 | 163 | /************************************************************************** 164 | * 165 | * @function: 166 | * FT_Bitmap_Convert 167 | * 168 | * @description: 169 | * Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp to 170 | * a bitmap object with depth 8bpp, making the number of used bytes per 171 | * line (a.k.a. the 'pitch') a multiple of `alignment`. 172 | * 173 | * @input: 174 | * library :: 175 | * A handle to a library object. 176 | * 177 | * source :: 178 | * The source bitmap. 179 | * 180 | * alignment :: 181 | * The pitch of the bitmap is a multiple of this argument. Common 182 | * values are 1, 2, or 4. 183 | * 184 | * @output: 185 | * target :: 186 | * The target bitmap. 187 | * 188 | * @return: 189 | * FreeType error code. 0~means success. 190 | * 191 | * @note: 192 | * It is possible to call @FT_Bitmap_Convert multiple times without 193 | * calling @FT_Bitmap_Done (the memory is simply reallocated). 194 | * 195 | * Use @FT_Bitmap_Done to finally remove the bitmap object. 196 | * 197 | * The `library` argument is taken to have access to FreeType's memory 198 | * handling functions. 199 | * 200 | * `source->buffer` and `target->buffer` must neither be equal nor 201 | * overlap. 202 | */ 203 | FT_EXPORT( FT_Error ) 204 | FT_Bitmap_Convert( FT_Library library, 205 | const FT_Bitmap *source, 206 | FT_Bitmap *target, 207 | FT_Int alignment ); 208 | 209 | 210 | /************************************************************************** 211 | * 212 | * @function: 213 | * FT_Bitmap_Blend 214 | * 215 | * @description: 216 | * Blend a bitmap onto another bitmap, using a given color. 217 | * 218 | * @input: 219 | * library :: 220 | * A handle to a library object. 221 | * 222 | * source :: 223 | * The source bitmap, which can have any @FT_Pixel_Mode format. 224 | * 225 | * source_offset :: 226 | * The offset vector to the upper left corner of the source bitmap in 227 | * 26.6 pixel format. It should represent an integer offset; the 228 | * function will set the lowest six bits to zero to enforce that. 229 | * 230 | * color :: 231 | * The color used to draw `source` onto `target`. 232 | * 233 | * @inout: 234 | * target :: 235 | * A handle to an `FT_Bitmap` object. It should be either initialized 236 | * as empty with a call to @FT_Bitmap_Init, or it should be of type 237 | * @FT_PIXEL_MODE_BGRA. 238 | * 239 | * atarget_offset :: 240 | * The offset vector to the upper left corner of the target bitmap in 241 | * 26.6 pixel format. It should represent an integer offset; the 242 | * function will set the lowest six bits to zero to enforce that. 243 | * 244 | * @return: 245 | * FreeType error code. 0~means success. 246 | * 247 | * @note: 248 | * This function doesn't perform clipping. 249 | * 250 | * The bitmap in `target` gets allocated or reallocated as needed; the 251 | * vector `atarget_offset` is updated accordingly. 252 | * 253 | * In case of allocation or reallocation, the bitmap's pitch is set to 254 | * `4 * width`. Both `source` and `target` must have the same bitmap 255 | * flow (as indicated by the sign of the `pitch` field). 256 | * 257 | * `source->buffer` and `target->buffer` must neither be equal nor 258 | * overlap. 259 | * 260 | * @since: 261 | * 2.10 262 | */ 263 | FT_EXPORT( FT_Error ) 264 | FT_Bitmap_Blend( FT_Library library, 265 | const FT_Bitmap* source, 266 | const FT_Vector source_offset, 267 | FT_Bitmap* target, 268 | FT_Vector *atarget_offset, 269 | FT_Color color ); 270 | 271 | 272 | /************************************************************************** 273 | * 274 | * @function: 275 | * FT_GlyphSlot_Own_Bitmap 276 | * 277 | * @description: 278 | * Make sure that a glyph slot owns `slot->bitmap`. 279 | * 280 | * @input: 281 | * slot :: 282 | * The glyph slot. 283 | * 284 | * @return: 285 | * FreeType error code. 0~means success. 286 | * 287 | * @note: 288 | * This function is to be used in combination with @FT_Bitmap_Embolden. 289 | */ 290 | FT_EXPORT( FT_Error ) 291 | FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot ); 292 | 293 | 294 | /************************************************************************** 295 | * 296 | * @function: 297 | * FT_Bitmap_Done 298 | * 299 | * @description: 300 | * Destroy a bitmap object initialized with @FT_Bitmap_Init. 301 | * 302 | * @input: 303 | * library :: 304 | * A handle to a library object. 305 | * 306 | * bitmap :: 307 | * The bitmap object to be freed. 308 | * 309 | * @return: 310 | * FreeType error code. 0~means success. 311 | * 312 | * @note: 313 | * The `library` argument is taken to have access to FreeType's memory 314 | * handling functions. 315 | */ 316 | FT_EXPORT( FT_Error ) 317 | FT_Bitmap_Done( FT_Library library, 318 | FT_Bitmap *bitmap ); 319 | 320 | 321 | /* */ 322 | 323 | 324 | FT_END_HEADER 325 | 326 | #endif /* FTBITMAP_H_ */ 327 | 328 | 329 | /* END */ 330 | -------------------------------------------------------------------------------- /include/freetype/ftbzip2.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftbzip2.h 4 | * 5 | * Bzip2-compressed stream support. 6 | * 7 | * Copyright (C) 2010-2024 by 8 | * Joel Klinghed. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTBZIP2_H_ 20 | #define FTBZIP2_H_ 21 | 22 | #include 23 | 24 | #ifdef FREETYPE_H 25 | #error "freetype.h of FreeType 1 has been loaded!" 26 | #error "Please fix the directory search order for header files" 27 | #error "so that freetype.h of FreeType 2 is found first." 28 | #endif 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | /************************************************************************** 34 | * 35 | * @section: 36 | * bzip2 37 | * 38 | * @title: 39 | * BZIP2 Streams 40 | * 41 | * @abstract: 42 | * Using bzip2-compressed font files. 43 | * 44 | * @description: 45 | * In certain builds of the library, bzip2 compression recognition is 46 | * automatically handled when calling @FT_New_Face or @FT_Open_Face. 47 | * This means that if no font driver is capable of handling the raw 48 | * compressed file, the library will try to open a bzip2 compressed 49 | * stream from it and re-open the face with it. 50 | * 51 | * The stream implementation is very basic and resets the decompression 52 | * process each time seeking backwards is needed within the stream, 53 | * which significantly undermines the performance. 54 | * 55 | * This section contains the declaration of Bzip2-specific functions. 56 | * 57 | */ 58 | 59 | 60 | /************************************************************************** 61 | * 62 | * @function: 63 | * FT_Stream_OpenBzip2 64 | * 65 | * @description: 66 | * Open a new stream to parse bzip2-compressed font files. This is 67 | * mainly used to support the compressed `*.pcf.bz2` fonts that come with 68 | * XFree86. 69 | * 70 | * @input: 71 | * stream :: 72 | * The target embedding stream. 73 | * 74 | * source :: 75 | * The source stream. 76 | * 77 | * @return: 78 | * FreeType error code. 0~means success. 79 | * 80 | * @note: 81 | * The source stream must be opened _before_ calling this function. 82 | * 83 | * Calling the internal function `FT_Stream_Close` on the new stream will 84 | * **not** call `FT_Stream_Close` on the source stream. None of the 85 | * stream objects will be released to the heap. 86 | * 87 | * This function may return `FT_Err_Unimplemented_Feature` if your build 88 | * of FreeType was not compiled with bzip2 support. 89 | */ 90 | FT_EXPORT( FT_Error ) 91 | FT_Stream_OpenBzip2( FT_Stream stream, 92 | FT_Stream source ); 93 | 94 | /* */ 95 | 96 | 97 | FT_END_HEADER 98 | 99 | #endif /* FTBZIP2_H_ */ 100 | 101 | 102 | /* END */ 103 | -------------------------------------------------------------------------------- /include/freetype/ftchapters.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * This file defines the structure of the FreeType reference. 4 | * It is used by the python script that generates the HTML files. 5 | * 6 | */ 7 | 8 | 9 | /************************************************************************** 10 | * 11 | * @chapter: 12 | * general_remarks 13 | * 14 | * @title: 15 | * General Remarks 16 | * 17 | * @sections: 18 | * preamble 19 | * header_inclusion 20 | * user_allocation 21 | * 22 | */ 23 | 24 | 25 | /************************************************************************** 26 | * 27 | * @chapter: 28 | * core_api 29 | * 30 | * @title: 31 | * Core API 32 | * 33 | * @sections: 34 | * basic_types 35 | * library_setup 36 | * face_creation 37 | * font_testing_macros 38 | * sizing_and_scaling 39 | * glyph_retrieval 40 | * character_mapping 41 | * information_retrieval 42 | * other_api_data 43 | * 44 | */ 45 | 46 | 47 | /************************************************************************** 48 | * 49 | * @chapter: 50 | * extended_api 51 | * 52 | * @title: 53 | * Extended API 54 | * 55 | * @sections: 56 | * glyph_variants 57 | * color_management 58 | * layer_management 59 | * glyph_management 60 | * mac_specific 61 | * sizes_management 62 | * header_file_macros 63 | * 64 | */ 65 | 66 | 67 | /************************************************************************** 68 | * 69 | * @chapter: 70 | * format_specific 71 | * 72 | * @title: 73 | * Format-Specific API 74 | * 75 | * @sections: 76 | * multiple_masters 77 | * truetype_tables 78 | * type1_tables 79 | * sfnt_names 80 | * bdf_fonts 81 | * cid_fonts 82 | * pfr_fonts 83 | * winfnt_fonts 84 | * svg_fonts 85 | * font_formats 86 | * gasp_table 87 | * 88 | */ 89 | 90 | 91 | /************************************************************************** 92 | * 93 | * @chapter: 94 | * module_specific 95 | * 96 | * @title: 97 | * Controlling FreeType Modules 98 | * 99 | * @sections: 100 | * auto_hinter 101 | * cff_driver 102 | * t1_cid_driver 103 | * tt_driver 104 | * pcf_driver 105 | * ot_svg_driver 106 | * properties 107 | * parameter_tags 108 | * lcd_rendering 109 | * 110 | */ 111 | 112 | 113 | /************************************************************************** 114 | * 115 | * @chapter: 116 | * cache_subsystem 117 | * 118 | * @title: 119 | * Cache Sub-System 120 | * 121 | * @sections: 122 | * cache_subsystem 123 | * 124 | */ 125 | 126 | 127 | /************************************************************************** 128 | * 129 | * @chapter: 130 | * support_api 131 | * 132 | * @title: 133 | * Support API 134 | * 135 | * @sections: 136 | * computations 137 | * list_processing 138 | * outline_processing 139 | * quick_advance 140 | * bitmap_handling 141 | * raster 142 | * glyph_stroker 143 | * system_interface 144 | * module_management 145 | * gzip 146 | * lzw 147 | * bzip2 148 | * debugging_apis 149 | * 150 | */ 151 | 152 | 153 | /************************************************************************** 154 | * 155 | * @chapter: 156 | * error_codes 157 | * 158 | * @title: 159 | * Error Codes 160 | * 161 | * @sections: 162 | * error_enumerations 163 | * error_code_values 164 | * 165 | */ 166 | 167 | 168 | /* END */ 169 | -------------------------------------------------------------------------------- /include/freetype/ftcid.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftcid.h 4 | * 5 | * FreeType API for accessing CID font information (specification). 6 | * 7 | * Copyright (C) 2007-2024 by 8 | * Dereg Clegg and Michael Toftdal. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTCID_H_ 20 | #define FTCID_H_ 21 | 22 | #include 23 | 24 | #ifdef FREETYPE_H 25 | #error "freetype.h of FreeType 1 has been loaded!" 26 | #error "Please fix the directory search order for header files" 27 | #error "so that freetype.h of FreeType 2 is found first." 28 | #endif 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | 34 | /************************************************************************** 35 | * 36 | * @section: 37 | * cid_fonts 38 | * 39 | * @title: 40 | * CID Fonts 41 | * 42 | * @abstract: 43 | * CID-keyed font-specific API. 44 | * 45 | * @description: 46 | * This section contains the declaration of CID-keyed font-specific 47 | * functions. 48 | * 49 | */ 50 | 51 | 52 | /************************************************************************** 53 | * 54 | * @function: 55 | * FT_Get_CID_Registry_Ordering_Supplement 56 | * 57 | * @description: 58 | * Retrieve the Registry/Ordering/Supplement triple (also known as the 59 | * "R/O/S") from a CID-keyed font. 60 | * 61 | * @input: 62 | * face :: 63 | * A handle to the input face. 64 | * 65 | * @output: 66 | * registry :: 67 | * The registry, as a C~string, owned by the face. 68 | * 69 | * ordering :: 70 | * The ordering, as a C~string, owned by the face. 71 | * 72 | * supplement :: 73 | * The supplement. 74 | * 75 | * @return: 76 | * FreeType error code. 0~means success. 77 | * 78 | * @note: 79 | * This function only works with CID faces, returning an error 80 | * otherwise. 81 | * 82 | * @since: 83 | * 2.3.6 84 | */ 85 | FT_EXPORT( FT_Error ) 86 | FT_Get_CID_Registry_Ordering_Supplement( FT_Face face, 87 | const char* *registry, 88 | const char* *ordering, 89 | FT_Int *supplement ); 90 | 91 | 92 | /************************************************************************** 93 | * 94 | * @function: 95 | * FT_Get_CID_Is_Internally_CID_Keyed 96 | * 97 | * @description: 98 | * Retrieve the type of the input face, CID keyed or not. In contrast 99 | * to the @FT_IS_CID_KEYED macro this function returns successfully also 100 | * for CID-keyed fonts in an SFNT wrapper. 101 | * 102 | * @input: 103 | * face :: 104 | * A handle to the input face. 105 | * 106 | * @output: 107 | * is_cid :: 108 | * The type of the face as an @FT_Bool. 109 | * 110 | * @return: 111 | * FreeType error code. 0~means success. 112 | * 113 | * @note: 114 | * This function only works with CID faces and OpenType fonts, returning 115 | * an error otherwise. 116 | * 117 | * @since: 118 | * 2.3.9 119 | */ 120 | FT_EXPORT( FT_Error ) 121 | FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face, 122 | FT_Bool *is_cid ); 123 | 124 | 125 | /************************************************************************** 126 | * 127 | * @function: 128 | * FT_Get_CID_From_Glyph_Index 129 | * 130 | * @description: 131 | * Retrieve the CID of the input glyph index. 132 | * 133 | * @input: 134 | * face :: 135 | * A handle to the input face. 136 | * 137 | * glyph_index :: 138 | * The input glyph index. 139 | * 140 | * @output: 141 | * cid :: 142 | * The CID as an @FT_UInt. 143 | * 144 | * @return: 145 | * FreeType error code. 0~means success. 146 | * 147 | * @note: 148 | * This function only works with CID faces and OpenType fonts, returning 149 | * an error otherwise. 150 | * 151 | * @since: 152 | * 2.3.9 153 | */ 154 | FT_EXPORT( FT_Error ) 155 | FT_Get_CID_From_Glyph_Index( FT_Face face, 156 | FT_UInt glyph_index, 157 | FT_UInt *cid ); 158 | 159 | /* */ 160 | 161 | 162 | FT_END_HEADER 163 | 164 | #endif /* FTCID_H_ */ 165 | 166 | 167 | /* END */ 168 | -------------------------------------------------------------------------------- /include/freetype/fterrors.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * fterrors.h 4 | * 5 | * FreeType error code handling (specification). 6 | * 7 | * Copyright (C) 1996-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * @section: 22 | * error_enumerations 23 | * 24 | * @title: 25 | * Error Enumerations 26 | * 27 | * @abstract: 28 | * How to handle errors and error strings. 29 | * 30 | * @description: 31 | * The header file `fterrors.h` (which is automatically included by 32 | * `freetype.h`) defines the handling of FreeType's enumeration 33 | * constants. It can also be used to generate error message strings 34 | * with a small macro trick explained below. 35 | * 36 | * **Error Formats** 37 | * 38 | * The configuration macro `FT_CONFIG_OPTION_USE_MODULE_ERRORS` can be 39 | * defined in `ftoption.h` in order to make the higher byte indicate the 40 | * module where the error has happened (this is not compatible with 41 | * standard builds of FreeType~2, however). See the file `ftmoderr.h` 42 | * for more details. 43 | * 44 | * **Error Message Strings** 45 | * 46 | * Error definitions are set up with special macros that allow client 47 | * applications to build a table of error message strings. The strings 48 | * are not included in a normal build of FreeType~2 to save space (most 49 | * client applications do not use them). 50 | * 51 | * To do so, you have to define the following macros before including 52 | * this file. 53 | * 54 | * ``` 55 | * FT_ERROR_START_LIST 56 | * ``` 57 | * 58 | * This macro is called before anything else to define the start of the 59 | * error list. It is followed by several `FT_ERROR_DEF` calls. 60 | * 61 | * ``` 62 | * FT_ERROR_DEF( e, v, s ) 63 | * ``` 64 | * 65 | * This macro is called to define one single error. 'e' is the error 66 | * code identifier (e.g., `Invalid_Argument`), 'v' is the error's 67 | * numerical value, and 's' is the corresponding error string. 68 | * 69 | * ``` 70 | * FT_ERROR_END_LIST 71 | * ``` 72 | * 73 | * This macro ends the list. 74 | * 75 | * Additionally, you have to undefine `FTERRORS_H_` before #including 76 | * this file. 77 | * 78 | * Here is a simple example. 79 | * 80 | * ``` 81 | * #undef FTERRORS_H_ 82 | * #define FT_ERRORDEF( e, v, s ) { e, s }, 83 | * #define FT_ERROR_START_LIST { 84 | * #define FT_ERROR_END_LIST { 0, NULL } }; 85 | * 86 | * const struct 87 | * { 88 | * int err_code; 89 | * const char* err_msg; 90 | * } ft_errors[] = 91 | * 92 | * #include 93 | * ``` 94 | * 95 | * An alternative to using an array is a switch statement. 96 | * 97 | * ``` 98 | * #undef FTERRORS_H_ 99 | * #define FT_ERROR_START_LIST switch ( error_code ) { 100 | * #define FT_ERRORDEF( e, v, s ) case v: return s; 101 | * #define FT_ERROR_END_LIST } 102 | * ``` 103 | * 104 | * If you use `FT_CONFIG_OPTION_USE_MODULE_ERRORS`, `error_code` should 105 | * be replaced with `FT_ERROR_BASE(error_code)` in the last example. 106 | */ 107 | 108 | /* */ 109 | 110 | /* In previous FreeType versions we used `__FTERRORS_H__`. However, */ 111 | /* using two successive underscores in a non-system symbol name */ 112 | /* violates the C (and C++) standard, so it was changed to the */ 113 | /* current form. In spite of this, we have to make */ 114 | /* */ 115 | /* ``` */ 116 | /* #undefine __FTERRORS_H__ */ 117 | /* ``` */ 118 | /* */ 119 | /* work for backward compatibility. */ 120 | /* */ 121 | #if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) ) 122 | #define FTERRORS_H_ 123 | #define __FTERRORS_H__ 124 | 125 | 126 | /* include module base error codes */ 127 | #include 128 | 129 | 130 | /*******************************************************************/ 131 | /*******************************************************************/ 132 | /***** *****/ 133 | /***** SETUP MACROS *****/ 134 | /***** *****/ 135 | /*******************************************************************/ 136 | /*******************************************************************/ 137 | 138 | 139 | #undef FT_NEED_EXTERN_C 140 | 141 | 142 | /* FT_ERR_PREFIX is used as a prefix for error identifiers. */ 143 | /* By default, we use `FT_Err_`. */ 144 | /* */ 145 | #ifndef FT_ERR_PREFIX 146 | #define FT_ERR_PREFIX FT_Err_ 147 | #endif 148 | 149 | 150 | /* FT_ERR_BASE is used as the base for module-specific errors. */ 151 | /* */ 152 | #ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS 153 | 154 | #ifndef FT_ERR_BASE 155 | #define FT_ERR_BASE FT_Mod_Err_Base 156 | #endif 157 | 158 | #else 159 | 160 | #undef FT_ERR_BASE 161 | #define FT_ERR_BASE 0 162 | 163 | #endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */ 164 | 165 | 166 | /* If FT_ERRORDEF is not defined, we need to define a simple */ 167 | /* enumeration type. */ 168 | /* */ 169 | #ifndef FT_ERRORDEF 170 | 171 | #define FT_INCLUDE_ERR_PROTOS 172 | 173 | #define FT_ERRORDEF( e, v, s ) e = v, 174 | #define FT_ERROR_START_LIST enum { 175 | #define FT_ERROR_END_LIST FT_ERR_CAT( FT_ERR_PREFIX, Max ) }; 176 | 177 | #ifdef __cplusplus 178 | #define FT_NEED_EXTERN_C 179 | extern "C" { 180 | #endif 181 | 182 | #endif /* !FT_ERRORDEF */ 183 | 184 | 185 | /* this macro is used to define an error */ 186 | #define FT_ERRORDEF_( e, v, s ) \ 187 | FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s ) 188 | 189 | /* this is only used for _Err_Ok, which must be 0! */ 190 | #define FT_NOERRORDEF_( e, v, s ) \ 191 | FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s ) 192 | 193 | 194 | #ifdef FT_ERROR_START_LIST 195 | FT_ERROR_START_LIST 196 | #endif 197 | 198 | 199 | /* now include the error codes */ 200 | #include 201 | 202 | 203 | #ifdef FT_ERROR_END_LIST 204 | FT_ERROR_END_LIST 205 | #endif 206 | 207 | 208 | /*******************************************************************/ 209 | /*******************************************************************/ 210 | /***** *****/ 211 | /***** SIMPLE CLEANUP *****/ 212 | /***** *****/ 213 | /*******************************************************************/ 214 | /*******************************************************************/ 215 | 216 | #ifdef FT_NEED_EXTERN_C 217 | } 218 | #endif 219 | 220 | #undef FT_ERROR_START_LIST 221 | #undef FT_ERROR_END_LIST 222 | 223 | #undef FT_ERRORDEF 224 | #undef FT_ERRORDEF_ 225 | #undef FT_NOERRORDEF_ 226 | 227 | #undef FT_NEED_EXTERN_C 228 | #undef FT_ERR_BASE 229 | 230 | /* FT_ERR_PREFIX is needed internally */ 231 | #ifndef FT2_BUILD_LIBRARY 232 | #undef FT_ERR_PREFIX 233 | #endif 234 | 235 | /* FT_INCLUDE_ERR_PROTOS: Control whether function prototypes should be */ 236 | /* included with */ 237 | /* */ 238 | /* #include */ 239 | /* */ 240 | /* This is only true where `FT_ERRORDEF` is */ 241 | /* undefined. */ 242 | /* */ 243 | /* FT_ERR_PROTOS_DEFINED: Actual multiple-inclusion protection of */ 244 | /* `fterrors.h`. */ 245 | #ifdef FT_INCLUDE_ERR_PROTOS 246 | #undef FT_INCLUDE_ERR_PROTOS 247 | 248 | #ifndef FT_ERR_PROTOS_DEFINED 249 | #define FT_ERR_PROTOS_DEFINED 250 | 251 | 252 | FT_BEGIN_HEADER 253 | 254 | /************************************************************************** 255 | * 256 | * @function: 257 | * FT_Error_String 258 | * 259 | * @description: 260 | * Retrieve the description of a valid FreeType error code. 261 | * 262 | * @input: 263 | * error_code :: 264 | * A valid FreeType error code. 265 | * 266 | * @return: 267 | * A C~string or `NULL`, if any error occurred. 268 | * 269 | * @note: 270 | * FreeType has to be compiled with `FT_CONFIG_OPTION_ERROR_STRINGS` or 271 | * `FT_DEBUG_LEVEL_ERROR` to get meaningful descriptions. 272 | * 'error_string' will be `NULL` otherwise. 273 | * 274 | * Module identification will be ignored: 275 | * 276 | * ```c 277 | * strcmp( FT_Error_String( FT_Err_Unknown_File_Format ), 278 | * FT_Error_String( BDF_Err_Unknown_File_Format ) ) == 0; 279 | * ``` 280 | */ 281 | FT_EXPORT( const char* ) 282 | FT_Error_String( FT_Error error_code ); 283 | 284 | /* */ 285 | 286 | FT_END_HEADER 287 | 288 | 289 | #endif /* FT_ERR_PROTOS_DEFINED */ 290 | 291 | #endif /* FT_INCLUDE_ERR_PROTOS */ 292 | 293 | #endif /* !(FTERRORS_H_ && __FTERRORS_H__) */ 294 | 295 | 296 | /* END */ 297 | -------------------------------------------------------------------------------- /include/freetype/ftfntfmt.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftfntfmt.h 4 | * 5 | * Support functions for font formats. 6 | * 7 | * Copyright (C) 2002-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTFNTFMT_H_ 20 | #define FTFNTFMT_H_ 21 | 22 | #include 23 | 24 | #ifdef FREETYPE_H 25 | #error "freetype.h of FreeType 1 has been loaded!" 26 | #error "Please fix the directory search order for header files" 27 | #error "so that freetype.h of FreeType 2 is found first." 28 | #endif 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | 34 | /************************************************************************** 35 | * 36 | * @section: 37 | * font_formats 38 | * 39 | * @title: 40 | * Font Formats 41 | * 42 | * @abstract: 43 | * Getting the font format. 44 | * 45 | * @description: 46 | * The single function in this section can be used to get the font format. 47 | * Note that this information is not needed normally; however, there are 48 | * special cases (like in PDF devices) where it is important to 49 | * differentiate, in spite of FreeType's uniform API. 50 | * 51 | */ 52 | 53 | 54 | /************************************************************************** 55 | * 56 | * @function: 57 | * FT_Get_Font_Format 58 | * 59 | * @description: 60 | * Return a string describing the format of a given face. Possible values 61 | * are 'TrueType', 'Type~1', 'BDF', 'PCF', 'Type~42', 'CID~Type~1', 'CFF', 62 | * 'PFR', and 'Windows~FNT'. 63 | * 64 | * The return value is suitable to be used as an X11 FONT_PROPERTY. 65 | * 66 | * @input: 67 | * face :: 68 | * Input face handle. 69 | * 70 | * @return: 71 | * Font format string. `NULL` in case of error. 72 | * 73 | * @note: 74 | * A deprecated name for the same function is `FT_Get_X11_Font_Format`. 75 | */ 76 | FT_EXPORT( const char* ) 77 | FT_Get_Font_Format( FT_Face face ); 78 | 79 | 80 | /* deprecated */ 81 | FT_EXPORT( const char* ) 82 | FT_Get_X11_Font_Format( FT_Face face ); 83 | 84 | 85 | /* */ 86 | 87 | 88 | FT_END_HEADER 89 | 90 | #endif /* FTFNTFMT_H_ */ 91 | 92 | 93 | /* END */ 94 | -------------------------------------------------------------------------------- /include/freetype/ftgasp.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftgasp.h 4 | * 5 | * Access of TrueType's 'gasp' table (specification). 6 | * 7 | * Copyright (C) 2007-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTGASP_H_ 20 | #define FTGASP_H_ 21 | 22 | #include 23 | 24 | #ifdef FREETYPE_H 25 | #error "freetype.h of FreeType 1 has been loaded!" 26 | #error "Please fix the directory search order for header files" 27 | #error "so that freetype.h of FreeType 2 is found first." 28 | #endif 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | 34 | /************************************************************************** 35 | * 36 | * @section: 37 | * gasp_table 38 | * 39 | * @title: 40 | * Gasp Table 41 | * 42 | * @abstract: 43 | * Retrieving TrueType 'gasp' table entries. 44 | * 45 | * @description: 46 | * The function @FT_Get_Gasp can be used to query a TrueType or OpenType 47 | * font for specific entries in its 'gasp' table, if any. This is mainly 48 | * useful when implementing native TrueType hinting with the bytecode 49 | * interpreter to duplicate the Windows text rendering results. 50 | */ 51 | 52 | /************************************************************************** 53 | * 54 | * @enum: 55 | * FT_GASP_XXX 56 | * 57 | * @description: 58 | * A list of values and/or bit-flags returned by the @FT_Get_Gasp 59 | * function. 60 | * 61 | * @values: 62 | * FT_GASP_NO_TABLE :: 63 | * This special value means that there is no GASP table in this face. 64 | * It is up to the client to decide what to do. 65 | * 66 | * FT_GASP_DO_GRIDFIT :: 67 | * Grid-fitting and hinting should be performed at the specified ppem. 68 | * This **really** means TrueType bytecode interpretation. If this bit 69 | * is not set, no hinting gets applied. 70 | * 71 | * FT_GASP_DO_GRAY :: 72 | * Anti-aliased rendering should be performed at the specified ppem. 73 | * If not set, do monochrome rendering. 74 | * 75 | * FT_GASP_SYMMETRIC_SMOOTHING :: 76 | * If set, smoothing along multiple axes must be used with ClearType. 77 | * 78 | * FT_GASP_SYMMETRIC_GRIDFIT :: 79 | * Grid-fitting must be used with ClearType's symmetric smoothing. 80 | * 81 | * @note: 82 | * The bit-flags `FT_GASP_DO_GRIDFIT` and `FT_GASP_DO_GRAY` are to be 83 | * used for standard font rasterization only. Independently of that, 84 | * `FT_GASP_SYMMETRIC_SMOOTHING` and `FT_GASP_SYMMETRIC_GRIDFIT` are to 85 | * be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT` and 86 | * `FT_GASP_DO_GRAY` are consequently ignored). 87 | * 88 | * 'ClearType' is Microsoft's implementation of LCD rendering, partly 89 | * protected by patents. 90 | * 91 | * @since: 92 | * 2.3.0 93 | */ 94 | #define FT_GASP_NO_TABLE -1 95 | #define FT_GASP_DO_GRIDFIT 0x01 96 | #define FT_GASP_DO_GRAY 0x02 97 | #define FT_GASP_SYMMETRIC_GRIDFIT 0x04 98 | #define FT_GASP_SYMMETRIC_SMOOTHING 0x08 99 | 100 | 101 | /************************************************************************** 102 | * 103 | * @function: 104 | * FT_Get_Gasp 105 | * 106 | * @description: 107 | * For a TrueType or OpenType font file, return the rasterizer behaviour 108 | * flags from the font's 'gasp' table corresponding to a given character 109 | * pixel size. 110 | * 111 | * @input: 112 | * face :: 113 | * The source face handle. 114 | * 115 | * ppem :: 116 | * The vertical character pixel size. 117 | * 118 | * @return: 119 | * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no 120 | * 'gasp' table in the face. 121 | * 122 | * @note: 123 | * If you want to use the MM functionality of OpenType variation fonts 124 | * (i.e., using @FT_Set_Var_Design_Coordinates and friends), call this 125 | * function **after** setting an instance since the return values can 126 | * change. 127 | * 128 | * @since: 129 | * 2.3.0 130 | */ 131 | FT_EXPORT( FT_Int ) 132 | FT_Get_Gasp( FT_Face face, 133 | FT_UInt ppem ); 134 | 135 | /* */ 136 | 137 | 138 | FT_END_HEADER 139 | 140 | #endif /* FTGASP_H_ */ 141 | 142 | 143 | /* END */ 144 | -------------------------------------------------------------------------------- /include/freetype/ftgzip.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftgzip.h 4 | * 5 | * Gzip-compressed stream support. 6 | * 7 | * Copyright (C) 2002-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTGZIP_H_ 20 | #define FTGZIP_H_ 21 | 22 | #include 23 | 24 | #ifdef FREETYPE_H 25 | #error "freetype.h of FreeType 1 has been loaded!" 26 | #error "Please fix the directory search order for header files" 27 | #error "so that freetype.h of FreeType 2 is found first." 28 | #endif 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | /************************************************************************** 34 | * 35 | * @section: 36 | * gzip 37 | * 38 | * @title: 39 | * GZIP Streams 40 | * 41 | * @abstract: 42 | * Using gzip-compressed font files. 43 | * 44 | * @description: 45 | * In certain builds of the library, gzip compression recognition is 46 | * automatically handled when calling @FT_New_Face or @FT_Open_Face. 47 | * This means that if no font driver is capable of handling the raw 48 | * compressed file, the library will try to open a gzipped stream from it 49 | * and re-open the face with it. 50 | * 51 | * The stream implementation is very basic and resets the decompression 52 | * process each time seeking backwards is needed within the stream, 53 | * which significantly undermines the performance. 54 | * 55 | * This section contains the declaration of Gzip-specific functions. 56 | * 57 | */ 58 | 59 | 60 | /************************************************************************** 61 | * 62 | * @function: 63 | * FT_Stream_OpenGzip 64 | * 65 | * @description: 66 | * Open a new stream to parse gzip-compressed font files. This is mainly 67 | * used to support the compressed `*.pcf.gz` fonts that come with 68 | * XFree86. 69 | * 70 | * @input: 71 | * stream :: 72 | * The target embedding stream. 73 | * 74 | * source :: 75 | * The source stream. 76 | * 77 | * @return: 78 | * FreeType error code. 0~means success. 79 | * 80 | * @note: 81 | * The source stream must be opened _before_ calling this function. 82 | * 83 | * Calling the internal function `FT_Stream_Close` on the new stream will 84 | * **not** call `FT_Stream_Close` on the source stream. None of the 85 | * stream objects will be released to the heap. 86 | * 87 | * This function may return `FT_Err_Unimplemented_Feature` if your build 88 | * of FreeType was not compiled with zlib support. 89 | */ 90 | FT_EXPORT( FT_Error ) 91 | FT_Stream_OpenGzip( FT_Stream stream, 92 | FT_Stream source ); 93 | 94 | 95 | /************************************************************************** 96 | * 97 | * @function: 98 | * FT_Gzip_Uncompress 99 | * 100 | * @description: 101 | * Decompress a zipped input buffer into an output buffer. This function 102 | * is modeled after zlib's `uncompress` function. 103 | * 104 | * @input: 105 | * memory :: 106 | * A FreeType memory handle. 107 | * 108 | * input :: 109 | * The input buffer. 110 | * 111 | * input_len :: 112 | * The length of the input buffer. 113 | * 114 | * @output: 115 | * output :: 116 | * The output buffer. 117 | * 118 | * @inout: 119 | * output_len :: 120 | * Before calling the function, this is the total size of the output 121 | * buffer, which must be large enough to hold the entire uncompressed 122 | * data (so the size of the uncompressed data must be known in 123 | * advance). After calling the function, `output_len` is the size of 124 | * the used data in `output`. 125 | * 126 | * @return: 127 | * FreeType error code. 0~means success. 128 | * 129 | * @note: 130 | * This function may return `FT_Err_Unimplemented_Feature` if your build 131 | * of FreeType was not compiled with zlib support. 132 | * 133 | * @since: 134 | * 2.5.1 135 | */ 136 | FT_EXPORT( FT_Error ) 137 | FT_Gzip_Uncompress( FT_Memory memory, 138 | FT_Byte* output, 139 | FT_ULong* output_len, 140 | const FT_Byte* input, 141 | FT_ULong input_len ); 142 | 143 | /* */ 144 | 145 | 146 | FT_END_HEADER 147 | 148 | #endif /* FTGZIP_H_ */ 149 | 150 | 151 | /* END */ 152 | -------------------------------------------------------------------------------- /include/freetype/ftlist.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftlist.h 4 | * 5 | * Generic list support for FreeType (specification). 6 | * 7 | * Copyright (C) 1996-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This file implements functions relative to list processing. Its data 22 | * structures are defined in `freetype.h`. 23 | * 24 | */ 25 | 26 | 27 | #ifndef FTLIST_H_ 28 | #define FTLIST_H_ 29 | 30 | 31 | #include 32 | 33 | #ifdef FREETYPE_H 34 | #error "freetype.h of FreeType 1 has been loaded!" 35 | #error "Please fix the directory search order for header files" 36 | #error "so that freetype.h of FreeType 2 is found first." 37 | #endif 38 | 39 | 40 | FT_BEGIN_HEADER 41 | 42 | 43 | /************************************************************************** 44 | * 45 | * @section: 46 | * list_processing 47 | * 48 | * @title: 49 | * List Processing 50 | * 51 | * @abstract: 52 | * Simple management of lists. 53 | * 54 | * @description: 55 | * This section contains various definitions related to list processing 56 | * using doubly-linked nodes. 57 | * 58 | * @order: 59 | * FT_List 60 | * FT_ListNode 61 | * FT_ListRec 62 | * FT_ListNodeRec 63 | * 64 | * FT_List_Add 65 | * FT_List_Insert 66 | * FT_List_Find 67 | * FT_List_Remove 68 | * FT_List_Up 69 | * FT_List_Iterate 70 | * FT_List_Iterator 71 | * FT_List_Finalize 72 | * FT_List_Destructor 73 | * 74 | */ 75 | 76 | 77 | /************************************************************************** 78 | * 79 | * @function: 80 | * FT_List_Find 81 | * 82 | * @description: 83 | * Find the list node for a given listed object. 84 | * 85 | * @input: 86 | * list :: 87 | * A pointer to the parent list. 88 | * data :: 89 | * The address of the listed object. 90 | * 91 | * @return: 92 | * List node. `NULL` if it wasn't found. 93 | */ 94 | FT_EXPORT( FT_ListNode ) 95 | FT_List_Find( FT_List list, 96 | void* data ); 97 | 98 | 99 | /************************************************************************** 100 | * 101 | * @function: 102 | * FT_List_Add 103 | * 104 | * @description: 105 | * Append an element to the end of a list. 106 | * 107 | * @inout: 108 | * list :: 109 | * A pointer to the parent list. 110 | * node :: 111 | * The node to append. 112 | */ 113 | FT_EXPORT( void ) 114 | FT_List_Add( FT_List list, 115 | FT_ListNode node ); 116 | 117 | 118 | /************************************************************************** 119 | * 120 | * @function: 121 | * FT_List_Insert 122 | * 123 | * @description: 124 | * Insert an element at the head of a list. 125 | * 126 | * @inout: 127 | * list :: 128 | * A pointer to parent list. 129 | * node :: 130 | * The node to insert. 131 | */ 132 | FT_EXPORT( void ) 133 | FT_List_Insert( FT_List list, 134 | FT_ListNode node ); 135 | 136 | 137 | /************************************************************************** 138 | * 139 | * @function: 140 | * FT_List_Remove 141 | * 142 | * @description: 143 | * Remove a node from a list. This function doesn't check whether the 144 | * node is in the list! 145 | * 146 | * @input: 147 | * node :: 148 | * The node to remove. 149 | * 150 | * @inout: 151 | * list :: 152 | * A pointer to the parent list. 153 | */ 154 | FT_EXPORT( void ) 155 | FT_List_Remove( FT_List list, 156 | FT_ListNode node ); 157 | 158 | 159 | /************************************************************************** 160 | * 161 | * @function: 162 | * FT_List_Up 163 | * 164 | * @description: 165 | * Move a node to the head/top of a list. Used to maintain LRU lists. 166 | * 167 | * @inout: 168 | * list :: 169 | * A pointer to the parent list. 170 | * node :: 171 | * The node to move. 172 | */ 173 | FT_EXPORT( void ) 174 | FT_List_Up( FT_List list, 175 | FT_ListNode node ); 176 | 177 | 178 | /************************************************************************** 179 | * 180 | * @functype: 181 | * FT_List_Iterator 182 | * 183 | * @description: 184 | * An FT_List iterator function that is called during a list parse by 185 | * @FT_List_Iterate. 186 | * 187 | * @input: 188 | * node :: 189 | * The current iteration list node. 190 | * 191 | * user :: 192 | * A typeless pointer passed to @FT_List_Iterate. Can be used to point 193 | * to the iteration's state. 194 | */ 195 | typedef FT_Error 196 | (*FT_List_Iterator)( FT_ListNode node, 197 | void* user ); 198 | 199 | 200 | /************************************************************************** 201 | * 202 | * @function: 203 | * FT_List_Iterate 204 | * 205 | * @description: 206 | * Parse a list and calls a given iterator function on each element. 207 | * Note that parsing is stopped as soon as one of the iterator calls 208 | * returns a non-zero value. 209 | * 210 | * @input: 211 | * list :: 212 | * A handle to the list. 213 | * iterator :: 214 | * An iterator function, called on each node of the list. 215 | * user :: 216 | * A user-supplied field that is passed as the second argument to the 217 | * iterator. 218 | * 219 | * @return: 220 | * The result (a FreeType error code) of the last iterator call. 221 | */ 222 | FT_EXPORT( FT_Error ) 223 | FT_List_Iterate( FT_List list, 224 | FT_List_Iterator iterator, 225 | void* user ); 226 | 227 | 228 | /************************************************************************** 229 | * 230 | * @functype: 231 | * FT_List_Destructor 232 | * 233 | * @description: 234 | * An @FT_List iterator function that is called during a list 235 | * finalization by @FT_List_Finalize to destroy all elements in a given 236 | * list. 237 | * 238 | * @input: 239 | * system :: 240 | * The current system object. 241 | * 242 | * data :: 243 | * The current object to destroy. 244 | * 245 | * user :: 246 | * A typeless pointer passed to @FT_List_Iterate. It can be used to 247 | * point to the iteration's state. 248 | */ 249 | typedef void 250 | (*FT_List_Destructor)( FT_Memory memory, 251 | void* data, 252 | void* user ); 253 | 254 | 255 | /************************************************************************** 256 | * 257 | * @function: 258 | * FT_List_Finalize 259 | * 260 | * @description: 261 | * Destroy all elements in the list as well as the list itself. 262 | * 263 | * @input: 264 | * list :: 265 | * A handle to the list. 266 | * 267 | * destroy :: 268 | * A list destructor that will be applied to each element of the list. 269 | * Set this to `NULL` if not needed. 270 | * 271 | * memory :: 272 | * The current memory object that handles deallocation. 273 | * 274 | * user :: 275 | * A user-supplied field that is passed as the last argument to the 276 | * destructor. 277 | * 278 | * @note: 279 | * This function expects that all nodes added by @FT_List_Add or 280 | * @FT_List_Insert have been dynamically allocated. 281 | */ 282 | FT_EXPORT( void ) 283 | FT_List_Finalize( FT_List list, 284 | FT_List_Destructor destroy, 285 | FT_Memory memory, 286 | void* user ); 287 | 288 | /* */ 289 | 290 | 291 | FT_END_HEADER 292 | 293 | #endif /* FTLIST_H_ */ 294 | 295 | 296 | /* END */ 297 | -------------------------------------------------------------------------------- /include/freetype/ftlogging.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftlogging.h 4 | * 5 | * Additional debugging APIs. 6 | * 7 | * Copyright (C) 2020-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTLOGGING_H_ 20 | #define FTLOGGING_H_ 21 | 22 | 23 | #include 24 | #include FT_CONFIG_CONFIG_H 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | /************************************************************************** 31 | * 32 | * @section: 33 | * debugging_apis 34 | * 35 | * @title: 36 | * External Debugging APIs 37 | * 38 | * @abstract: 39 | * Public APIs to control the `FT_DEBUG_LOGGING` macro. 40 | * 41 | * @description: 42 | * This section contains the declarations of public functions that 43 | * enables fine control of what the `FT_DEBUG_LOGGING` macro outputs. 44 | * 45 | */ 46 | 47 | 48 | /************************************************************************** 49 | * 50 | * @function: 51 | * FT_Trace_Set_Level 52 | * 53 | * @description: 54 | * Change the levels of tracing components of FreeType at run time. 55 | * 56 | * @input: 57 | * tracing_level :: 58 | * New tracing value. 59 | * 60 | * @example: 61 | * The following call makes FreeType trace everything but the 'memory' 62 | * component. 63 | * 64 | * ``` 65 | * FT_Trace_Set_Level( "any:7 memory:0" ); 66 | * ``` 67 | * 68 | * @note: 69 | * This function does nothing if compilation option `FT_DEBUG_LOGGING` 70 | * isn't set. 71 | * 72 | * @since: 73 | * 2.11 74 | * 75 | */ 76 | FT_EXPORT( void ) 77 | FT_Trace_Set_Level( const char* tracing_level ); 78 | 79 | 80 | /************************************************************************** 81 | * 82 | * @function: 83 | * FT_Trace_Set_Default_Level 84 | * 85 | * @description: 86 | * Reset tracing value of FreeType's components to the default value 87 | * (i.e., to the value of the `FT2_DEBUG` environment value or to NULL 88 | * if `FT2_DEBUG` is not set). 89 | * 90 | * @note: 91 | * This function does nothing if compilation option `FT_DEBUG_LOGGING` 92 | * isn't set. 93 | * 94 | * @since: 95 | * 2.11 96 | * 97 | */ 98 | FT_EXPORT( void ) 99 | FT_Trace_Set_Default_Level( void ); 100 | 101 | 102 | /************************************************************************** 103 | * 104 | * @functype: 105 | * FT_Custom_Log_Handler 106 | * 107 | * @description: 108 | * A function typedef that is used to handle the logging of tracing and 109 | * debug messages on a file system. 110 | * 111 | * @input: 112 | * ft_component :: 113 | * The name of `FT_COMPONENT` from which the current debug or error 114 | * message is produced. 115 | * 116 | * fmt :: 117 | * Actual debug or tracing message. 118 | * 119 | * args:: 120 | * Arguments of debug or tracing messages. 121 | * 122 | * @since: 123 | * 2.11 124 | * 125 | */ 126 | typedef void 127 | (*FT_Custom_Log_Handler)( const char* ft_component, 128 | const char* fmt, 129 | va_list args ); 130 | 131 | 132 | /************************************************************************** 133 | * 134 | * @function: 135 | * FT_Set_Log_Handler 136 | * 137 | * @description: 138 | * A function to set a custom log handler. 139 | * 140 | * @input: 141 | * handler :: 142 | * New logging function. 143 | * 144 | * @note: 145 | * This function does nothing if compilation option `FT_DEBUG_LOGGING` 146 | * isn't set. 147 | * 148 | * @since: 149 | * 2.11 150 | * 151 | */ 152 | FT_EXPORT( void ) 153 | FT_Set_Log_Handler( FT_Custom_Log_Handler handler ); 154 | 155 | 156 | /************************************************************************** 157 | * 158 | * @function: 159 | * FT_Set_Default_Log_Handler 160 | * 161 | * @description: 162 | * A function to undo the effect of @FT_Set_Log_Handler, resetting the 163 | * log handler to FreeType's built-in version. 164 | * 165 | * @note: 166 | * This function does nothing if compilation option `FT_DEBUG_LOGGING` 167 | * isn't set. 168 | * 169 | * @since: 170 | * 2.11 171 | * 172 | */ 173 | FT_EXPORT( void ) 174 | FT_Set_Default_Log_Handler( void ); 175 | 176 | /* */ 177 | 178 | 179 | FT_END_HEADER 180 | 181 | #endif /* FTLOGGING_H_ */ 182 | 183 | 184 | /* END */ 185 | -------------------------------------------------------------------------------- /include/freetype/ftlzw.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftlzw.h 4 | * 5 | * LZW-compressed stream support. 6 | * 7 | * Copyright (C) 2004-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTLZW_H_ 20 | #define FTLZW_H_ 21 | 22 | #include 23 | 24 | #ifdef FREETYPE_H 25 | #error "freetype.h of FreeType 1 has been loaded!" 26 | #error "Please fix the directory search order for header files" 27 | #error "so that freetype.h of FreeType 2 is found first." 28 | #endif 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | /************************************************************************** 34 | * 35 | * @section: 36 | * lzw 37 | * 38 | * @title: 39 | * LZW Streams 40 | * 41 | * @abstract: 42 | * Using LZW-compressed font files. 43 | * 44 | * @description: 45 | * In certain builds of the library, LZW compression recognition is 46 | * automatically handled when calling @FT_New_Face or @FT_Open_Face. 47 | * This means that if no font driver is capable of handling the raw 48 | * compressed file, the library will try to open a LZW stream from it and 49 | * re-open the face with it. 50 | * 51 | * The stream implementation is very basic and resets the decompression 52 | * process each time seeking backwards is needed within the stream, 53 | * which significantly undermines the performance. 54 | * 55 | * This section contains the declaration of LZW-specific functions. 56 | * 57 | */ 58 | 59 | /************************************************************************** 60 | * 61 | * @function: 62 | * FT_Stream_OpenLZW 63 | * 64 | * @description: 65 | * Open a new stream to parse LZW-compressed font files. This is mainly 66 | * used to support the compressed `*.pcf.Z` fonts that come with XFree86. 67 | * 68 | * @input: 69 | * stream :: 70 | * The target embedding stream. 71 | * 72 | * source :: 73 | * The source stream. 74 | * 75 | * @return: 76 | * FreeType error code. 0~means success. 77 | * 78 | * @note: 79 | * The source stream must be opened _before_ calling this function. 80 | * 81 | * Calling the internal function `FT_Stream_Close` on the new stream will 82 | * **not** call `FT_Stream_Close` on the source stream. None of the 83 | * stream objects will be released to the heap. 84 | * 85 | * This function may return `FT_Err_Unimplemented_Feature` if your build 86 | * of FreeType was not compiled with LZW support. 87 | */ 88 | FT_EXPORT( FT_Error ) 89 | FT_Stream_OpenLZW( FT_Stream stream, 90 | FT_Stream source ); 91 | 92 | /* */ 93 | 94 | 95 | FT_END_HEADER 96 | 97 | #endif /* FTLZW_H_ */ 98 | 99 | 100 | /* END */ 101 | -------------------------------------------------------------------------------- /include/freetype/ftmac.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftmac.h 4 | * 5 | * Additional Mac-specific API. 6 | * 7 | * Copyright (C) 1996-2024 by 8 | * Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /**************************************************************************** 20 | * 21 | * NOTE: Include this file after `FT_FREETYPE_H` and after any 22 | * Mac-specific headers (because this header uses Mac types such as 23 | * 'Handle', 'FSSpec', 'FSRef', etc.) 24 | * 25 | */ 26 | 27 | 28 | #ifndef FTMAC_H_ 29 | #define FTMAC_H_ 30 | 31 | 32 | 33 | 34 | FT_BEGIN_HEADER 35 | 36 | 37 | /* gcc-3.1 and later can warn about functions tagged as deprecated */ 38 | #ifndef FT_DEPRECATED_ATTRIBUTE 39 | #if defined( __GNUC__ ) && \ 40 | ( ( __GNUC__ >= 4 ) || \ 41 | ( ( __GNUC__ == 3 ) && ( __GNUC_MINOR__ >= 1 ) ) ) 42 | #define FT_DEPRECATED_ATTRIBUTE __attribute__(( deprecated )) 43 | #else 44 | #define FT_DEPRECATED_ATTRIBUTE 45 | #endif 46 | #endif 47 | 48 | 49 | /************************************************************************** 50 | * 51 | * @section: 52 | * mac_specific 53 | * 54 | * @title: 55 | * Mac Specific Interface 56 | * 57 | * @abstract: 58 | * Only available on the Macintosh. 59 | * 60 | * @description: 61 | * The following definitions are only available if FreeType is compiled 62 | * on a Macintosh. 63 | * 64 | */ 65 | 66 | 67 | /************************************************************************** 68 | * 69 | * @function: 70 | * FT_New_Face_From_FOND 71 | * 72 | * @description: 73 | * Create a new face object from a FOND resource. 74 | * 75 | * @inout: 76 | * library :: 77 | * A handle to the library resource. 78 | * 79 | * @input: 80 | * fond :: 81 | * A FOND resource. 82 | * 83 | * face_index :: 84 | * Only supported for the -1 'sanity check' special case. 85 | * 86 | * @output: 87 | * aface :: 88 | * A handle to a new face object. 89 | * 90 | * @return: 91 | * FreeType error code. 0~means success. 92 | * 93 | * @example: 94 | * This function can be used to create @FT_Face objects from fonts that 95 | * are installed in the system as follows. 96 | * 97 | * ``` 98 | * fond = GetResource( 'FOND', fontName ); 99 | * error = FT_New_Face_From_FOND( library, fond, 0, &face ); 100 | * ``` 101 | */ 102 | FT_EXPORT( FT_Error ) 103 | FT_New_Face_From_FOND( FT_Library library, 104 | Handle fond, 105 | FT_Long face_index, 106 | FT_Face *aface ) 107 | FT_DEPRECATED_ATTRIBUTE; 108 | 109 | 110 | /************************************************************************** 111 | * 112 | * @function: 113 | * FT_GetFile_From_Mac_Name 114 | * 115 | * @description: 116 | * Return an FSSpec for the disk file containing the named font. 117 | * 118 | * @input: 119 | * fontName :: 120 | * Mac OS name of the font (e.g., Times New Roman Bold). 121 | * 122 | * @output: 123 | * pathSpec :: 124 | * FSSpec to the file. For passing to @FT_New_Face_From_FSSpec. 125 | * 126 | * face_index :: 127 | * Index of the face. For passing to @FT_New_Face_From_FSSpec. 128 | * 129 | * @return: 130 | * FreeType error code. 0~means success. 131 | */ 132 | FT_EXPORT( FT_Error ) 133 | FT_GetFile_From_Mac_Name( const char* fontName, 134 | FSSpec* pathSpec, 135 | FT_Long* face_index ) 136 | FT_DEPRECATED_ATTRIBUTE; 137 | 138 | 139 | /************************************************************************** 140 | * 141 | * @function: 142 | * FT_GetFile_From_Mac_ATS_Name 143 | * 144 | * @description: 145 | * Return an FSSpec for the disk file containing the named font. 146 | * 147 | * @input: 148 | * fontName :: 149 | * Mac OS name of the font in ATS framework. 150 | * 151 | * @output: 152 | * pathSpec :: 153 | * FSSpec to the file. For passing to @FT_New_Face_From_FSSpec. 154 | * 155 | * face_index :: 156 | * Index of the face. For passing to @FT_New_Face_From_FSSpec. 157 | * 158 | * @return: 159 | * FreeType error code. 0~means success. 160 | */ 161 | FT_EXPORT( FT_Error ) 162 | FT_GetFile_From_Mac_ATS_Name( const char* fontName, 163 | FSSpec* pathSpec, 164 | FT_Long* face_index ) 165 | FT_DEPRECATED_ATTRIBUTE; 166 | 167 | 168 | /************************************************************************** 169 | * 170 | * @function: 171 | * FT_GetFilePath_From_Mac_ATS_Name 172 | * 173 | * @description: 174 | * Return a pathname of the disk file and face index for given font name 175 | * that is handled by ATS framework. 176 | * 177 | * @input: 178 | * fontName :: 179 | * Mac OS name of the font in ATS framework. 180 | * 181 | * @output: 182 | * path :: 183 | * Buffer to store pathname of the file. For passing to @FT_New_Face. 184 | * The client must allocate this buffer before calling this function. 185 | * 186 | * maxPathSize :: 187 | * Lengths of the buffer `path` that client allocated. 188 | * 189 | * face_index :: 190 | * Index of the face. For passing to @FT_New_Face. 191 | * 192 | * @return: 193 | * FreeType error code. 0~means success. 194 | */ 195 | FT_EXPORT( FT_Error ) 196 | FT_GetFilePath_From_Mac_ATS_Name( const char* fontName, 197 | UInt8* path, 198 | UInt32 maxPathSize, 199 | FT_Long* face_index ) 200 | FT_DEPRECATED_ATTRIBUTE; 201 | 202 | 203 | /************************************************************************** 204 | * 205 | * @function: 206 | * FT_New_Face_From_FSSpec 207 | * 208 | * @description: 209 | * Create a new face object from a given resource and typeface index 210 | * using an FSSpec to the font file. 211 | * 212 | * @inout: 213 | * library :: 214 | * A handle to the library resource. 215 | * 216 | * @input: 217 | * spec :: 218 | * FSSpec to the font file. 219 | * 220 | * face_index :: 221 | * The index of the face within the resource. The first face has 222 | * index~0. 223 | * @output: 224 | * aface :: 225 | * A handle to a new face object. 226 | * 227 | * @return: 228 | * FreeType error code. 0~means success. 229 | * 230 | * @note: 231 | * @FT_New_Face_From_FSSpec is identical to @FT_New_Face except it 232 | * accepts an FSSpec instead of a path. 233 | */ 234 | FT_EXPORT( FT_Error ) 235 | FT_New_Face_From_FSSpec( FT_Library library, 236 | const FSSpec *spec, 237 | FT_Long face_index, 238 | FT_Face *aface ) 239 | FT_DEPRECATED_ATTRIBUTE; 240 | 241 | 242 | /************************************************************************** 243 | * 244 | * @function: 245 | * FT_New_Face_From_FSRef 246 | * 247 | * @description: 248 | * Create a new face object from a given resource and typeface index 249 | * using an FSRef to the font file. 250 | * 251 | * @inout: 252 | * library :: 253 | * A handle to the library resource. 254 | * 255 | * @input: 256 | * spec :: 257 | * FSRef to the font file. 258 | * 259 | * face_index :: 260 | * The index of the face within the resource. The first face has 261 | * index~0. 262 | * @output: 263 | * aface :: 264 | * A handle to a new face object. 265 | * 266 | * @return: 267 | * FreeType error code. 0~means success. 268 | * 269 | * @note: 270 | * @FT_New_Face_From_FSRef is identical to @FT_New_Face except it accepts 271 | * an FSRef instead of a path. 272 | */ 273 | FT_EXPORT( FT_Error ) 274 | FT_New_Face_From_FSRef( FT_Library library, 275 | const FSRef *ref, 276 | FT_Long face_index, 277 | FT_Face *aface ) 278 | FT_DEPRECATED_ATTRIBUTE; 279 | 280 | /* */ 281 | 282 | 283 | FT_END_HEADER 284 | 285 | 286 | #endif /* FTMAC_H_ */ 287 | 288 | 289 | /* END */ 290 | -------------------------------------------------------------------------------- /include/freetype/ftmoderr.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftmoderr.h 4 | * 5 | * FreeType module error offsets (specification). 6 | * 7 | * Copyright (C) 2001-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This file is used to define the FreeType module error codes. 22 | * 23 | * If the macro `FT_CONFIG_OPTION_USE_MODULE_ERRORS` in `ftoption.h` is 24 | * set, the lower byte of an error value identifies the error code as 25 | * usual. In addition, the higher byte identifies the module. For 26 | * example, the error `FT_Err_Invalid_File_Format` has value 0x0003, the 27 | * error `TT_Err_Invalid_File_Format` has value 0x1303, the error 28 | * `T1_Err_Invalid_File_Format` has value 0x1403, etc. 29 | * 30 | * Note that `FT_Err_Ok`, `TT_Err_Ok`, etc. are always equal to zero, 31 | * including the high byte. 32 | * 33 | * If `FT_CONFIG_OPTION_USE_MODULE_ERRORS` isn't set, the higher byte of an 34 | * error value is set to zero. 35 | * 36 | * To hide the various `XXX_Err_` prefixes in the source code, FreeType 37 | * provides some macros in `fttypes.h`. 38 | * 39 | * FT_ERR( err ) 40 | * 41 | * Add current error module prefix (as defined with the `FT_ERR_PREFIX` 42 | * macro) to `err`. For example, in the BDF module the line 43 | * 44 | * ``` 45 | * error = FT_ERR( Invalid_Outline ); 46 | * ``` 47 | * 48 | * expands to 49 | * 50 | * ``` 51 | * error = BDF_Err_Invalid_Outline; 52 | * ``` 53 | * 54 | * For simplicity, you can always use `FT_Err_Ok` directly instead of 55 | * `FT_ERR( Ok )`. 56 | * 57 | * FT_ERR_EQ( errcode, err ) 58 | * FT_ERR_NEQ( errcode, err ) 59 | * 60 | * Compare error code `errcode` with the error `err` for equality and 61 | * inequality, respectively. Example: 62 | * 63 | * ``` 64 | * if ( FT_ERR_EQ( error, Invalid_Outline ) ) 65 | * ... 66 | * ``` 67 | * 68 | * Using this macro you don't have to think about error prefixes. Of 69 | * course, if module errors are not active, the above example is the 70 | * same as 71 | * 72 | * ``` 73 | * if ( error == FT_Err_Invalid_Outline ) 74 | * ... 75 | * ``` 76 | * 77 | * FT_ERROR_BASE( errcode ) 78 | * FT_ERROR_MODULE( errcode ) 79 | * 80 | * Get base error and module error code, respectively. 81 | * 82 | * It can also be used to create a module error message table easily with 83 | * something like 84 | * 85 | * ``` 86 | * #undef FTMODERR_H_ 87 | * #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, 88 | * #define FT_MODERR_START_LIST { 89 | * #define FT_MODERR_END_LIST { 0, 0 } }; 90 | * 91 | * const struct 92 | * { 93 | * int mod_err_offset; 94 | * const char* mod_err_msg 95 | * } ft_mod_errors[] = 96 | * 97 | * #include 98 | * ``` 99 | * 100 | */ 101 | 102 | 103 | #ifndef FTMODERR_H_ 104 | #define FTMODERR_H_ 105 | 106 | 107 | /*******************************************************************/ 108 | /*******************************************************************/ 109 | /***** *****/ 110 | /***** SETUP MACROS *****/ 111 | /***** *****/ 112 | /*******************************************************************/ 113 | /*******************************************************************/ 114 | 115 | 116 | #undef FT_NEED_EXTERN_C 117 | 118 | #ifndef FT_MODERRDEF 119 | 120 | #ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS 121 | #define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = v, 122 | #else 123 | #define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = 0, 124 | #endif 125 | 126 | #define FT_MODERR_START_LIST enum { 127 | #define FT_MODERR_END_LIST FT_Mod_Err_Max }; 128 | 129 | #ifdef __cplusplus 130 | #define FT_NEED_EXTERN_C 131 | extern "C" { 132 | #endif 133 | 134 | #endif /* !FT_MODERRDEF */ 135 | 136 | 137 | /*******************************************************************/ 138 | /*******************************************************************/ 139 | /***** *****/ 140 | /***** LIST MODULE ERROR BASES *****/ 141 | /***** *****/ 142 | /*******************************************************************/ 143 | /*******************************************************************/ 144 | 145 | 146 | #ifdef FT_MODERR_START_LIST 147 | FT_MODERR_START_LIST 148 | #endif 149 | 150 | 151 | FT_MODERRDEF( Base, 0x000, "base module" ) 152 | FT_MODERRDEF( Autofit, 0x100, "autofitter module" ) 153 | FT_MODERRDEF( BDF, 0x200, "BDF module" ) 154 | FT_MODERRDEF( Bzip2, 0x300, "Bzip2 module" ) 155 | FT_MODERRDEF( Cache, 0x400, "cache module" ) 156 | FT_MODERRDEF( CFF, 0x500, "CFF module" ) 157 | FT_MODERRDEF( CID, 0x600, "CID module" ) 158 | FT_MODERRDEF( Gzip, 0x700, "Gzip module" ) 159 | FT_MODERRDEF( LZW, 0x800, "LZW module" ) 160 | FT_MODERRDEF( OTvalid, 0x900, "OpenType validation module" ) 161 | FT_MODERRDEF( PCF, 0xA00, "PCF module" ) 162 | FT_MODERRDEF( PFR, 0xB00, "PFR module" ) 163 | FT_MODERRDEF( PSaux, 0xC00, "PS auxiliary module" ) 164 | FT_MODERRDEF( PShinter, 0xD00, "PS hinter module" ) 165 | FT_MODERRDEF( PSnames, 0xE00, "PS names module" ) 166 | FT_MODERRDEF( Raster, 0xF00, "raster module" ) 167 | FT_MODERRDEF( SFNT, 0x1000, "SFNT module" ) 168 | FT_MODERRDEF( Smooth, 0x1100, "smooth raster module" ) 169 | FT_MODERRDEF( TrueType, 0x1200, "TrueType module" ) 170 | FT_MODERRDEF( Type1, 0x1300, "Type 1 module" ) 171 | FT_MODERRDEF( Type42, 0x1400, "Type 42 module" ) 172 | FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" ) 173 | FT_MODERRDEF( GXvalid, 0x1600, "GX validation module" ) 174 | FT_MODERRDEF( Sdf, 0x1700, "Signed distance field raster module" ) 175 | 176 | 177 | #ifdef FT_MODERR_END_LIST 178 | FT_MODERR_END_LIST 179 | #endif 180 | 181 | 182 | /*******************************************************************/ 183 | /*******************************************************************/ 184 | /***** *****/ 185 | /***** CLEANUP *****/ 186 | /***** *****/ 187 | /*******************************************************************/ 188 | /*******************************************************************/ 189 | 190 | 191 | #ifdef FT_NEED_EXTERN_C 192 | } 193 | #endif 194 | 195 | #undef FT_MODERR_START_LIST 196 | #undef FT_MODERR_END_LIST 197 | #undef FT_MODERRDEF 198 | #undef FT_NEED_EXTERN_C 199 | 200 | 201 | #endif /* FTMODERR_H_ */ 202 | 203 | 204 | /* END */ 205 | -------------------------------------------------------------------------------- /include/freetype/ftotval.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftotval.h 4 | * 5 | * FreeType API for validating OpenType tables (specification). 6 | * 7 | * Copyright (C) 2004-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /**************************************************************************** 20 | * 21 | * 22 | * Warning: This module might be moved to a different library in the 23 | * future to avoid a tight dependency between FreeType and the 24 | * OpenType specification. 25 | * 26 | * 27 | */ 28 | 29 | 30 | #ifndef FTOTVAL_H_ 31 | #define FTOTVAL_H_ 32 | 33 | #include 34 | 35 | #ifdef FREETYPE_H 36 | #error "freetype.h of FreeType 1 has been loaded!" 37 | #error "Please fix the directory search order for header files" 38 | #error "so that freetype.h of FreeType 2 is found first." 39 | #endif 40 | 41 | 42 | FT_BEGIN_HEADER 43 | 44 | 45 | /************************************************************************** 46 | * 47 | * @section: 48 | * ot_validation 49 | * 50 | * @title: 51 | * OpenType Validation 52 | * 53 | * @abstract: 54 | * An API to validate OpenType tables. 55 | * 56 | * @description: 57 | * This section contains the declaration of functions to validate some 58 | * OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). 59 | * 60 | * @order: 61 | * FT_OpenType_Validate 62 | * FT_OpenType_Free 63 | * 64 | * FT_VALIDATE_OTXXX 65 | * 66 | */ 67 | 68 | 69 | /************************************************************************** 70 | * 71 | * @enum: 72 | * FT_VALIDATE_OTXXX 73 | * 74 | * @description: 75 | * A list of bit-field constants used with @FT_OpenType_Validate to 76 | * indicate which OpenType tables should be validated. 77 | * 78 | * @values: 79 | * FT_VALIDATE_BASE :: 80 | * Validate BASE table. 81 | * 82 | * FT_VALIDATE_GDEF :: 83 | * Validate GDEF table. 84 | * 85 | * FT_VALIDATE_GPOS :: 86 | * Validate GPOS table. 87 | * 88 | * FT_VALIDATE_GSUB :: 89 | * Validate GSUB table. 90 | * 91 | * FT_VALIDATE_JSTF :: 92 | * Validate JSTF table. 93 | * 94 | * FT_VALIDATE_MATH :: 95 | * Validate MATH table. 96 | * 97 | * FT_VALIDATE_OT :: 98 | * Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). 99 | * 100 | */ 101 | #define FT_VALIDATE_BASE 0x0100 102 | #define FT_VALIDATE_GDEF 0x0200 103 | #define FT_VALIDATE_GPOS 0x0400 104 | #define FT_VALIDATE_GSUB 0x0800 105 | #define FT_VALIDATE_JSTF 0x1000 106 | #define FT_VALIDATE_MATH 0x2000 107 | 108 | #define FT_VALIDATE_OT ( FT_VALIDATE_BASE | \ 109 | FT_VALIDATE_GDEF | \ 110 | FT_VALIDATE_GPOS | \ 111 | FT_VALIDATE_GSUB | \ 112 | FT_VALIDATE_JSTF | \ 113 | FT_VALIDATE_MATH ) 114 | 115 | 116 | /************************************************************************** 117 | * 118 | * @function: 119 | * FT_OpenType_Validate 120 | * 121 | * @description: 122 | * Validate various OpenType tables to assure that all offsets and 123 | * indices are valid. The idea is that a higher-level library that 124 | * actually does the text layout can access those tables without error 125 | * checking (which can be quite time consuming). 126 | * 127 | * @input: 128 | * face :: 129 | * A handle to the input face. 130 | * 131 | * validation_flags :: 132 | * A bit field that specifies the tables to be validated. See 133 | * @FT_VALIDATE_OTXXX for possible values. 134 | * 135 | * @output: 136 | * BASE_table :: 137 | * A pointer to the BASE table. 138 | * 139 | * GDEF_table :: 140 | * A pointer to the GDEF table. 141 | * 142 | * GPOS_table :: 143 | * A pointer to the GPOS table. 144 | * 145 | * GSUB_table :: 146 | * A pointer to the GSUB table. 147 | * 148 | * JSTF_table :: 149 | * A pointer to the JSTF table. 150 | * 151 | * @return: 152 | * FreeType error code. 0~means success. 153 | * 154 | * @note: 155 | * This function only works with OpenType fonts, returning an error 156 | * otherwise. 157 | * 158 | * After use, the application should deallocate the five tables with 159 | * @FT_OpenType_Free. A `NULL` value indicates that the table either 160 | * doesn't exist in the font, or the application hasn't asked for 161 | * validation. 162 | */ 163 | FT_EXPORT( FT_Error ) 164 | FT_OpenType_Validate( FT_Face face, 165 | FT_UInt validation_flags, 166 | FT_Bytes *BASE_table, 167 | FT_Bytes *GDEF_table, 168 | FT_Bytes *GPOS_table, 169 | FT_Bytes *GSUB_table, 170 | FT_Bytes *JSTF_table ); 171 | 172 | 173 | /************************************************************************** 174 | * 175 | * @function: 176 | * FT_OpenType_Free 177 | * 178 | * @description: 179 | * Free the buffer allocated by OpenType validator. 180 | * 181 | * @input: 182 | * face :: 183 | * A handle to the input face. 184 | * 185 | * table :: 186 | * The pointer to the buffer that is allocated by 187 | * @FT_OpenType_Validate. 188 | * 189 | * @note: 190 | * This function must be used to free the buffer allocated by 191 | * @FT_OpenType_Validate only. 192 | */ 193 | FT_EXPORT( void ) 194 | FT_OpenType_Free( FT_Face face, 195 | FT_Bytes table ); 196 | 197 | 198 | /* */ 199 | 200 | 201 | FT_END_HEADER 202 | 203 | #endif /* FTOTVAL_H_ */ 204 | 205 | 206 | /* END */ 207 | -------------------------------------------------------------------------------- /include/freetype/ftparams.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftparams.h 4 | * 5 | * FreeType API for possible FT_Parameter tags (specification only). 6 | * 7 | * Copyright (C) 2017-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTPARAMS_H_ 20 | #define FTPARAMS_H_ 21 | 22 | #include 23 | 24 | #ifdef FREETYPE_H 25 | #error "freetype.h of FreeType 1 has been loaded!" 26 | #error "Please fix the directory search order for header files" 27 | #error "so that freetype.h of FreeType 2 is found first." 28 | #endif 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | 34 | /************************************************************************** 35 | * 36 | * @section: 37 | * parameter_tags 38 | * 39 | * @title: 40 | * Parameter Tags 41 | * 42 | * @abstract: 43 | * Macros for driver property and font loading parameter tags. 44 | * 45 | * @description: 46 | * This section contains macros for the @FT_Parameter structure that are 47 | * used with various functions to activate some special functionality or 48 | * different behaviour of various components of FreeType. 49 | * 50 | */ 51 | 52 | 53 | /************************************************************************** 54 | * 55 | * @enum: 56 | * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY 57 | * 58 | * @description: 59 | * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic 60 | * family names in the 'name' table (introduced in OpenType version 1.4). 61 | * Use this for backward compatibility with legacy systems that have a 62 | * four-faces-per-family restriction. 63 | * 64 | * @since: 65 | * 2.8 66 | * 67 | */ 68 | #define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \ 69 | FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) 70 | 71 | 72 | /* this constant is deprecated */ 73 | #define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \ 74 | FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY 75 | 76 | 77 | /************************************************************************** 78 | * 79 | * @enum: 80 | * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY 81 | * 82 | * @description: 83 | * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic 84 | * subfamily names in the 'name' table (introduced in OpenType version 85 | * 1.4). Use this for backward compatibility with legacy systems that 86 | * have a four-faces-per-family restriction. 87 | * 88 | * @since: 89 | * 2.8 90 | * 91 | */ 92 | #define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \ 93 | FT_MAKE_TAG( 'i', 'g', 'p', 's' ) 94 | 95 | 96 | /* this constant is deprecated */ 97 | #define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \ 98 | FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY 99 | 100 | 101 | /************************************************************************** 102 | * 103 | * @enum: 104 | * FT_PARAM_TAG_INCREMENTAL 105 | * 106 | * @description: 107 | * An @FT_Parameter tag to be used with @FT_Open_Face to indicate 108 | * incremental glyph loading. 109 | * 110 | */ 111 | #define FT_PARAM_TAG_INCREMENTAL \ 112 | FT_MAKE_TAG( 'i', 'n', 'c', 'r' ) 113 | 114 | 115 | /************************************************************************** 116 | * 117 | * @enum: 118 | * FT_PARAM_TAG_IGNORE_SBIX 119 | * 120 | * @description: 121 | * A tag for @FT_Parameter to make @FT_Open_Face ignore an 'sbix' table 122 | * while loading a font. Use this if @FT_FACE_FLAG_SBIX is set and you 123 | * want to access the outline glyphs in the font. 124 | * 125 | */ 126 | #define FT_PARAM_TAG_IGNORE_SBIX \ 127 | FT_MAKE_TAG( 'i', 's', 'b', 'x' ) 128 | 129 | 130 | /************************************************************************** 131 | * 132 | * @enum: 133 | * FT_PARAM_TAG_LCD_FILTER_WEIGHTS 134 | * 135 | * @description: 136 | * An @FT_Parameter tag to be used with @FT_Face_Properties. The 137 | * corresponding argument specifies the five LCD filter weights for a 138 | * given face (if using @FT_LOAD_TARGET_LCD, for example), overriding the 139 | * global default values or the values set up with 140 | * @FT_Library_SetLcdFilterWeights. 141 | * 142 | * @since: 143 | * 2.8 144 | * 145 | */ 146 | #define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \ 147 | FT_MAKE_TAG( 'l', 'c', 'd', 'f' ) 148 | 149 | 150 | /************************************************************************** 151 | * 152 | * @enum: 153 | * FT_PARAM_TAG_RANDOM_SEED 154 | * 155 | * @description: 156 | * An @FT_Parameter tag to be used with @FT_Face_Properties. The 157 | * corresponding 32bit signed integer argument overrides the font 158 | * driver's random seed value with a face-specific one; see @random-seed. 159 | * 160 | * @since: 161 | * 2.8 162 | * 163 | */ 164 | #define FT_PARAM_TAG_RANDOM_SEED \ 165 | FT_MAKE_TAG( 's', 'e', 'e', 'd' ) 166 | 167 | 168 | /************************************************************************** 169 | * 170 | * @enum: 171 | * FT_PARAM_TAG_STEM_DARKENING 172 | * 173 | * @description: 174 | * An @FT_Parameter tag to be used with @FT_Face_Properties. The 175 | * corresponding Boolean argument specifies whether to apply stem 176 | * darkening, overriding the global default values or the values set up 177 | * with @FT_Property_Set (see @no-stem-darkening). 178 | * 179 | * This is a passive setting that only takes effect if the font driver or 180 | * autohinter honors it, which the CFF, Type~1, and CID drivers always 181 | * do, but the autohinter only in 'light' hinting mode (as of version 182 | * 2.9). 183 | * 184 | * @since: 185 | * 2.8 186 | * 187 | */ 188 | #define FT_PARAM_TAG_STEM_DARKENING \ 189 | FT_MAKE_TAG( 'd', 'a', 'r', 'k' ) 190 | 191 | 192 | /************************************************************************** 193 | * 194 | * @enum: 195 | * FT_PARAM_TAG_UNPATENTED_HINTING 196 | * 197 | * @description: 198 | * Deprecated, no effect. 199 | * 200 | * Previously: A constant used as the tag of an @FT_Parameter structure 201 | * to indicate that unpatented methods only should be used by the 202 | * TrueType bytecode interpreter for a typeface opened by @FT_Open_Face. 203 | * 204 | */ 205 | #define FT_PARAM_TAG_UNPATENTED_HINTING \ 206 | FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) 207 | 208 | 209 | /* */ 210 | 211 | 212 | FT_END_HEADER 213 | 214 | 215 | #endif /* FTPARAMS_H_ */ 216 | 217 | 218 | /* END */ 219 | -------------------------------------------------------------------------------- /include/freetype/ftpfr.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftpfr.h 4 | * 5 | * FreeType API for accessing PFR-specific data (specification only). 6 | * 7 | * Copyright (C) 2002-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTPFR_H_ 20 | #define FTPFR_H_ 21 | 22 | #include 23 | 24 | #ifdef FREETYPE_H 25 | #error "freetype.h of FreeType 1 has been loaded!" 26 | #error "Please fix the directory search order for header files" 27 | #error "so that freetype.h of FreeType 2 is found first." 28 | #endif 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | 34 | /************************************************************************** 35 | * 36 | * @section: 37 | * pfr_fonts 38 | * 39 | * @title: 40 | * PFR Fonts 41 | * 42 | * @abstract: 43 | * PFR/TrueDoc-specific API. 44 | * 45 | * @description: 46 | * This section contains the declaration of PFR-specific functions. 47 | * 48 | */ 49 | 50 | 51 | /************************************************************************** 52 | * 53 | * @function: 54 | * FT_Get_PFR_Metrics 55 | * 56 | * @description: 57 | * Return the outline and metrics resolutions of a given PFR face. 58 | * 59 | * @input: 60 | * face :: 61 | * Handle to the input face. It can be a non-PFR face. 62 | * 63 | * @output: 64 | * aoutline_resolution :: 65 | * Outline resolution. This is equivalent to `face->units_per_EM` for 66 | * non-PFR fonts. Optional (parameter can be `NULL`). 67 | * 68 | * ametrics_resolution :: 69 | * Metrics resolution. This is equivalent to `outline_resolution` for 70 | * non-PFR fonts. Optional (parameter can be `NULL`). 71 | * 72 | * ametrics_x_scale :: 73 | * A 16.16 fixed-point number used to scale distance expressed in 74 | * metrics units to device subpixels. This is equivalent to 75 | * `face->size->x_scale`, but for metrics only. Optional (parameter 76 | * can be `NULL`). 77 | * 78 | * ametrics_y_scale :: 79 | * Same as `ametrics_x_scale` but for the vertical direction. 80 | * optional (parameter can be `NULL`). 81 | * 82 | * @return: 83 | * FreeType error code. 0~means success. 84 | * 85 | * @note: 86 | * If the input face is not a PFR, this function will return an error. 87 | * However, in all cases, it will return valid values. 88 | */ 89 | FT_EXPORT( FT_Error ) 90 | FT_Get_PFR_Metrics( FT_Face face, 91 | FT_UInt *aoutline_resolution, 92 | FT_UInt *ametrics_resolution, 93 | FT_Fixed *ametrics_x_scale, 94 | FT_Fixed *ametrics_y_scale ); 95 | 96 | 97 | /************************************************************************** 98 | * 99 | * @function: 100 | * FT_Get_PFR_Kerning 101 | * 102 | * @description: 103 | * Return the kerning pair corresponding to two glyphs in a PFR face. 104 | * The distance is expressed in metrics units, unlike the result of 105 | * @FT_Get_Kerning. 106 | * 107 | * @input: 108 | * face :: 109 | * A handle to the input face. 110 | * 111 | * left :: 112 | * Index of the left glyph. 113 | * 114 | * right :: 115 | * Index of the right glyph. 116 | * 117 | * @output: 118 | * avector :: 119 | * A kerning vector. 120 | * 121 | * @return: 122 | * FreeType error code. 0~means success. 123 | * 124 | * @note: 125 | * This function always return distances in original PFR metrics units. 126 | * This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED mode, 127 | * which always returns distances converted to outline units. 128 | * 129 | * You can use the value of the `x_scale` and `y_scale` parameters 130 | * returned by @FT_Get_PFR_Metrics to scale these to device subpixels. 131 | */ 132 | FT_EXPORT( FT_Error ) 133 | FT_Get_PFR_Kerning( FT_Face face, 134 | FT_UInt left, 135 | FT_UInt right, 136 | FT_Vector *avector ); 137 | 138 | 139 | /************************************************************************** 140 | * 141 | * @function: 142 | * FT_Get_PFR_Advance 143 | * 144 | * @description: 145 | * Return a given glyph advance, expressed in original metrics units, 146 | * from a PFR font. 147 | * 148 | * @input: 149 | * face :: 150 | * A handle to the input face. 151 | * 152 | * gindex :: 153 | * The glyph index. 154 | * 155 | * @output: 156 | * aadvance :: 157 | * The glyph advance in metrics units. 158 | * 159 | * @return: 160 | * FreeType error code. 0~means success. 161 | * 162 | * @note: 163 | * You can use the `x_scale` or `y_scale` results of @FT_Get_PFR_Metrics 164 | * to convert the advance to device subpixels (i.e., 1/64 of pixels). 165 | */ 166 | FT_EXPORT( FT_Error ) 167 | FT_Get_PFR_Advance( FT_Face face, 168 | FT_UInt gindex, 169 | FT_Pos *aadvance ); 170 | 171 | /* */ 172 | 173 | 174 | FT_END_HEADER 175 | 176 | #endif /* FTPFR_H_ */ 177 | 178 | 179 | /* END */ 180 | -------------------------------------------------------------------------------- /include/freetype/ftrender.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftrender.h 4 | * 5 | * FreeType renderer modules public interface (specification). 6 | * 7 | * Copyright (C) 1996-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTRENDER_H_ 20 | #define FTRENDER_H_ 21 | 22 | 23 | #include 24 | #include 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | /************************************************************************** 31 | * 32 | * @section: 33 | * module_management 34 | * 35 | */ 36 | 37 | 38 | /* create a new glyph object */ 39 | typedef FT_Error 40 | (*FT_Glyph_InitFunc)( FT_Glyph glyph, 41 | FT_GlyphSlot slot ); 42 | 43 | /* destroys a given glyph object */ 44 | typedef void 45 | (*FT_Glyph_DoneFunc)( FT_Glyph glyph ); 46 | 47 | typedef void 48 | (*FT_Glyph_TransformFunc)( FT_Glyph glyph, 49 | const FT_Matrix* matrix, 50 | const FT_Vector* delta ); 51 | 52 | typedef void 53 | (*FT_Glyph_GetBBoxFunc)( FT_Glyph glyph, 54 | FT_BBox* abbox ); 55 | 56 | typedef FT_Error 57 | (*FT_Glyph_CopyFunc)( FT_Glyph source, 58 | FT_Glyph target ); 59 | 60 | typedef FT_Error 61 | (*FT_Glyph_PrepareFunc)( FT_Glyph glyph, 62 | FT_GlyphSlot slot ); 63 | 64 | /* deprecated */ 65 | #define FT_Glyph_Init_Func FT_Glyph_InitFunc 66 | #define FT_Glyph_Done_Func FT_Glyph_DoneFunc 67 | #define FT_Glyph_Transform_Func FT_Glyph_TransformFunc 68 | #define FT_Glyph_BBox_Func FT_Glyph_GetBBoxFunc 69 | #define FT_Glyph_Copy_Func FT_Glyph_CopyFunc 70 | #define FT_Glyph_Prepare_Func FT_Glyph_PrepareFunc 71 | 72 | 73 | struct FT_Glyph_Class_ 74 | { 75 | FT_Long glyph_size; 76 | FT_Glyph_Format glyph_format; 77 | 78 | FT_Glyph_InitFunc glyph_init; 79 | FT_Glyph_DoneFunc glyph_done; 80 | FT_Glyph_CopyFunc glyph_copy; 81 | FT_Glyph_TransformFunc glyph_transform; 82 | FT_Glyph_GetBBoxFunc glyph_bbox; 83 | FT_Glyph_PrepareFunc glyph_prepare; 84 | }; 85 | 86 | 87 | typedef FT_Error 88 | (*FT_Renderer_RenderFunc)( FT_Renderer renderer, 89 | FT_GlyphSlot slot, 90 | FT_Render_Mode mode, 91 | const FT_Vector* origin ); 92 | 93 | typedef FT_Error 94 | (*FT_Renderer_TransformFunc)( FT_Renderer renderer, 95 | FT_GlyphSlot slot, 96 | const FT_Matrix* matrix, 97 | const FT_Vector* delta ); 98 | 99 | 100 | typedef void 101 | (*FT_Renderer_GetCBoxFunc)( FT_Renderer renderer, 102 | FT_GlyphSlot slot, 103 | FT_BBox* cbox ); 104 | 105 | 106 | typedef FT_Error 107 | (*FT_Renderer_SetModeFunc)( FT_Renderer renderer, 108 | FT_ULong mode_tag, 109 | FT_Pointer mode_ptr ); 110 | 111 | /* deprecated identifiers */ 112 | #define FTRenderer_render FT_Renderer_RenderFunc 113 | #define FTRenderer_transform FT_Renderer_TransformFunc 114 | #define FTRenderer_getCBox FT_Renderer_GetCBoxFunc 115 | #define FTRenderer_setMode FT_Renderer_SetModeFunc 116 | 117 | 118 | /************************************************************************** 119 | * 120 | * @struct: 121 | * FT_Renderer_Class 122 | * 123 | * @description: 124 | * The renderer module class descriptor. 125 | * 126 | * @fields: 127 | * root :: 128 | * The root @FT_Module_Class fields. 129 | * 130 | * glyph_format :: 131 | * The glyph image format this renderer handles. 132 | * 133 | * render_glyph :: 134 | * A method used to render the image that is in a given glyph slot into 135 | * a bitmap. 136 | * 137 | * transform_glyph :: 138 | * A method used to transform the image that is in a given glyph slot. 139 | * 140 | * get_glyph_cbox :: 141 | * A method used to access the glyph's cbox. 142 | * 143 | * set_mode :: 144 | * A method used to pass additional parameters. 145 | * 146 | * raster_class :: 147 | * For @FT_GLYPH_FORMAT_OUTLINE renderers only. This is a pointer to 148 | * its raster's class. 149 | */ 150 | typedef struct FT_Renderer_Class_ 151 | { 152 | FT_Module_Class root; 153 | 154 | FT_Glyph_Format glyph_format; 155 | 156 | FT_Renderer_RenderFunc render_glyph; 157 | FT_Renderer_TransformFunc transform_glyph; 158 | FT_Renderer_GetCBoxFunc get_glyph_cbox; 159 | FT_Renderer_SetModeFunc set_mode; 160 | 161 | const FT_Raster_Funcs* raster_class; 162 | 163 | } FT_Renderer_Class; 164 | 165 | 166 | /************************************************************************** 167 | * 168 | * @function: 169 | * FT_Get_Renderer 170 | * 171 | * @description: 172 | * Retrieve the current renderer for a given glyph format. 173 | * 174 | * @input: 175 | * library :: 176 | * A handle to the library object. 177 | * 178 | * format :: 179 | * The glyph format. 180 | * 181 | * @return: 182 | * A renderer handle. 0~if none found. 183 | * 184 | * @note: 185 | * An error will be returned if a module already exists by that name, or 186 | * if the module requires a version of FreeType that is too great. 187 | * 188 | * To add a new renderer, simply use @FT_Add_Module. To retrieve a 189 | * renderer by its name, use @FT_Get_Module. 190 | */ 191 | FT_EXPORT( FT_Renderer ) 192 | FT_Get_Renderer( FT_Library library, 193 | FT_Glyph_Format format ); 194 | 195 | 196 | /************************************************************************** 197 | * 198 | * @function: 199 | * FT_Set_Renderer 200 | * 201 | * @description: 202 | * Set the current renderer to use, and set additional mode. 203 | * 204 | * @inout: 205 | * library :: 206 | * A handle to the library object. 207 | * 208 | * @input: 209 | * renderer :: 210 | * A handle to the renderer object. 211 | * 212 | * num_params :: 213 | * The number of additional parameters. 214 | * 215 | * parameters :: 216 | * Additional parameters. 217 | * 218 | * @return: 219 | * FreeType error code. 0~means success. 220 | * 221 | * @note: 222 | * In case of success, the renderer will be used to convert glyph images 223 | * in the renderer's known format into bitmaps. 224 | * 225 | * This doesn't change the current renderer for other formats. 226 | * 227 | * Currently, no FreeType renderer module uses `parameters`; you should 228 | * thus always pass `NULL` as the value. 229 | */ 230 | FT_EXPORT( FT_Error ) 231 | FT_Set_Renderer( FT_Library library, 232 | FT_Renderer renderer, 233 | FT_UInt num_params, 234 | FT_Parameter* parameters ); 235 | 236 | /* */ 237 | 238 | 239 | FT_END_HEADER 240 | 241 | #endif /* FTRENDER_H_ */ 242 | 243 | 244 | /* END */ 245 | -------------------------------------------------------------------------------- /include/freetype/ftsizes.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftsizes.h 4 | * 5 | * FreeType size objects management (specification). 6 | * 7 | * Copyright (C) 1996-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * Typical application would normally not need to use these functions. 22 | * However, they have been placed in a public API for the rare cases where 23 | * they are needed. 24 | * 25 | */ 26 | 27 | 28 | #ifndef FTSIZES_H_ 29 | #define FTSIZES_H_ 30 | 31 | 32 | #include 33 | 34 | #ifdef FREETYPE_H 35 | #error "freetype.h of FreeType 1 has been loaded!" 36 | #error "Please fix the directory search order for header files" 37 | #error "so that freetype.h of FreeType 2 is found first." 38 | #endif 39 | 40 | 41 | FT_BEGIN_HEADER 42 | 43 | 44 | /************************************************************************** 45 | * 46 | * @section: 47 | * sizes_management 48 | * 49 | * @title: 50 | * Size Management 51 | * 52 | * @abstract: 53 | * Managing multiple sizes per face. 54 | * 55 | * @description: 56 | * When creating a new face object (e.g., with @FT_New_Face), an @FT_Size 57 | * object is automatically created and used to store all pixel-size 58 | * dependent information, available in the `face->size` field. 59 | * 60 | * It is however possible to create more sizes for a given face, mostly 61 | * in order to manage several character pixel sizes of the same font 62 | * family and style. See @FT_New_Size and @FT_Done_Size. 63 | * 64 | * Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only modify the 65 | * contents of the current 'active' size; you thus need to use 66 | * @FT_Activate_Size to change it. 67 | * 68 | * 99% of applications won't need the functions provided here, especially 69 | * if they use the caching sub-system, so be cautious when using these. 70 | * 71 | */ 72 | 73 | 74 | /************************************************************************** 75 | * 76 | * @function: 77 | * FT_New_Size 78 | * 79 | * @description: 80 | * Create a new size object from a given face object. 81 | * 82 | * @input: 83 | * face :: 84 | * A handle to a parent face object. 85 | * 86 | * @output: 87 | * asize :: 88 | * A handle to a new size object. 89 | * 90 | * @return: 91 | * FreeType error code. 0~means success. 92 | * 93 | * @note: 94 | * You need to call @FT_Activate_Size in order to select the new size for 95 | * upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size, 96 | * @FT_Load_Glyph, @FT_Load_Char, etc. 97 | */ 98 | FT_EXPORT( FT_Error ) 99 | FT_New_Size( FT_Face face, 100 | FT_Size* size ); 101 | 102 | 103 | /************************************************************************** 104 | * 105 | * @function: 106 | * FT_Done_Size 107 | * 108 | * @description: 109 | * Discard a given size object. Note that @FT_Done_Face automatically 110 | * discards all size objects allocated with @FT_New_Size. 111 | * 112 | * @input: 113 | * size :: 114 | * A handle to a target size object. 115 | * 116 | * @return: 117 | * FreeType error code. 0~means success. 118 | */ 119 | FT_EXPORT( FT_Error ) 120 | FT_Done_Size( FT_Size size ); 121 | 122 | 123 | /************************************************************************** 124 | * 125 | * @function: 126 | * FT_Activate_Size 127 | * 128 | * @description: 129 | * Even though it is possible to create several size objects for a given 130 | * face (see @FT_New_Size for details), functions like @FT_Load_Glyph or 131 | * @FT_Load_Char only use the one that has been activated last to 132 | * determine the 'current character pixel size'. 133 | * 134 | * This function can be used to 'activate' a previously created size 135 | * object. 136 | * 137 | * @input: 138 | * size :: 139 | * A handle to a target size object. 140 | * 141 | * @return: 142 | * FreeType error code. 0~means success. 143 | * 144 | * @note: 145 | * If `face` is the size's parent face object, this function changes the 146 | * value of `face->size` to the input size handle. 147 | */ 148 | FT_EXPORT( FT_Error ) 149 | FT_Activate_Size( FT_Size size ); 150 | 151 | /* */ 152 | 153 | 154 | FT_END_HEADER 155 | 156 | #endif /* FTSIZES_H_ */ 157 | 158 | 159 | /* END */ 160 | -------------------------------------------------------------------------------- /include/freetype/ftsnames.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftsnames.h 4 | * 5 | * Simple interface to access SFNT 'name' tables (which are used 6 | * to hold font names, copyright info, notices, etc.) (specification). 7 | * 8 | * This is _not_ used to retrieve glyph names! 9 | * 10 | * Copyright (C) 1996-2024 by 11 | * David Turner, Robert Wilhelm, and Werner Lemberg. 12 | * 13 | * This file is part of the FreeType project, and may only be used, 14 | * modified, and distributed under the terms of the FreeType project 15 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 16 | * this file you indicate that you have read the license and 17 | * understand and accept it fully. 18 | * 19 | */ 20 | 21 | 22 | #ifndef FTSNAMES_H_ 23 | #define FTSNAMES_H_ 24 | 25 | 26 | #include 27 | #include 28 | 29 | #ifdef FREETYPE_H 30 | #error "freetype.h of FreeType 1 has been loaded!" 31 | #error "Please fix the directory search order for header files" 32 | #error "so that freetype.h of FreeType 2 is found first." 33 | #endif 34 | 35 | 36 | FT_BEGIN_HEADER 37 | 38 | 39 | /************************************************************************** 40 | * 41 | * @section: 42 | * sfnt_names 43 | * 44 | * @title: 45 | * SFNT Names 46 | * 47 | * @abstract: 48 | * Access the names embedded in TrueType and OpenType files. 49 | * 50 | * @description: 51 | * The TrueType and OpenType specifications allow the inclusion of a 52 | * special names table ('name') in font files. This table contains 53 | * textual (and internationalized) information regarding the font, like 54 | * family name, copyright, version, etc. 55 | * 56 | * The definitions below are used to access them if available. 57 | * 58 | * Note that this has nothing to do with glyph names! 59 | * 60 | */ 61 | 62 | 63 | /************************************************************************** 64 | * 65 | * @struct: 66 | * FT_SfntName 67 | * 68 | * @description: 69 | * A structure used to model an SFNT 'name' table entry. 70 | * 71 | * @fields: 72 | * platform_id :: 73 | * The platform ID for `string`. See @TT_PLATFORM_XXX for possible 74 | * values. 75 | * 76 | * encoding_id :: 77 | * The encoding ID for `string`. See @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, 78 | * @TT_ISO_ID_XXX, @TT_MS_ID_XXX, and @TT_ADOBE_ID_XXX for possible 79 | * values. 80 | * 81 | * language_id :: 82 | * The language ID for `string`. See @TT_MAC_LANGID_XXX and 83 | * @TT_MS_LANGID_XXX for possible values. 84 | * 85 | * Registered OpenType values for `language_id` are always smaller than 86 | * 0x8000; values equal or larger than 0x8000 usually indicate a 87 | * language tag string (introduced in OpenType version 1.6). Use 88 | * function @FT_Get_Sfnt_LangTag with `language_id` as its argument to 89 | * retrieve the associated language tag. 90 | * 91 | * name_id :: 92 | * An identifier for `string`. See @TT_NAME_ID_XXX for possible 93 | * values. 94 | * 95 | * string :: 96 | * The 'name' string. Note that its format differs depending on the 97 | * (platform,encoding) pair, being either a string of bytes (without a 98 | * terminating `NULL` byte) or containing UTF-16BE entities. 99 | * 100 | * string_len :: 101 | * The length of `string` in bytes. 102 | * 103 | * @note: 104 | * Please refer to the TrueType or OpenType specification for more 105 | * details. 106 | */ 107 | typedef struct FT_SfntName_ 108 | { 109 | FT_UShort platform_id; 110 | FT_UShort encoding_id; 111 | FT_UShort language_id; 112 | FT_UShort name_id; 113 | 114 | FT_Byte* string; /* this string is *not* null-terminated! */ 115 | FT_UInt string_len; /* in bytes */ 116 | 117 | } FT_SfntName; 118 | 119 | 120 | /************************************************************************** 121 | * 122 | * @function: 123 | * FT_Get_Sfnt_Name_Count 124 | * 125 | * @description: 126 | * Retrieve the number of name strings in the SFNT 'name' table. 127 | * 128 | * @input: 129 | * face :: 130 | * A handle to the source face. 131 | * 132 | * @return: 133 | * The number of strings in the 'name' table. 134 | * 135 | * @note: 136 | * This function always returns an error if the config macro 137 | * `TT_CONFIG_OPTION_SFNT_NAMES` is not defined in `ftoption.h`. 138 | */ 139 | FT_EXPORT( FT_UInt ) 140 | FT_Get_Sfnt_Name_Count( FT_Face face ); 141 | 142 | 143 | /************************************************************************** 144 | * 145 | * @function: 146 | * FT_Get_Sfnt_Name 147 | * 148 | * @description: 149 | * Retrieve a string of the SFNT 'name' table for a given index. 150 | * 151 | * @input: 152 | * face :: 153 | * A handle to the source face. 154 | * 155 | * idx :: 156 | * The index of the 'name' string. 157 | * 158 | * @output: 159 | * aname :: 160 | * The indexed @FT_SfntName structure. 161 | * 162 | * @return: 163 | * FreeType error code. 0~means success. 164 | * 165 | * @note: 166 | * The `string` array returned in the `aname` structure is not 167 | * null-terminated. Note that you don't have to deallocate `string` by 168 | * yourself; FreeType takes care of it if you call @FT_Done_Face. 169 | * 170 | * Use @FT_Get_Sfnt_Name_Count to get the total number of available 171 | * 'name' table entries, then do a loop until you get the right platform, 172 | * encoding, and name ID. 173 | * 174 | * 'name' table format~1 entries can use language tags also, see 175 | * @FT_Get_Sfnt_LangTag. 176 | * 177 | * This function always returns an error if the config macro 178 | * `TT_CONFIG_OPTION_SFNT_NAMES` is not defined in `ftoption.h`. 179 | */ 180 | FT_EXPORT( FT_Error ) 181 | FT_Get_Sfnt_Name( FT_Face face, 182 | FT_UInt idx, 183 | FT_SfntName *aname ); 184 | 185 | 186 | /************************************************************************** 187 | * 188 | * @struct: 189 | * FT_SfntLangTag 190 | * 191 | * @description: 192 | * A structure to model a language tag entry from an SFNT 'name' table. 193 | * 194 | * @fields: 195 | * string :: 196 | * The language tag string, encoded in UTF-16BE (without trailing 197 | * `NULL` bytes). 198 | * 199 | * string_len :: 200 | * The length of `string` in **bytes**. 201 | * 202 | * @note: 203 | * Please refer to the TrueType or OpenType specification for more 204 | * details. 205 | * 206 | * @since: 207 | * 2.8 208 | */ 209 | typedef struct FT_SfntLangTag_ 210 | { 211 | FT_Byte* string; /* this string is *not* null-terminated! */ 212 | FT_UInt string_len; /* in bytes */ 213 | 214 | } FT_SfntLangTag; 215 | 216 | 217 | /************************************************************************** 218 | * 219 | * @function: 220 | * FT_Get_Sfnt_LangTag 221 | * 222 | * @description: 223 | * Retrieve the language tag associated with a language ID of an SFNT 224 | * 'name' table entry. 225 | * 226 | * @input: 227 | * face :: 228 | * A handle to the source face. 229 | * 230 | * langID :: 231 | * The language ID, as returned by @FT_Get_Sfnt_Name. This is always a 232 | * value larger than 0x8000. 233 | * 234 | * @output: 235 | * alangTag :: 236 | * The language tag associated with the 'name' table entry's language 237 | * ID. 238 | * 239 | * @return: 240 | * FreeType error code. 0~means success. 241 | * 242 | * @note: 243 | * The `string` array returned in the `alangTag` structure is not 244 | * null-terminated. Note that you don't have to deallocate `string` by 245 | * yourself; FreeType takes care of it if you call @FT_Done_Face. 246 | * 247 | * Only 'name' table format~1 supports language tags. For format~0 248 | * tables, this function always returns FT_Err_Invalid_Table. For 249 | * invalid format~1 language ID values, FT_Err_Invalid_Argument is 250 | * returned. 251 | * 252 | * This function always returns an error if the config macro 253 | * `TT_CONFIG_OPTION_SFNT_NAMES` is not defined in `ftoption.h`. 254 | * 255 | * @since: 256 | * 2.8 257 | */ 258 | FT_EXPORT( FT_Error ) 259 | FT_Get_Sfnt_LangTag( FT_Face face, 260 | FT_UInt langID, 261 | FT_SfntLangTag *alangTag ); 262 | 263 | 264 | /* */ 265 | 266 | 267 | FT_END_HEADER 268 | 269 | #endif /* FTSNAMES_H_ */ 270 | 271 | 272 | /* END */ 273 | -------------------------------------------------------------------------------- /include/freetype/ftsynth.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftsynth.h 4 | * 5 | * FreeType synthesizing code for emboldening and slanting 6 | * (specification). 7 | * 8 | * Copyright (C) 2000-2024 by 9 | * David Turner, Robert Wilhelm, and Werner Lemberg. 10 | * 11 | * This file is part of the FreeType project, and may only be used, 12 | * modified, and distributed under the terms of the FreeType project 13 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 14 | * this file you indicate that you have read the license and 15 | * understand and accept it fully. 16 | * 17 | */ 18 | 19 | 20 | /*************************************************************************/ 21 | /*************************************************************************/ 22 | /*************************************************************************/ 23 | /*************************************************************************/ 24 | /*************************************************************************/ 25 | /********* *********/ 26 | /********* WARNING, THIS IS ALPHA CODE! THIS API *********/ 27 | /********* IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE *********/ 28 | /********* FREETYPE DEVELOPMENT TEAM *********/ 29 | /********* *********/ 30 | /*************************************************************************/ 31 | /*************************************************************************/ 32 | /*************************************************************************/ 33 | /*************************************************************************/ 34 | /*************************************************************************/ 35 | 36 | 37 | /* Main reason for not lifting the functions in this module to a */ 38 | /* 'standard' API is that the used parameters for emboldening and */ 39 | /* slanting are not configurable. Consider the functions as a */ 40 | /* code resource that should be copied into the application and */ 41 | /* adapted to the particular needs. */ 42 | 43 | 44 | #ifndef FTSYNTH_H_ 45 | #define FTSYNTH_H_ 46 | 47 | 48 | #include 49 | 50 | #ifdef FREETYPE_H 51 | #error "freetype.h of FreeType 1 has been loaded!" 52 | #error "Please fix the directory search order for header files" 53 | #error "so that freetype.h of FreeType 2 is found first." 54 | #endif 55 | 56 | 57 | FT_BEGIN_HEADER 58 | 59 | /* Embolden a glyph by a 'reasonable' value (which is highly a matter of */ 60 | /* taste). This function is actually a convenience function, providing */ 61 | /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */ 62 | /* */ 63 | /* For emboldened outlines the height, width, and advance metrics are */ 64 | /* increased by the strength of the emboldening -- this even affects */ 65 | /* mono-width fonts! */ 66 | /* */ 67 | /* You can also call @FT_Outline_Get_CBox to get precise values. */ 68 | FT_EXPORT( void ) 69 | FT_GlyphSlot_Embolden( FT_GlyphSlot slot ); 70 | 71 | /* Precisely adjust the glyph weight either horizontally or vertically. */ 72 | /* The `xdelta` and `ydelta` values are fractions of the face Em size */ 73 | /* (in fixed-point format). Considering that a regular face would have */ 74 | /* stem widths on the order of 0.1 Em, a delta of 0.05 (0x0CCC) should */ 75 | /* be very noticeable. To increase or decrease the weight, use positive */ 76 | /* or negative values, respectively. */ 77 | FT_EXPORT( void ) 78 | FT_GlyphSlot_AdjustWeight( FT_GlyphSlot slot, 79 | FT_Fixed xdelta, 80 | FT_Fixed ydelta ); 81 | 82 | 83 | /* Slant an outline glyph to the right by about 12 degrees. */ 84 | FT_EXPORT( void ) 85 | FT_GlyphSlot_Oblique( FT_GlyphSlot slot ); 86 | 87 | /* Slant an outline glyph by a given sine of an angle. You can apply */ 88 | /* slant along either x- or y-axis by choosing a corresponding non-zero */ 89 | /* argument. If both slants are non-zero, some affine transformation */ 90 | /* will result. */ 91 | FT_EXPORT( void ) 92 | FT_GlyphSlot_Slant( FT_GlyphSlot slot, 93 | FT_Fixed xslant, 94 | FT_Fixed yslant ); 95 | 96 | /* */ 97 | 98 | 99 | FT_END_HEADER 100 | 101 | #endif /* FTSYNTH_H_ */ 102 | 103 | 104 | /* END */ 105 | -------------------------------------------------------------------------------- /include/freetype/ftsystem.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftsystem.h 4 | * 5 | * FreeType low-level system interface definition (specification). 6 | * 7 | * Copyright (C) 1996-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTSYSTEM_H_ 20 | #define FTSYSTEM_H_ 21 | 22 | 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /************************************************************************** 29 | * 30 | * @section: 31 | * system_interface 32 | * 33 | * @title: 34 | * System Interface 35 | * 36 | * @abstract: 37 | * How FreeType manages memory and i/o. 38 | * 39 | * @description: 40 | * This section contains various definitions related to memory management 41 | * and i/o access. You need to understand this information if you want to 42 | * use a custom memory manager or you own i/o streams. 43 | * 44 | */ 45 | 46 | 47 | /************************************************************************** 48 | * 49 | * M E M O R Y M A N A G E M E N T 50 | * 51 | */ 52 | 53 | 54 | /************************************************************************** 55 | * 56 | * @type: 57 | * FT_Memory 58 | * 59 | * @description: 60 | * A handle to a given memory manager object, defined with an 61 | * @FT_MemoryRec structure. 62 | * 63 | */ 64 | typedef struct FT_MemoryRec_* FT_Memory; 65 | 66 | 67 | /************************************************************************** 68 | * 69 | * @functype: 70 | * FT_Alloc_Func 71 | * 72 | * @description: 73 | * A function used to allocate `size` bytes from `memory`. 74 | * 75 | * @input: 76 | * memory :: 77 | * A handle to the source memory manager. 78 | * 79 | * size :: 80 | * The size in bytes to allocate. 81 | * 82 | * @return: 83 | * Address of new memory block. 0~in case of failure. 84 | * 85 | */ 86 | typedef void* 87 | (*FT_Alloc_Func)( FT_Memory memory, 88 | long size ); 89 | 90 | 91 | /************************************************************************** 92 | * 93 | * @functype: 94 | * FT_Free_Func 95 | * 96 | * @description: 97 | * A function used to release a given block of memory. 98 | * 99 | * @input: 100 | * memory :: 101 | * A handle to the source memory manager. 102 | * 103 | * block :: 104 | * The address of the target memory block. 105 | * 106 | */ 107 | typedef void 108 | (*FT_Free_Func)( FT_Memory memory, 109 | void* block ); 110 | 111 | 112 | /************************************************************************** 113 | * 114 | * @functype: 115 | * FT_Realloc_Func 116 | * 117 | * @description: 118 | * A function used to re-allocate a given block of memory. 119 | * 120 | * @input: 121 | * memory :: 122 | * A handle to the source memory manager. 123 | * 124 | * cur_size :: 125 | * The block's current size in bytes. 126 | * 127 | * new_size :: 128 | * The block's requested new size. 129 | * 130 | * block :: 131 | * The block's current address. 132 | * 133 | * @return: 134 | * New block address. 0~in case of memory shortage. 135 | * 136 | * @note: 137 | * In case of error, the old block must still be available. 138 | * 139 | */ 140 | typedef void* 141 | (*FT_Realloc_Func)( FT_Memory memory, 142 | long cur_size, 143 | long new_size, 144 | void* block ); 145 | 146 | 147 | /************************************************************************** 148 | * 149 | * @struct: 150 | * FT_MemoryRec 151 | * 152 | * @description: 153 | * A structure used to describe a given memory manager to FreeType~2. 154 | * 155 | * @fields: 156 | * user :: 157 | * A generic typeless pointer for user data. 158 | * 159 | * alloc :: 160 | * A pointer type to an allocation function. 161 | * 162 | * free :: 163 | * A pointer type to an memory freeing function. 164 | * 165 | * realloc :: 166 | * A pointer type to a reallocation function. 167 | * 168 | */ 169 | struct FT_MemoryRec_ 170 | { 171 | void* user; 172 | FT_Alloc_Func alloc; 173 | FT_Free_Func free; 174 | FT_Realloc_Func realloc; 175 | }; 176 | 177 | 178 | /************************************************************************** 179 | * 180 | * I / O M A N A G E M E N T 181 | * 182 | */ 183 | 184 | 185 | /************************************************************************** 186 | * 187 | * @type: 188 | * FT_Stream 189 | * 190 | * @description: 191 | * A handle to an input stream. 192 | * 193 | * @also: 194 | * See @FT_StreamRec for the publicly accessible fields of a given stream 195 | * object. 196 | * 197 | */ 198 | typedef struct FT_StreamRec_* FT_Stream; 199 | 200 | 201 | /************************************************************************** 202 | * 203 | * @struct: 204 | * FT_StreamDesc 205 | * 206 | * @description: 207 | * A union type used to store either a long or a pointer. This is used 208 | * to store a file descriptor or a `FILE*` in an input stream. 209 | * 210 | */ 211 | typedef union FT_StreamDesc_ 212 | { 213 | long value; 214 | void* pointer; 215 | 216 | } FT_StreamDesc; 217 | 218 | 219 | /************************************************************************** 220 | * 221 | * @functype: 222 | * FT_Stream_IoFunc 223 | * 224 | * @description: 225 | * A function used to seek and read data from a given input stream. 226 | * 227 | * @input: 228 | * stream :: 229 | * A handle to the source stream. 230 | * 231 | * offset :: 232 | * The offset from the start of the stream to seek to. 233 | * 234 | * buffer :: 235 | * The address of the read buffer. 236 | * 237 | * count :: 238 | * The number of bytes to read from the stream. 239 | * 240 | * @return: 241 | * If count >~0, return the number of bytes effectively read by the 242 | * stream (after seeking to `offset`). If count ==~0, return the status 243 | * of the seek operation (non-zero indicates an error). 244 | * 245 | */ 246 | typedef unsigned long 247 | (*FT_Stream_IoFunc)( FT_Stream stream, 248 | unsigned long offset, 249 | unsigned char* buffer, 250 | unsigned long count ); 251 | 252 | 253 | /************************************************************************** 254 | * 255 | * @functype: 256 | * FT_Stream_CloseFunc 257 | * 258 | * @description: 259 | * A function used to close a given input stream. 260 | * 261 | * @input: 262 | * stream :: 263 | * A handle to the target stream. 264 | * 265 | */ 266 | typedef void 267 | (*FT_Stream_CloseFunc)( FT_Stream stream ); 268 | 269 | 270 | /************************************************************************** 271 | * 272 | * @struct: 273 | * FT_StreamRec 274 | * 275 | * @description: 276 | * A structure used to describe an input stream. 277 | * 278 | * @input: 279 | * base :: 280 | * For memory-based streams, this is the address of the first stream 281 | * byte in memory. This field should always be set to `NULL` for 282 | * disk-based streams. 283 | * 284 | * size :: 285 | * The stream size in bytes. 286 | * 287 | * In case of compressed streams where the size is unknown before 288 | * actually doing the decompression, the value is set to 0x7FFFFFFF. 289 | * (Note that this size value can occur for normal streams also; it is 290 | * thus just a hint.) 291 | * 292 | * pos :: 293 | * The current position within the stream. 294 | * 295 | * descriptor :: 296 | * This field is a union that can hold an integer or a pointer. It is 297 | * used by stream implementations to store file descriptors or `FILE*` 298 | * pointers. 299 | * 300 | * pathname :: 301 | * This field is completely ignored by FreeType. However, it is often 302 | * useful during debugging to use it to store the stream's filename 303 | * (where available). 304 | * 305 | * read :: 306 | * The stream's input function. 307 | * 308 | * close :: 309 | * The stream's close function. 310 | * 311 | * memory :: 312 | * The memory manager to use to preload frames. This is set internally 313 | * by FreeType and shouldn't be touched by stream implementations. 314 | * 315 | * cursor :: 316 | * This field is set and used internally by FreeType when parsing 317 | * frames. In particular, the `FT_GET_XXX` macros use this instead of 318 | * the `pos` field. 319 | * 320 | * limit :: 321 | * This field is set and used internally by FreeType when parsing 322 | * frames. 323 | * 324 | */ 325 | typedef struct FT_StreamRec_ 326 | { 327 | unsigned char* base; 328 | unsigned long size; 329 | unsigned long pos; 330 | 331 | FT_StreamDesc descriptor; 332 | FT_StreamDesc pathname; 333 | FT_Stream_IoFunc read; 334 | FT_Stream_CloseFunc close; 335 | 336 | FT_Memory memory; 337 | unsigned char* cursor; 338 | unsigned char* limit; 339 | 340 | } FT_StreamRec; 341 | 342 | /* */ 343 | 344 | 345 | FT_END_HEADER 346 | 347 | #endif /* FTSYSTEM_H_ */ 348 | 349 | 350 | /* END */ 351 | -------------------------------------------------------------------------------- /include/freetype/fttrigon.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * fttrigon.h 4 | * 5 | * FreeType trigonometric functions (specification). 6 | * 7 | * Copyright (C) 2001-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTTRIGON_H_ 20 | #define FTTRIGON_H_ 21 | 22 | #include 23 | 24 | #ifdef FREETYPE_H 25 | #error "freetype.h of FreeType 1 has been loaded!" 26 | #error "Please fix the directory search order for header files" 27 | #error "so that freetype.h of FreeType 2 is found first." 28 | #endif 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | 34 | /************************************************************************** 35 | * 36 | * @section: 37 | * computations 38 | * 39 | */ 40 | 41 | 42 | /************************************************************************** 43 | * 44 | * @type: 45 | * FT_Angle 46 | * 47 | * @description: 48 | * This type is used to model angle values in FreeType. Note that the 49 | * angle is a 16.16 fixed-point value expressed in degrees. 50 | * 51 | */ 52 | typedef FT_Fixed FT_Angle; 53 | 54 | 55 | /************************************************************************** 56 | * 57 | * @macro: 58 | * FT_ANGLE_PI 59 | * 60 | * @description: 61 | * The angle pi expressed in @FT_Angle units. 62 | * 63 | */ 64 | #define FT_ANGLE_PI ( 180L << 16 ) 65 | 66 | 67 | /************************************************************************** 68 | * 69 | * @macro: 70 | * FT_ANGLE_2PI 71 | * 72 | * @description: 73 | * The angle 2*pi expressed in @FT_Angle units. 74 | * 75 | */ 76 | #define FT_ANGLE_2PI ( FT_ANGLE_PI * 2 ) 77 | 78 | 79 | /************************************************************************** 80 | * 81 | * @macro: 82 | * FT_ANGLE_PI2 83 | * 84 | * @description: 85 | * The angle pi/2 expressed in @FT_Angle units. 86 | * 87 | */ 88 | #define FT_ANGLE_PI2 ( FT_ANGLE_PI / 2 ) 89 | 90 | 91 | /************************************************************************** 92 | * 93 | * @macro: 94 | * FT_ANGLE_PI4 95 | * 96 | * @description: 97 | * The angle pi/4 expressed in @FT_Angle units. 98 | * 99 | */ 100 | #define FT_ANGLE_PI4 ( FT_ANGLE_PI / 4 ) 101 | 102 | 103 | /************************************************************************** 104 | * 105 | * @function: 106 | * FT_Sin 107 | * 108 | * @description: 109 | * Return the sinus of a given angle in fixed-point format. 110 | * 111 | * @input: 112 | * angle :: 113 | * The input angle. 114 | * 115 | * @return: 116 | * The sinus value. 117 | * 118 | * @note: 119 | * If you need both the sinus and cosinus for a given angle, use the 120 | * function @FT_Vector_Unit. 121 | * 122 | */ 123 | FT_EXPORT( FT_Fixed ) 124 | FT_Sin( FT_Angle angle ); 125 | 126 | 127 | /************************************************************************** 128 | * 129 | * @function: 130 | * FT_Cos 131 | * 132 | * @description: 133 | * Return the cosinus of a given angle in fixed-point format. 134 | * 135 | * @input: 136 | * angle :: 137 | * The input angle. 138 | * 139 | * @return: 140 | * The cosinus value. 141 | * 142 | * @note: 143 | * If you need both the sinus and cosinus for a given angle, use the 144 | * function @FT_Vector_Unit. 145 | * 146 | */ 147 | FT_EXPORT( FT_Fixed ) 148 | FT_Cos( FT_Angle angle ); 149 | 150 | 151 | /************************************************************************** 152 | * 153 | * @function: 154 | * FT_Tan 155 | * 156 | * @description: 157 | * Return the tangent of a given angle in fixed-point format. 158 | * 159 | * @input: 160 | * angle :: 161 | * The input angle. 162 | * 163 | * @return: 164 | * The tangent value. 165 | * 166 | */ 167 | FT_EXPORT( FT_Fixed ) 168 | FT_Tan( FT_Angle angle ); 169 | 170 | 171 | /************************************************************************** 172 | * 173 | * @function: 174 | * FT_Atan2 175 | * 176 | * @description: 177 | * Return the arc-tangent corresponding to a given vector (x,y) in the 2d 178 | * plane. 179 | * 180 | * @input: 181 | * x :: 182 | * The horizontal vector coordinate. 183 | * 184 | * y :: 185 | * The vertical vector coordinate. 186 | * 187 | * @return: 188 | * The arc-tangent value (i.e. angle). 189 | * 190 | */ 191 | FT_EXPORT( FT_Angle ) 192 | FT_Atan2( FT_Fixed x, 193 | FT_Fixed y ); 194 | 195 | 196 | /************************************************************************** 197 | * 198 | * @function: 199 | * FT_Angle_Diff 200 | * 201 | * @description: 202 | * Return the difference between two angles. The result is always 203 | * constrained to the ]-PI..PI] interval. 204 | * 205 | * @input: 206 | * angle1 :: 207 | * First angle. 208 | * 209 | * angle2 :: 210 | * Second angle. 211 | * 212 | * @return: 213 | * Constrained value of `angle2-angle1`. 214 | * 215 | */ 216 | FT_EXPORT( FT_Angle ) 217 | FT_Angle_Diff( FT_Angle angle1, 218 | FT_Angle angle2 ); 219 | 220 | 221 | /************************************************************************** 222 | * 223 | * @function: 224 | * FT_Vector_Unit 225 | * 226 | * @description: 227 | * Return the unit vector corresponding to a given angle. After the 228 | * call, the value of `vec.x` will be `cos(angle)`, and the value of 229 | * `vec.y` will be `sin(angle)`. 230 | * 231 | * This function is useful to retrieve both the sinus and cosinus of a 232 | * given angle quickly. 233 | * 234 | * @output: 235 | * vec :: 236 | * The address of target vector. 237 | * 238 | * @input: 239 | * angle :: 240 | * The input angle. 241 | * 242 | */ 243 | FT_EXPORT( void ) 244 | FT_Vector_Unit( FT_Vector* vec, 245 | FT_Angle angle ); 246 | 247 | 248 | /************************************************************************** 249 | * 250 | * @function: 251 | * FT_Vector_Rotate 252 | * 253 | * @description: 254 | * Rotate a vector by a given angle. 255 | * 256 | * @inout: 257 | * vec :: 258 | * The address of target vector. 259 | * 260 | * @input: 261 | * angle :: 262 | * The input angle. 263 | * 264 | */ 265 | FT_EXPORT( void ) 266 | FT_Vector_Rotate( FT_Vector* vec, 267 | FT_Angle angle ); 268 | 269 | 270 | /************************************************************************** 271 | * 272 | * @function: 273 | * FT_Vector_Length 274 | * 275 | * @description: 276 | * Return the length of a given vector. 277 | * 278 | * @input: 279 | * vec :: 280 | * The address of target vector. 281 | * 282 | * @return: 283 | * The vector length, expressed in the same units that the original 284 | * vector coordinates. 285 | * 286 | */ 287 | FT_EXPORT( FT_Fixed ) 288 | FT_Vector_Length( FT_Vector* vec ); 289 | 290 | 291 | /************************************************************************** 292 | * 293 | * @function: 294 | * FT_Vector_Polarize 295 | * 296 | * @description: 297 | * Compute both the length and angle of a given vector. 298 | * 299 | * @input: 300 | * vec :: 301 | * The address of source vector. 302 | * 303 | * @output: 304 | * length :: 305 | * The vector length. 306 | * 307 | * angle :: 308 | * The vector angle. 309 | * 310 | */ 311 | FT_EXPORT( void ) 312 | FT_Vector_Polarize( FT_Vector* vec, 313 | FT_Fixed *length, 314 | FT_Angle *angle ); 315 | 316 | 317 | /************************************************************************** 318 | * 319 | * @function: 320 | * FT_Vector_From_Polar 321 | * 322 | * @description: 323 | * Compute vector coordinates from a length and angle. 324 | * 325 | * @output: 326 | * vec :: 327 | * The address of source vector. 328 | * 329 | * @input: 330 | * length :: 331 | * The vector length. 332 | * 333 | * angle :: 334 | * The vector angle. 335 | * 336 | */ 337 | FT_EXPORT( void ) 338 | FT_Vector_From_Polar( FT_Vector* vec, 339 | FT_Fixed length, 340 | FT_Angle angle ); 341 | 342 | /* */ 343 | 344 | 345 | FT_END_HEADER 346 | 347 | #endif /* FTTRIGON_H_ */ 348 | 349 | 350 | /* END */ 351 | -------------------------------------------------------------------------------- /include/freetype/ftwinfnt.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftwinfnt.h 4 | * 5 | * FreeType API for accessing Windows fnt-specific data. 6 | * 7 | * Copyright (C) 2003-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTWINFNT_H_ 20 | #define FTWINFNT_H_ 21 | 22 | #include 23 | 24 | #ifdef FREETYPE_H 25 | #error "freetype.h of FreeType 1 has been loaded!" 26 | #error "Please fix the directory search order for header files" 27 | #error "so that freetype.h of FreeType 2 is found first." 28 | #endif 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | 34 | /************************************************************************** 35 | * 36 | * @section: 37 | * winfnt_fonts 38 | * 39 | * @title: 40 | * Window FNT Files 41 | * 42 | * @abstract: 43 | * Windows FNT-specific API. 44 | * 45 | * @description: 46 | * This section contains the declaration of Windows FNT-specific 47 | * functions. 48 | * 49 | */ 50 | 51 | 52 | /************************************************************************** 53 | * 54 | * @enum: 55 | * FT_WinFNT_ID_XXX 56 | * 57 | * @description: 58 | * A list of valid values for the `charset` byte in @FT_WinFNT_HeaderRec. 59 | * Exact mapping tables for the various 'cpXXXX' encodings (except for 60 | * 'cp1361') can be found at 'ftp://ftp.unicode.org/Public/' in the 61 | * `MAPPINGS/VENDORS/MICSFT/WINDOWS` subdirectory. 'cp1361' is roughly a 62 | * superset of `MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT`. 63 | * 64 | * @values: 65 | * FT_WinFNT_ID_DEFAULT :: 66 | * This is used for font enumeration and font creation as a 'don't 67 | * care' value. Valid font files don't contain this value. When 68 | * querying for information about the character set of the font that is 69 | * currently selected into a specified device context, this return 70 | * value (of the related Windows API) simply denotes failure. 71 | * 72 | * FT_WinFNT_ID_SYMBOL :: 73 | * There is no known mapping table available. 74 | * 75 | * FT_WinFNT_ID_MAC :: 76 | * Mac Roman encoding. 77 | * 78 | * FT_WinFNT_ID_OEM :: 79 | * From Michael Poettgen : 80 | * 81 | * The 'Windows Font Mapping' article says that `FT_WinFNT_ID_OEM` is 82 | * used for the charset of vector fonts, like `modern.fon`, 83 | * `roman.fon`, and `script.fon` on Windows. 84 | * 85 | * The 'CreateFont' documentation says: The `FT_WinFNT_ID_OEM` value 86 | * specifies a character set that is operating-system dependent. 87 | * 88 | * The 'IFIMETRICS' documentation from the 'Windows Driver Development 89 | * Kit' says: This font supports an OEM-specific character set. The 90 | * OEM character set is system dependent. 91 | * 92 | * In general OEM, as opposed to ANSI (i.e., 'cp1252'), denotes the 93 | * second default codepage that most international versions of Windows 94 | * have. It is one of the OEM codepages from 95 | * 96 | * https://docs.microsoft.com/en-us/windows/desktop/intl/code-page-identifiers 97 | * , 98 | * 99 | * and is used for the 'DOS boxes', to support legacy applications. A 100 | * German Windows version for example usually uses ANSI codepage 1252 101 | * and OEM codepage 850. 102 | * 103 | * FT_WinFNT_ID_CP874 :: 104 | * A superset of Thai TIS 620 and ISO 8859-11. 105 | * 106 | * FT_WinFNT_ID_CP932 :: 107 | * A superset of Japanese Shift-JIS (with minor deviations). 108 | * 109 | * FT_WinFNT_ID_CP936 :: 110 | * A superset of simplified Chinese GB 2312-1980 (with different 111 | * ordering and minor deviations). 112 | * 113 | * FT_WinFNT_ID_CP949 :: 114 | * A superset of Korean Hangul KS~C 5601-1987 (with different ordering 115 | * and minor deviations). 116 | * 117 | * FT_WinFNT_ID_CP950 :: 118 | * A superset of traditional Chinese Big~5 ETen (with different 119 | * ordering and minor deviations). 120 | * 121 | * FT_WinFNT_ID_CP1250 :: 122 | * A superset of East European ISO 8859-2 (with slightly different 123 | * ordering). 124 | * 125 | * FT_WinFNT_ID_CP1251 :: 126 | * A superset of Russian ISO 8859-5 (with different ordering). 127 | * 128 | * FT_WinFNT_ID_CP1252 :: 129 | * ANSI encoding. A superset of ISO 8859-1. 130 | * 131 | * FT_WinFNT_ID_CP1253 :: 132 | * A superset of Greek ISO 8859-7 (with minor modifications). 133 | * 134 | * FT_WinFNT_ID_CP1254 :: 135 | * A superset of Turkish ISO 8859-9. 136 | * 137 | * FT_WinFNT_ID_CP1255 :: 138 | * A superset of Hebrew ISO 8859-8 (with some modifications). 139 | * 140 | * FT_WinFNT_ID_CP1256 :: 141 | * A superset of Arabic ISO 8859-6 (with different ordering). 142 | * 143 | * FT_WinFNT_ID_CP1257 :: 144 | * A superset of Baltic ISO 8859-13 (with some deviations). 145 | * 146 | * FT_WinFNT_ID_CP1258 :: 147 | * For Vietnamese. This encoding doesn't cover all necessary 148 | * characters. 149 | * 150 | * FT_WinFNT_ID_CP1361 :: 151 | * Korean (Johab). 152 | */ 153 | 154 | #define FT_WinFNT_ID_CP1252 0 155 | #define FT_WinFNT_ID_DEFAULT 1 156 | #define FT_WinFNT_ID_SYMBOL 2 157 | #define FT_WinFNT_ID_MAC 77 158 | #define FT_WinFNT_ID_CP932 128 159 | #define FT_WinFNT_ID_CP949 129 160 | #define FT_WinFNT_ID_CP1361 130 161 | #define FT_WinFNT_ID_CP936 134 162 | #define FT_WinFNT_ID_CP950 136 163 | #define FT_WinFNT_ID_CP1253 161 164 | #define FT_WinFNT_ID_CP1254 162 165 | #define FT_WinFNT_ID_CP1258 163 166 | #define FT_WinFNT_ID_CP1255 177 167 | #define FT_WinFNT_ID_CP1256 178 168 | #define FT_WinFNT_ID_CP1257 186 169 | #define FT_WinFNT_ID_CP1251 204 170 | #define FT_WinFNT_ID_CP874 222 171 | #define FT_WinFNT_ID_CP1250 238 172 | #define FT_WinFNT_ID_OEM 255 173 | 174 | 175 | /************************************************************************** 176 | * 177 | * @struct: 178 | * FT_WinFNT_HeaderRec 179 | * 180 | * @description: 181 | * Windows FNT Header info. 182 | */ 183 | typedef struct FT_WinFNT_HeaderRec_ 184 | { 185 | FT_UShort version; 186 | FT_ULong file_size; 187 | FT_Byte copyright[60]; 188 | FT_UShort file_type; 189 | FT_UShort nominal_point_size; 190 | FT_UShort vertical_resolution; 191 | FT_UShort horizontal_resolution; 192 | FT_UShort ascent; 193 | FT_UShort internal_leading; 194 | FT_UShort external_leading; 195 | FT_Byte italic; 196 | FT_Byte underline; 197 | FT_Byte strike_out; 198 | FT_UShort weight; 199 | FT_Byte charset; 200 | FT_UShort pixel_width; 201 | FT_UShort pixel_height; 202 | FT_Byte pitch_and_family; 203 | FT_UShort avg_width; 204 | FT_UShort max_width; 205 | FT_Byte first_char; 206 | FT_Byte last_char; 207 | FT_Byte default_char; 208 | FT_Byte break_char; 209 | FT_UShort bytes_per_row; 210 | FT_ULong device_offset; 211 | FT_ULong face_name_offset; 212 | FT_ULong bits_pointer; 213 | FT_ULong bits_offset; 214 | FT_Byte reserved; 215 | FT_ULong flags; 216 | FT_UShort A_space; 217 | FT_UShort B_space; 218 | FT_UShort C_space; 219 | FT_UShort color_table_offset; 220 | FT_ULong reserved1[4]; 221 | 222 | } FT_WinFNT_HeaderRec; 223 | 224 | 225 | /************************************************************************** 226 | * 227 | * @struct: 228 | * FT_WinFNT_Header 229 | * 230 | * @description: 231 | * A handle to an @FT_WinFNT_HeaderRec structure. 232 | */ 233 | typedef struct FT_WinFNT_HeaderRec_* FT_WinFNT_Header; 234 | 235 | 236 | /************************************************************************** 237 | * 238 | * @function: 239 | * FT_Get_WinFNT_Header 240 | * 241 | * @description: 242 | * Retrieve a Windows FNT font info header. 243 | * 244 | * @input: 245 | * face :: 246 | * A handle to the input face. 247 | * 248 | * @output: 249 | * aheader :: 250 | * The WinFNT header. 251 | * 252 | * @return: 253 | * FreeType error code. 0~means success. 254 | * 255 | * @note: 256 | * This function only works with Windows FNT faces, returning an error 257 | * otherwise. 258 | */ 259 | FT_EXPORT( FT_Error ) 260 | FT_Get_WinFNT_Header( FT_Face face, 261 | FT_WinFNT_HeaderRec *aheader ); 262 | 263 | /* */ 264 | 265 | 266 | FT_END_HEADER 267 | 268 | #endif /* FTWINFNT_H_ */ 269 | 270 | 271 | /* END */ 272 | 273 | 274 | /* Local Variables: */ 275 | /* coding: utf-8 */ 276 | /* End: */ 277 | -------------------------------------------------------------------------------- /include/freetype/tttags.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * tttags.h 4 | * 5 | * Tags for TrueType and OpenType tables (specification only). 6 | * 7 | * Copyright (C) 1996-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef TTAGS_H_ 20 | #define TTAGS_H_ 21 | 22 | 23 | #include 24 | 25 | #ifdef FREETYPE_H 26 | #error "freetype.h of FreeType 1 has been loaded!" 27 | #error "Please fix the directory search order for header files" 28 | #error "so that freetype.h of FreeType 2 is found first." 29 | #endif 30 | 31 | 32 | FT_BEGIN_HEADER 33 | 34 | 35 | #define TTAG_avar FT_MAKE_TAG( 'a', 'v', 'a', 'r' ) 36 | #define TTAG_BASE FT_MAKE_TAG( 'B', 'A', 'S', 'E' ) 37 | #define TTAG_bdat FT_MAKE_TAG( 'b', 'd', 'a', 't' ) 38 | #define TTAG_BDF FT_MAKE_TAG( 'B', 'D', 'F', ' ' ) 39 | #define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' ) 40 | #define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' ) 41 | #define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' ) 42 | #define TTAG_CBDT FT_MAKE_TAG( 'C', 'B', 'D', 'T' ) 43 | #define TTAG_CBLC FT_MAKE_TAG( 'C', 'B', 'L', 'C' ) 44 | #define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' ) 45 | #define TTAG_CFF2 FT_MAKE_TAG( 'C', 'F', 'F', '2' ) 46 | #define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' ) 47 | #define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' ) 48 | #define TTAG_COLR FT_MAKE_TAG( 'C', 'O', 'L', 'R' ) 49 | #define TTAG_CPAL FT_MAKE_TAG( 'C', 'P', 'A', 'L' ) 50 | #define TTAG_cvar FT_MAKE_TAG( 'c', 'v', 'a', 'r' ) 51 | #define TTAG_cvt FT_MAKE_TAG( 'c', 'v', 't', ' ' ) 52 | #define TTAG_DSIG FT_MAKE_TAG( 'D', 'S', 'I', 'G' ) 53 | #define TTAG_EBDT FT_MAKE_TAG( 'E', 'B', 'D', 'T' ) 54 | #define TTAG_EBLC FT_MAKE_TAG( 'E', 'B', 'L', 'C' ) 55 | #define TTAG_EBSC FT_MAKE_TAG( 'E', 'B', 'S', 'C' ) 56 | #define TTAG_feat FT_MAKE_TAG( 'f', 'e', 'a', 't' ) 57 | #define TTAG_FOND FT_MAKE_TAG( 'F', 'O', 'N', 'D' ) 58 | #define TTAG_fpgm FT_MAKE_TAG( 'f', 'p', 'g', 'm' ) 59 | #define TTAG_fvar FT_MAKE_TAG( 'f', 'v', 'a', 'r' ) 60 | #define TTAG_gasp FT_MAKE_TAG( 'g', 'a', 's', 'p' ) 61 | #define TTAG_GDEF FT_MAKE_TAG( 'G', 'D', 'E', 'F' ) 62 | #define TTAG_glyf FT_MAKE_TAG( 'g', 'l', 'y', 'f' ) 63 | #define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' ) 64 | #define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' ) 65 | #define TTAG_gvar FT_MAKE_TAG( 'g', 'v', 'a', 'r' ) 66 | #define TTAG_HVAR FT_MAKE_TAG( 'H', 'V', 'A', 'R' ) 67 | #define TTAG_hdmx FT_MAKE_TAG( 'h', 'd', 'm', 'x' ) 68 | #define TTAG_head FT_MAKE_TAG( 'h', 'e', 'a', 'd' ) 69 | #define TTAG_hhea FT_MAKE_TAG( 'h', 'h', 'e', 'a' ) 70 | #define TTAG_hmtx FT_MAKE_TAG( 'h', 'm', 't', 'x' ) 71 | #define TTAG_JSTF FT_MAKE_TAG( 'J', 'S', 'T', 'F' ) 72 | #define TTAG_just FT_MAKE_TAG( 'j', 'u', 's', 't' ) 73 | #define TTAG_kern FT_MAKE_TAG( 'k', 'e', 'r', 'n' ) 74 | #define TTAG_lcar FT_MAKE_TAG( 'l', 'c', 'a', 'r' ) 75 | #define TTAG_loca FT_MAKE_TAG( 'l', 'o', 'c', 'a' ) 76 | #define TTAG_LTSH FT_MAKE_TAG( 'L', 'T', 'S', 'H' ) 77 | #define TTAG_LWFN FT_MAKE_TAG( 'L', 'W', 'F', 'N' ) 78 | #define TTAG_MATH FT_MAKE_TAG( 'M', 'A', 'T', 'H' ) 79 | #define TTAG_maxp FT_MAKE_TAG( 'm', 'a', 'x', 'p' ) 80 | #define TTAG_META FT_MAKE_TAG( 'M', 'E', 'T', 'A' ) 81 | #define TTAG_MMFX FT_MAKE_TAG( 'M', 'M', 'F', 'X' ) 82 | #define TTAG_MMSD FT_MAKE_TAG( 'M', 'M', 'S', 'D' ) 83 | #define TTAG_mort FT_MAKE_TAG( 'm', 'o', 'r', 't' ) 84 | #define TTAG_morx FT_MAKE_TAG( 'm', 'o', 'r', 'x' ) 85 | #define TTAG_MVAR FT_MAKE_TAG( 'M', 'V', 'A', 'R' ) 86 | #define TTAG_name FT_MAKE_TAG( 'n', 'a', 'm', 'e' ) 87 | #define TTAG_opbd FT_MAKE_TAG( 'o', 'p', 'b', 'd' ) 88 | #define TTAG_OS2 FT_MAKE_TAG( 'O', 'S', '/', '2' ) 89 | #define TTAG_OTTO FT_MAKE_TAG( 'O', 'T', 'T', 'O' ) 90 | #define TTAG_PCLT FT_MAKE_TAG( 'P', 'C', 'L', 'T' ) 91 | #define TTAG_POST FT_MAKE_TAG( 'P', 'O', 'S', 'T' ) 92 | #define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' ) 93 | #define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' ) 94 | #define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' ) 95 | #define TTAG_sbix FT_MAKE_TAG( 's', 'b', 'i', 'x' ) 96 | #define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' ) 97 | #define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' ) 98 | #define TTAG_SVG FT_MAKE_TAG( 'S', 'V', 'G', ' ' ) 99 | #define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' ) 100 | #define TTAG_true FT_MAKE_TAG( 't', 'r', 'u', 'e' ) 101 | #define TTAG_ttc FT_MAKE_TAG( 't', 't', 'c', ' ' ) 102 | #define TTAG_ttcf FT_MAKE_TAG( 't', 't', 'c', 'f' ) 103 | #define TTAG_TYP1 FT_MAKE_TAG( 'T', 'Y', 'P', '1' ) 104 | #define TTAG_typ1 FT_MAKE_TAG( 't', 'y', 'p', '1' ) 105 | #define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' ) 106 | #define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' ) 107 | #define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' ) 108 | #define TTAG_VVAR FT_MAKE_TAG( 'V', 'V', 'A', 'R' ) 109 | #define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' ) 110 | #define TTAG_wOF2 FT_MAKE_TAG( 'w', 'O', 'F', '2' ) 111 | 112 | /* used by "Keyboard.dfont" on legacy Mac OS X */ 113 | #define TTAG_0xA5kbd FT_MAKE_TAG( 0xA5, 'k', 'b', 'd' ) 114 | 115 | /* used by "LastResort.dfont" on legacy Mac OS X */ 116 | #define TTAG_0xA5lst FT_MAKE_TAG( 0xA5, 'l', 's', 't' ) 117 | 118 | 119 | FT_END_HEADER 120 | 121 | #endif /* TTAGS_H_ */ 122 | 123 | 124 | /* END */ 125 | -------------------------------------------------------------------------------- /include/ft2build.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ft2build.h 4 | * 5 | * FreeType 2 build and setup macros. 6 | * 7 | * Copyright (C) 1996-2024 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This is the 'entry point' for FreeType header file inclusions, to be 22 | * loaded before all other header files. 23 | * 24 | * A typical example is 25 | * 26 | * ``` 27 | * #include 28 | * #include 29 | * ``` 30 | * 31 | */ 32 | 33 | 34 | #ifndef FT2BUILD_H_ 35 | #define FT2BUILD_H_ 36 | 37 | #include 38 | 39 | #endif /* FT2BUILD_H_ */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /release dll/win32/freetype.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/release dll/win32/freetype.dll -------------------------------------------------------------------------------- /release dll/win32/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/release dll/win32/freetype.lib -------------------------------------------------------------------------------- /release dll/win64/freetype.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/release dll/win64/freetype.dll -------------------------------------------------------------------------------- /release dll/win64/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/release dll/win64/freetype.lib -------------------------------------------------------------------------------- /release static/README.TXT: -------------------------------------------------------------------------------- 1 | These static libraries will only work with visual studio 2015-2022 2 | -------------------------------------------------------------------------------- /release static/vs2015-2022/win32/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/release static/vs2015-2022/win32/freetype.lib -------------------------------------------------------------------------------- /release static/vs2015-2022/win64/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/74f3de184253d7c314cb34444cc1bbabf276142f/release static/vs2015-2022/win64/freetype.lib --------------------------------------------------------------------------------