├── .gitignore ├── LICENSE ├── README.md ├── libs ├── bzip2 │ ├── LICENSE │ ├── includes │ │ ├── .DS_Store │ │ └── bzlib.h │ └── lib │ │ └── osx │ │ └── libbz2.a ├── freetype2 │ ├── LICENSE.TXT │ ├── includes │ │ ├── freetype │ │ │ ├── config │ │ │ │ ├── ftconfig.h │ │ │ │ ├── ftheader.h │ │ │ │ ├── ftmodule.h │ │ │ │ ├── ftoption.h │ │ │ │ └── ftstdlib.h │ │ │ ├── freetype.h │ │ │ ├── ftadvanc.h │ │ │ ├── ftautoh.h │ │ │ ├── ftbbox.h │ │ │ ├── ftbdf.h │ │ │ ├── ftbitmap.h │ │ │ ├── ftbzip2.h │ │ │ ├── ftcache.h │ │ │ ├── ftcffdrv.h │ │ │ ├── ftchapters.h │ │ │ ├── ftcid.h │ │ │ ├── fterrdef.h │ │ │ ├── fterrors.h │ │ │ ├── ftfntfmt.h │ │ │ ├── ftgasp.h │ │ │ ├── ftglyph.h │ │ │ ├── ftgxval.h │ │ │ ├── ftgzip.h │ │ │ ├── ftimage.h │ │ │ ├── ftincrem.h │ │ │ ├── ftlcdfil.h │ │ │ ├── ftlist.h │ │ │ ├── ftlzw.h │ │ │ ├── ftmac.h │ │ │ ├── ftmm.h │ │ │ ├── ftmodapi.h │ │ │ ├── ftmoderr.h │ │ │ ├── ftotval.h │ │ │ ├── ftoutln.h │ │ │ ├── ftpfr.h │ │ │ ├── ftrender.h │ │ │ ├── ftsizes.h │ │ │ ├── ftsnames.h │ │ │ ├── ftstroke.h │ │ │ ├── ftsynth.h │ │ │ ├── ftsystem.h │ │ │ ├── fttrigon.h │ │ │ ├── ftttdrv.h │ │ │ ├── fttypes.h │ │ │ ├── ftwinfnt.h │ │ │ ├── t1tables.h │ │ │ ├── ttnameid.h │ │ │ ├── tttables.h │ │ │ ├── tttags.h │ │ │ └── ttunpat.h │ │ └── ft2build.h │ └── lib │ │ └── osx │ │ └── libfreetype.a ├── harfbuzz │ ├── COPYING │ ├── includes │ │ ├── hb-blob.h │ │ ├── hb-buffer.h │ │ ├── hb-common.h │ │ ├── hb-coretext.h │ │ ├── hb-deprecated.h │ │ ├── hb-face.h │ │ ├── hb-font.h │ │ ├── hb-ft.h │ │ ├── hb-glib.h │ │ ├── hb-gobject-enums.h │ │ ├── hb-gobject-structs.h │ │ ├── hb-gobject.h │ │ ├── hb-icu.h │ │ ├── hb-ot-font.h │ │ ├── hb-ot-layout.h │ │ ├── hb-ot-shape.h │ │ ├── hb-ot-tag.h │ │ ├── hb-ot.h │ │ ├── hb-set.h │ │ ├── hb-shape-plan.h │ │ ├── hb-shape.h │ │ ├── hb-unicode.h │ │ ├── hb-version.h │ │ └── hb.h │ └── lib │ │ └── osx │ │ └── libharfbuzz.a └── libpng │ ├── LICENSE │ ├── includes │ ├── png.h │ ├── pngconf.h │ └── pnglibconf.h │ └── lib │ └── osx │ └── libpng.a ├── ofxaddons_thumbnail.png └── src ├── ofxFT2Font.cpp ├── ofxFT2Font.hpp ├── ofxMixedFont.cpp ├── ofxMixedFont.hpp ├── ofxMixedFontUtil.cpp └── ofxMixedFontUtil.hpp /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 hiro nishihara 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ofxMixedFont 2 | 3 | ![ofxMixedFont Screenshot](https://raw.githubusercontent.com/hironishihara/ofxMixedFont/images/screenshot_0.png) 4 | 5 | ## Overview 6 | 7 | ofxMixedFont is an openFrameworks addon to handle multiple fonts. It can render UNICODE characters including color emoji. Tested on macOS. 8 | 9 | ## Features 10 | 11 | - ofxMixedFont enables the user to handle multiple fonts as if they were single font 12 | - ofxMixedFont can render UNICODE characters including color emoji (Google's CBLC+CBDT and Apple's SBIX) 13 | - The user may overwrite typesetting function of ofxMixedFont by the use of std::function 14 | - The user may create own font class that derived from ofxBaseFont class, and ofxMixedFont can be used with it 15 | 16 | ## Installation 17 | 18 | 1. Download it ( https://github.com/hironishihara/ofxMixedFont/archive/master.zip ) 19 | 1. Extract the zip file, then rename the extracted folder to ```ofxMixedFont``` 20 | 1. Put the ```ofxMixedFont``` folder in ```OF_ROOT/addons``` 21 | 22 | ## Usage 23 | 24 | 1. Launch ```projectGenerator```, then create new sketch with ofxMixedFont addon 25 | 1. Close ```projectGenerator```, then open the new sketch project 26 | 1. __Copy ```libfreetype.a``` in ```ofxMixedFont/libs/freetype2/lib``` and rename it to ```freetype.a```, then substitute ```freetype.a``` in ```OF_ROOT/libs/freetype/lib/freetype.a``` with it__ 27 | 1. Put font files (ex. ```yourFont.ttf``` and ```emojiFont.ttf```) in ```YOUR_PROJECT/bin/data``` 28 | 1. Include ```ofxMixedFont.hpp``` and ```ofxFT2Font.hpp``` 29 | 30 | ```cpp 31 | // ofApp.h 32 | #include "ofxMixedFont.hpp" 33 | #include "ofxFT2Font.hpp" 34 | ``` 35 | 36 | 1. Declare an instance of ```std::shared_ptr``` and ```std::shared_ptr``` 37 | 38 | ```cpp 39 | // ofApp.h 40 | class ofApp : public ofBaseApp{ 41 | ... 42 | std::shared_ptr mixedFont; 43 | std::shared_ptr yourFont, emojiFont; 44 | }; 45 | ``` 46 | 47 | 1. Load fonts 48 | 49 | ```cpp 50 | // ofApp.cpp 51 | void ofApp::setup(){ 52 | ... 53 | mixedFont = std::make_shared(); 54 | 55 | yourFont = std::make_shared("your_font.ttf", 64); 56 | emojiFont = std::make_shared("emoji_font.otf", 64); 57 | 58 | mixedFont->add(yourFont); 59 | mixedFont->add(emojiFont); 60 | mixedFont->add(std::make_shared("barfoo_font.otf", 64)); 61 | } 62 | ``` 63 | 64 | 1. Draw string 65 | 66 | ```cpp 67 | // ofApp.cpp 68 | void ofApp::draw(){ 69 | ... 70 | mixedFont->drawString("こんにちは🙂", ofPoint(100, 100)); 71 | } 72 | ``` 73 | 74 | 1. Overwrite typesetting function 75 | 76 | ```cpp 77 | // ofApp.cpp 78 | void ofApp::draw(){ 79 | ... 80 | auto func = [&](const ofxBaseFontPtr &font, const ofPoint &point, ofxGlyphDataList &glyph_list) { 81 | ofPoint pos = point; 82 | for (auto &glyph : glyph_list) { 83 | glyph.coord = pos; 84 | 85 | if (glyph.props.code_point == U"\n") { 86 | pos.x = point.x; 87 | pos.y += font->getFontProps().line_height; 88 | } 89 | else if (glyph.props.code_point == U" ") { 90 | pos.x += font->getFontProps().x_ppem / 2.f; 91 | } 92 | else if (glyph.props.code_point == U" ") { 93 | pos.x += font->getFontProps().x_ppem; 94 | } 95 | else { 96 | pos.x += glyph.props.advance; 97 | } 98 | } 99 | }; 100 | 101 | mixedFont->drawString("こんにちは🙂", ofPoint(100, 100), func); 102 | } 103 | ``` 104 | 105 | Refer ```ofxMixedFont.hpp``` and ```ofxMixedFontUtil.hpp``` with regard to other functions. 106 | 107 | ## Contribution 108 | 109 | 1. Fork it ( http://github.com/hironishihara/ofxMixedFont/fork ) 110 | 1. Create your feature branch (git checkout -b my-new-feature) 111 | 1. Commit your changes (git commit -am 'Add some feature') 112 | 1. Rebase your local changes against the master branch 113 | 1. Make sure that your feature performs as expected 114 | 1. Make sure that your feature properly works together with functions of ofxMixedFont 115 | 1. Push to the branch (git push origin my-new-feature) 116 | 1. Create new Pull Request 117 | 118 | ## System Tested 119 | 120 | - macOS (10.12) + Xcode (8.1) + openFrameworks 0.9.4 (osx) 121 | 122 | ## ToDo 123 | 124 | - kerning function 125 | - ligature function 126 | - range of unicode characters 127 | - other directions (Right to Left, Top to Bottom, etc.) 128 | 129 | ## License 130 | 131 | ofxMixedFont is distributed under the MIT License. 132 | This gives everyone the freedoms to use ofxMixedFont in any context: commercial or non-commercial, public or private, open or closed source. 133 | Please see License for details. 134 | 135 | ofxMixedFont includes the following: 136 | 137 | ##### openFrameworks 138 | Copyright (c) 2004 - openFrameworks Community 139 | Licensed under the MIT license. 140 | 141 | ##### FreeType2 142 | Copyright (c) 1996-2002, 2006 - David Turner, Robert Wilhelm, and Werner Lemberg 143 | Licensed under the FreeType project license. 144 | 145 | ##### libpng 146 | Copyright (c) 2000-2002, 2004, 2006-2016 - Guy Eric Schalnat, Andreas Dilger, John Bowler, Glenn Randers-Pehrson, and others 147 | Licensed under the libpng license. 148 | 149 | ##### HarfBuzz 150 | Copyright (c) 2010,2011,2012 Google, Inc. 151 | Copyright (c) 2012 Mozilla Foundation 152 | Copyright (c) 2011 Codethink Limited 153 | Copyright (c) 2008,2010 Nokia Corporation and/or its subsidiary(-ies) 154 | Copyright (c) 2009 Keith Stribley 155 | Copyright (c) 2009 Martin Hosken and SIL International 156 | Copyright (c) 2007 Chris Wilson 157 | Copyright (c) 2006 Behdad Esfahbod 158 | Copyright (c) 2005 David Turner 159 | Copyright (c) 2004,2007,2008,2009,2010 Red Hat, Inc. 160 | Copyright (c) 1998-2004 David Turner and Werner Lemberg 161 | Licensed under the so-called "Old MIT" license. 162 | 163 | ##### bzip2 164 | Copyright (c) 1996-2010 Julian R Seward 165 | Licensed under the BSD-style license. 166 | -------------------------------------------------------------------------------- /libs/bzip2/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------- 3 | 4 | This program, "bzip2", the associated library "libbzip2", and all 5 | documentation, are copyright (C) 1996-2010 Julian R Seward. All 6 | rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 12 | 1. Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | 15 | 2. The origin of this software must not be misrepresented; you must 16 | not claim that you wrote the original software. If you use this 17 | software in a product, an acknowledgment in the product 18 | documentation would be appreciated but is not required. 19 | 20 | 3. Altered source versions must be plainly marked as such, and must 21 | not be misrepresented as being the original software. 22 | 23 | 4. The name of the author may not be used to endorse or promote 24 | products derived from this software without specific prior written 25 | permission. 26 | 27 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 28 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 29 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 31 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 33 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 35 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 36 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 37 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | 39 | Julian Seward, jseward@bzip.org 40 | bzip2/libbzip2 version 1.0.6 of 6 September 2010 41 | 42 | -------------------------------------------------------------------------- 43 | -------------------------------------------------------------------------------- /libs/bzip2/includes/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hironishihara/ofxMixedFont/a9a2888531a5b50e0f7c2e4af1627644019faefc/libs/bzip2/includes/.DS_Store -------------------------------------------------------------------------------- /libs/bzip2/includes/bzlib.h: -------------------------------------------------------------------------------- 1 | 2 | /*-------------------------------------------------------------*/ 3 | /*--- Public header file for the library. ---*/ 4 | /*--- bzlib.h ---*/ 5 | /*-------------------------------------------------------------*/ 6 | 7 | /* ------------------------------------------------------------------ 8 | This file is part of bzip2/libbzip2, a program and library for 9 | lossless, block-sorting data compression. 10 | 11 | bzip2/libbzip2 version 1.0.6 of 6 September 2010 12 | Copyright (C) 1996-2010 Julian Seward 13 | 14 | Please read the WARNING, DISCLAIMER and PATENTS sections in the 15 | README file. 16 | 17 | This program is released under the terms of the license contained 18 | in the file LICENSE. 19 | ------------------------------------------------------------------ */ 20 | 21 | 22 | #ifndef _BZLIB_H 23 | #define _BZLIB_H 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | #define BZ_RUN 0 30 | #define BZ_FLUSH 1 31 | #define BZ_FINISH 2 32 | 33 | #define BZ_OK 0 34 | #define BZ_RUN_OK 1 35 | #define BZ_FLUSH_OK 2 36 | #define BZ_FINISH_OK 3 37 | #define BZ_STREAM_END 4 38 | #define BZ_SEQUENCE_ERROR (-1) 39 | #define BZ_PARAM_ERROR (-2) 40 | #define BZ_MEM_ERROR (-3) 41 | #define BZ_DATA_ERROR (-4) 42 | #define BZ_DATA_ERROR_MAGIC (-5) 43 | #define BZ_IO_ERROR (-6) 44 | #define BZ_UNEXPECTED_EOF (-7) 45 | #define BZ_OUTBUFF_FULL (-8) 46 | #define BZ_CONFIG_ERROR (-9) 47 | 48 | typedef 49 | struct { 50 | char *next_in; 51 | unsigned int avail_in; 52 | unsigned int total_in_lo32; 53 | unsigned int total_in_hi32; 54 | 55 | char *next_out; 56 | unsigned int avail_out; 57 | unsigned int total_out_lo32; 58 | unsigned int total_out_hi32; 59 | 60 | void *state; 61 | 62 | void *(*bzalloc)(void *,int,int); 63 | void (*bzfree)(void *,void *); 64 | void *opaque; 65 | } 66 | bz_stream; 67 | 68 | 69 | #ifndef BZ_IMPORT 70 | #define BZ_EXPORT 71 | #endif 72 | 73 | #ifndef BZ_NO_STDIO 74 | /* Need a definitition for FILE */ 75 | #include 76 | #endif 77 | 78 | #ifdef _WIN32 79 | # include 80 | # ifdef small 81 | /* windows.h define small to char */ 82 | # undef small 83 | # endif 84 | # ifdef BZ_EXPORT 85 | # define BZ_API(func) WINAPI func 86 | # define BZ_EXTERN extern 87 | # else 88 | /* import windows dll dynamically */ 89 | # define BZ_API(func) (WINAPI * func) 90 | # define BZ_EXTERN 91 | # endif 92 | #else 93 | # define BZ_API(func) func 94 | # define BZ_EXTERN extern 95 | #endif 96 | 97 | 98 | /*-- Core (low-level) library functions --*/ 99 | 100 | BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( 101 | bz_stream* strm, 102 | int blockSize100k, 103 | int verbosity, 104 | int workFactor 105 | ); 106 | 107 | BZ_EXTERN int BZ_API(BZ2_bzCompress) ( 108 | bz_stream* strm, 109 | int action 110 | ); 111 | 112 | BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) ( 113 | bz_stream* strm 114 | ); 115 | 116 | BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( 117 | bz_stream *strm, 118 | int verbosity, 119 | int small 120 | ); 121 | 122 | BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( 123 | bz_stream* strm 124 | ); 125 | 126 | BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( 127 | bz_stream *strm 128 | ); 129 | 130 | 131 | 132 | /*-- High(er) level library functions --*/ 133 | 134 | #ifndef BZ_NO_STDIO 135 | #define BZ_MAX_UNUSED 5000 136 | 137 | typedef void BZFILE; 138 | 139 | BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) ( 140 | int* bzerror, 141 | FILE* f, 142 | int verbosity, 143 | int small, 144 | void* unused, 145 | int nUnused 146 | ); 147 | 148 | BZ_EXTERN void BZ_API(BZ2_bzReadClose) ( 149 | int* bzerror, 150 | BZFILE* b 151 | ); 152 | 153 | BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) ( 154 | int* bzerror, 155 | BZFILE* b, 156 | void** unused, 157 | int* nUnused 158 | ); 159 | 160 | BZ_EXTERN int BZ_API(BZ2_bzRead) ( 161 | int* bzerror, 162 | BZFILE* b, 163 | void* buf, 164 | int len 165 | ); 166 | 167 | BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) ( 168 | int* bzerror, 169 | FILE* f, 170 | int blockSize100k, 171 | int verbosity, 172 | int workFactor 173 | ); 174 | 175 | BZ_EXTERN void BZ_API(BZ2_bzWrite) ( 176 | int* bzerror, 177 | BZFILE* b, 178 | void* buf, 179 | int len 180 | ); 181 | 182 | BZ_EXTERN void BZ_API(BZ2_bzWriteClose) ( 183 | int* bzerror, 184 | BZFILE* b, 185 | int abandon, 186 | unsigned int* nbytes_in, 187 | unsigned int* nbytes_out 188 | ); 189 | 190 | BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( 191 | int* bzerror, 192 | BZFILE* b, 193 | int abandon, 194 | unsigned int* nbytes_in_lo32, 195 | unsigned int* nbytes_in_hi32, 196 | unsigned int* nbytes_out_lo32, 197 | unsigned int* nbytes_out_hi32 198 | ); 199 | #endif 200 | 201 | 202 | /*-- Utility functions --*/ 203 | 204 | BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) ( 205 | char* dest, 206 | unsigned int* destLen, 207 | char* source, 208 | unsigned int sourceLen, 209 | int blockSize100k, 210 | int verbosity, 211 | int workFactor 212 | ); 213 | 214 | BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( 215 | char* dest, 216 | unsigned int* destLen, 217 | char* source, 218 | unsigned int sourceLen, 219 | int small, 220 | int verbosity 221 | ); 222 | 223 | 224 | /*-- 225 | Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp) 226 | to support better zlib compatibility. 227 | This code is not _officially_ part of libbzip2 (yet); 228 | I haven't tested it, documented it, or considered the 229 | threading-safeness of it. 230 | If this code breaks, please contact both Yoshioka and me. 231 | --*/ 232 | 233 | BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) ( 234 | void 235 | ); 236 | 237 | #ifndef BZ_NO_STDIO 238 | BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) ( 239 | const char *path, 240 | const char *mode 241 | ); 242 | 243 | BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) ( 244 | int fd, 245 | const char *mode 246 | ); 247 | 248 | BZ_EXTERN int BZ_API(BZ2_bzread) ( 249 | BZFILE* b, 250 | void* buf, 251 | int len 252 | ); 253 | 254 | BZ_EXTERN int BZ_API(BZ2_bzwrite) ( 255 | BZFILE* b, 256 | void* buf, 257 | int len 258 | ); 259 | 260 | BZ_EXTERN int BZ_API(BZ2_bzflush) ( 261 | BZFILE* b 262 | ); 263 | 264 | BZ_EXTERN void BZ_API(BZ2_bzclose) ( 265 | BZFILE* b 266 | ); 267 | 268 | BZ_EXTERN const char * BZ_API(BZ2_bzerror) ( 269 | BZFILE *b, 270 | int *errnum 271 | ); 272 | #endif 273 | 274 | #ifdef __cplusplus 275 | } 276 | #endif 277 | 278 | #endif 279 | 280 | /*-------------------------------------------------------------*/ 281 | /*--- end bzlib.h ---*/ 282 | /*-------------------------------------------------------------*/ 283 | -------------------------------------------------------------------------------- /libs/bzip2/lib/osx/libbz2.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hironishihara/ofxMixedFont/a9a2888531a5b50e0f7c2e4af1627644019faefc/libs/bzip2/lib/osx/libbz2.a -------------------------------------------------------------------------------- /libs/freetype2/LICENSE.TXT: -------------------------------------------------------------------------------- 1 | 2 | The FreeType 2 font engine is copyrighted work and cannot be used 3 | legally without a software license. In order to make this project 4 | usable to a vast majority of developers, we distribute it under two 5 | mutually exclusive open-source licenses. 6 | 7 | This means that *you* must choose *one* of the two licenses described 8 | below, then obey all its terms and conditions when using FreeType 2 in 9 | any of your projects or products. 10 | 11 | - The FreeType License, found in the file `FTL.TXT', which is similar 12 | to the original BSD license *with* an advertising clause that forces 13 | you to explicitly cite the FreeType project in your product's 14 | documentation. All details are in the license file. This license 15 | is suited to products which don't use the GNU General Public 16 | License. 17 | 18 | Note that this license is compatible to the GNU General Public 19 | License version 3, but not version 2. 20 | 21 | - The GNU General Public License version 2, found in `GPLv2.TXT' (any 22 | later version can be used also), for programs which already use the 23 | GPL. Note that the FTL is incompatible with GPLv2 due to its 24 | advertisement clause. 25 | 26 | The contributed BDF and PCF drivers come with a license similar to that 27 | of the X Window System. It is compatible to the above two licenses (see 28 | file src/bdf/README and src/pcf/README). The same holds for the files 29 | `fthash.c' and `fthash.h'; their code was part of the BDF driver in 30 | earlier FreeType versions. 31 | 32 | The gzip module uses the zlib license (see src/gzip/zlib.h) which too is 33 | compatible to the above two licenses. 34 | 35 | The MD5 checksum support (only used for debugging in development builds) 36 | is in the public domain. 37 | 38 | 39 | --- end of LICENSE.TXT --- 40 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | /* This is a generated file. */ 2 | FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 3 | FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 4 | FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 5 | FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 6 | FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 7 | FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 8 | FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 9 | FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 10 | FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 11 | FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 12 | FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 13 | FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 14 | FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 15 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 16 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) 17 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) 18 | FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 19 | FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 20 | /* EOF */ 21 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/config/ftstdlib.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftstdlib.h */ 4 | /* */ 5 | /* ANSI-specific library and header configuration file (specification */ 6 | /* only). */ 7 | /* */ 8 | /* Copyright 2002-2016 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 */ 45 | /* of `int' and `long' in bytes at compile-time. So far, this works */ 46 | /* for all platforms the library has been tested on. */ 47 | /* */ 48 | /* Note that on the extremely rare platforms that do not provide */ 49 | /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */ 50 | /* old Crays where `int' is 36 bits), we do not make any guarantee */ 51 | /* about the correct behaviour of FT2 with all fonts. */ 52 | /* */ 53 | /* In these case, `ftconfig.h' will refuse to compile anyway with a */ 54 | /* message like `couldn't find 32-bit type' or something similar. */ 55 | /* */ 56 | /**********************************************************************/ 57 | 58 | 59 | #include 60 | 61 | #define FT_CHAR_BIT CHAR_BIT 62 | #define FT_USHORT_MAX USHRT_MAX 63 | #define FT_INT_MAX INT_MAX 64 | #define FT_INT_MIN INT_MIN 65 | #define FT_UINT_MAX UINT_MAX 66 | #define FT_LONG_MIN LONG_MIN 67 | #define FT_LONG_MAX LONG_MAX 68 | #define FT_ULONG_MAX ULONG_MAX 69 | 70 | 71 | /**********************************************************************/ 72 | /* */ 73 | /* character and string processing */ 74 | /* */ 75 | /**********************************************************************/ 76 | 77 | 78 | #include 79 | 80 | #define ft_memchr memchr 81 | #define ft_memcmp memcmp 82 | #define ft_memcpy memcpy 83 | #define ft_memmove memmove 84 | #define ft_memset memset 85 | #define ft_strcat strcat 86 | #define ft_strcmp strcmp 87 | #define ft_strcpy strcpy 88 | #define ft_strlen strlen 89 | #define ft_strncmp strncmp 90 | #define ft_strncpy strncpy 91 | #define ft_strrchr strrchr 92 | #define ft_strstr strstr 93 | 94 | 95 | /**********************************************************************/ 96 | /* */ 97 | /* file handling */ 98 | /* */ 99 | /**********************************************************************/ 100 | 101 | 102 | #include 103 | 104 | #define FT_FILE FILE 105 | #define ft_fclose fclose 106 | #define ft_fopen fopen 107 | #define ft_fread fread 108 | #define ft_fseek fseek 109 | #define ft_ftell ftell 110 | #define ft_sprintf sprintf 111 | 112 | 113 | /**********************************************************************/ 114 | /* */ 115 | /* sorting */ 116 | /* */ 117 | /**********************************************************************/ 118 | 119 | 120 | #include 121 | 122 | #define ft_qsort qsort 123 | 124 | 125 | /**********************************************************************/ 126 | /* */ 127 | /* memory allocation */ 128 | /* */ 129 | /**********************************************************************/ 130 | 131 | 132 | #define ft_scalloc calloc 133 | #define ft_sfree free 134 | #define ft_smalloc malloc 135 | #define ft_srealloc realloc 136 | 137 | 138 | /**********************************************************************/ 139 | /* */ 140 | /* miscellaneous */ 141 | /* */ 142 | /**********************************************************************/ 143 | 144 | 145 | #define ft_strtol strtol 146 | #define ft_getenv getenv 147 | 148 | 149 | /**********************************************************************/ 150 | /* */ 151 | /* execution control */ 152 | /* */ 153 | /**********************************************************************/ 154 | 155 | 156 | #include 157 | 158 | #define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */ 159 | /* jmp_buf is defined as a macro */ 160 | /* on certain platforms */ 161 | 162 | #define ft_longjmp longjmp 163 | #define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */ 164 | 165 | 166 | /* the following is only used for debugging purposes, i.e., if */ 167 | /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */ 168 | 169 | #include 170 | 171 | 172 | #endif /* FTSTDLIB_H_ */ 173 | 174 | 175 | /* END */ 176 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ftbbox.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftbbox.h */ 4 | /* */ 5 | /* FreeType exact bbox computation (specification). */ 6 | /* */ 7 | /* Copyright 1996-2016 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 | #include FT_FREETYPE_H 36 | 37 | #ifdef FREETYPE_H 38 | #error "freetype.h of FreeType 1 has been loaded!" 39 | #error "Please fix the directory search order for header files" 40 | #error "so that freetype.h of FreeType 2 is found first." 41 | #endif 42 | 43 | 44 | FT_BEGIN_HEADER 45 | 46 | 47 | /*************************************************************************/ 48 | /* */ 49 | /*
*/ 50 | /* outline_processing */ 51 | /* */ 52 | /*************************************************************************/ 53 | 54 | 55 | /*************************************************************************/ 56 | /* */ 57 | /* */ 58 | /* FT_Outline_Get_BBox */ 59 | /* */ 60 | /* */ 61 | /* Compute the exact bounding box of an outline. This is slower */ 62 | /* than computing the control box. However, it uses an advanced */ 63 | /* algorithm that returns _very_ quickly when the two boxes */ 64 | /* coincide. Otherwise, the outline Bézier arcs are traversed to */ 65 | /* extract their extrema. */ 66 | /* */ 67 | /* */ 68 | /* outline :: A pointer to the source outline. */ 69 | /* */ 70 | /* */ 71 | /* abbox :: The outline's exact bounding box. */ 72 | /* */ 73 | /* */ 74 | /* FreeType error code. 0~means success. */ 75 | /* */ 76 | /* */ 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 */ 80 | /* at a large ppem value (so that the hinting instructions can */ 81 | /* properly shift and scale the subglyphs), then extracting the BBox, */ 82 | /* which can be 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 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ftbdf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftbdf.h */ 4 | /* */ 5 | /* FreeType API for accessing BDF-specific strings (specification). */ 6 | /* */ 7 | /* Copyright 2002-2016 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 | #include FT_FREETYPE_H 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 | /*
*/ 38 | /* bdf_fonts */ 39 | /* */ 40 | /* */ 41 | /* BDF and PCF Files */ 42 | /* */ 43 | /* <Abstract> */ 44 | /* BDF and PCF specific API. */ 45 | /* */ 46 | /* <Description> */ 47 | /* This section contains the declaration of functions specific to BDF */ 48 | /* and PCF fonts. */ 49 | /* */ 50 | /*************************************************************************/ 51 | 52 | 53 | /********************************************************************** 54 | * 55 | * @enum: 56 | * BDF_PropertyType 57 | * 58 | * @description: 59 | * A list of BDF property types. 60 | * 61 | * @values: 62 | * BDF_PROPERTY_TYPE_NONE :: 63 | * Value~0 is used to indicate a missing property. 64 | * 65 | * BDF_PROPERTY_TYPE_ATOM :: 66 | * Property is a string atom. 67 | * 68 | * BDF_PROPERTY_TYPE_INTEGER :: 69 | * Property is a 32-bit signed integer. 70 | * 71 | * BDF_PROPERTY_TYPE_CARDINAL :: 72 | * Property is a 32-bit unsigned integer. 73 | */ 74 | typedef enum BDF_PropertyType_ 75 | { 76 | BDF_PROPERTY_TYPE_NONE = 0, 77 | BDF_PROPERTY_TYPE_ATOM = 1, 78 | BDF_PROPERTY_TYPE_INTEGER = 2, 79 | BDF_PROPERTY_TYPE_CARDINAL = 3 80 | 81 | } BDF_PropertyType; 82 | 83 | 84 | /********************************************************************** 85 | * 86 | * @type: 87 | * BDF_Property 88 | * 89 | * @description: 90 | * A handle to a @BDF_PropertyRec structure to model a given 91 | * BDF/PCF property. 92 | */ 93 | typedef struct BDF_PropertyRec_* BDF_Property; 94 | 95 | 96 | /********************************************************************** 97 | * 98 | * @struct: 99 | * BDF_PropertyRec 100 | * 101 | * @description: 102 | * This structure models a given BDF/PCF property. 103 | * 104 | * @fields: 105 | * type :: 106 | * The property type. 107 | * 108 | * u.atom :: 109 | * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. May be 110 | * NULL, indicating an empty string. 111 | * 112 | * u.integer :: 113 | * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER. 114 | * 115 | * u.cardinal :: 116 | * An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL. 117 | */ 118 | typedef struct BDF_PropertyRec_ 119 | { 120 | BDF_PropertyType type; 121 | union { 122 | const char* atom; 123 | FT_Int32 integer; 124 | FT_UInt32 cardinal; 125 | 126 | } u; 127 | 128 | } BDF_PropertyRec; 129 | 130 | 131 | /********************************************************************** 132 | * 133 | * @function: 134 | * FT_Get_BDF_Charset_ID 135 | * 136 | * @description: 137 | * Retrieve a BDF font character set identity, according to 138 | * the BDF specification. 139 | * 140 | * @input: 141 | * face :: 142 | * A handle to the input face. 143 | * 144 | * @output: 145 | * acharset_encoding :: 146 | * Charset encoding, as a C~string, owned by the face. 147 | * 148 | * acharset_registry :: 149 | * Charset registry, as a C~string, owned by the face. 150 | * 151 | * @return: 152 | * FreeType error code. 0~means success. 153 | * 154 | * @note: 155 | * This function only works with BDF faces, returning an error otherwise. 156 | */ 157 | FT_EXPORT( FT_Error ) 158 | FT_Get_BDF_Charset_ID( FT_Face face, 159 | const char* *acharset_encoding, 160 | const char* *acharset_registry ); 161 | 162 | 163 | /********************************************************************** 164 | * 165 | * @function: 166 | * FT_Get_BDF_Property 167 | * 168 | * @description: 169 | * Retrieve a BDF property from a BDF or PCF font file. 170 | * 171 | * @input: 172 | * face :: A handle to the input face. 173 | * 174 | * name :: The property name. 175 | * 176 | * @output: 177 | * aproperty :: The property. 178 | * 179 | * @return: 180 | * FreeType error code. 0~means success. 181 | * 182 | * @note: 183 | * This function works with BDF _and_ PCF fonts. It returns an error 184 | * otherwise. It also returns an error if the property is not in the 185 | * font. 186 | * 187 | * A `property' is a either key-value pair within the STARTPROPERTIES 188 | * ... ENDPROPERTIES block of a BDF font or a key-value pair from the 189 | * `info->props' array within a `FontRec' structure of a PCF font. 190 | * 191 | * Integer properties are always stored as `signed' within PCF fonts; 192 | * consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value 193 | * for BDF fonts only. 194 | * 195 | * In case of error, `aproperty->type' is always set to 196 | * @BDF_PROPERTY_TYPE_NONE. 197 | */ 198 | FT_EXPORT( FT_Error ) 199 | FT_Get_BDF_Property( FT_Face face, 200 | const char* prop_name, 201 | BDF_PropertyRec *aproperty ); 202 | 203 | /* */ 204 | 205 | FT_END_HEADER 206 | 207 | #endif /* FTBDF_H_ */ 208 | 209 | 210 | /* END */ 211 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ftbzip2.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftbzip2.h */ 4 | /* */ 5 | /* Bzip2-compressed stream support. */ 6 | /* */ 7 | /* Copyright 2010-2016 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 <ft2build.h> 23 | #include FT_FREETYPE_H 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 | /* <Section> */ 37 | /* bzip2 */ 38 | /* */ 39 | /* <Title> */ 40 | /* BZIP2 Streams */ 41 | /* */ 42 | /* <Abstract> */ 43 | /* Using bzip2-compressed font files. */ 44 | /* */ 45 | /* <Description> */ 46 | /* This section contains the declaration of Bzip2-specific functions. */ 47 | /* */ 48 | /*************************************************************************/ 49 | 50 | 51 | /************************************************************************ 52 | * 53 | * @function: 54 | * FT_Stream_OpenBzip2 55 | * 56 | * @description: 57 | * Open a new stream to parse bzip2-compressed font files. This is 58 | * mainly used to support the compressed `*.pcf.bz2' fonts that come 59 | * with XFree86. 60 | * 61 | * @input: 62 | * stream :: 63 | * The target embedding stream. 64 | * 65 | * source :: 66 | * The source stream. 67 | * 68 | * @return: 69 | * FreeType error code. 0~means success. 70 | * 71 | * @note: 72 | * The source stream must be opened _before_ calling this function. 73 | * 74 | * Calling the internal function `FT_Stream_Close' on the new stream will 75 | * *not* call `FT_Stream_Close' on the source stream. None of the stream 76 | * objects will be released to the heap. 77 | * 78 | * The stream implementation is very basic and resets the decompression 79 | * process each time seeking backwards is needed within the stream. 80 | * 81 | * In certain builds of the library, bzip2 compression recognition is 82 | * automatically handled when calling @FT_New_Face or @FT_Open_Face. 83 | * This means that if no font driver is capable of handling the raw 84 | * compressed file, the library will try to open a bzip2 compressed stream 85 | * from it and re-open the face with it. 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 | -------------------------------------------------------------------------------- /libs/freetype2/includes/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 | /* header_inclusion */ 19 | /* user_allocation */ 20 | /* */ 21 | /***************************************************************************/ 22 | 23 | 24 | /***************************************************************************/ 25 | /* */ 26 | /* <Chapter> */ 27 | /* core_api */ 28 | /* */ 29 | /* <Title> */ 30 | /* Core API */ 31 | /* */ 32 | /* <Sections> */ 33 | /* version */ 34 | /* basic_types */ 35 | /* base_interface */ 36 | /* glyph_variants */ 37 | /* glyph_management */ 38 | /* mac_specific */ 39 | /* sizes_management */ 40 | /* header_file_macros */ 41 | /* */ 42 | /***************************************************************************/ 43 | 44 | 45 | /***************************************************************************/ 46 | /* */ 47 | /* <Chapter> */ 48 | /* format_specific */ 49 | /* */ 50 | /* <Title> */ 51 | /* Format-Specific API */ 52 | /* */ 53 | /* <Sections> */ 54 | /* multiple_masters */ 55 | /* truetype_tables */ 56 | /* type1_tables */ 57 | /* sfnt_names */ 58 | /* bdf_fonts */ 59 | /* cid_fonts */ 60 | /* pfr_fonts */ 61 | /* winfnt_fonts */ 62 | /* font_formats */ 63 | /* gasp_table */ 64 | /* */ 65 | /***************************************************************************/ 66 | 67 | 68 | /***************************************************************************/ 69 | /* */ 70 | /* <Chapter> */ 71 | /* module_specific */ 72 | /* */ 73 | /* <Title> */ 74 | /* Controlling FreeType Modules */ 75 | /* */ 76 | /* <Sections> */ 77 | /* auto_hinter */ 78 | /* cff_driver */ 79 | /* tt_driver */ 80 | /* */ 81 | /***************************************************************************/ 82 | 83 | 84 | /***************************************************************************/ 85 | /* */ 86 | /* <Chapter> */ 87 | /* cache_subsystem */ 88 | /* */ 89 | /* <Title> */ 90 | /* Cache Sub-System */ 91 | /* */ 92 | /* <Sections> */ 93 | /* cache_subsystem */ 94 | /* */ 95 | /***************************************************************************/ 96 | 97 | 98 | /***************************************************************************/ 99 | /* */ 100 | /* <Chapter> */ 101 | /* support_api */ 102 | /* */ 103 | /* <Title> */ 104 | /* Support API */ 105 | /* */ 106 | /* <Sections> */ 107 | /* computations */ 108 | /* list_processing */ 109 | /* outline_processing */ 110 | /* quick_advance */ 111 | /* bitmap_handling */ 112 | /* raster */ 113 | /* glyph_stroker */ 114 | /* system_interface */ 115 | /* module_management */ 116 | /* gzip */ 117 | /* lzw */ 118 | /* bzip2 */ 119 | /* lcd_filtering */ 120 | /* */ 121 | /***************************************************************************/ 122 | 123 | /***************************************************************************/ 124 | /* */ 125 | /* <Chapter> */ 126 | /* error_codes */ 127 | /* */ 128 | /* <Title> */ 129 | /* Error Codes */ 130 | /* */ 131 | /* <Sections> */ 132 | /* error_enumerations */ 133 | /* error_code_values */ 134 | /* */ 135 | /***************************************************************************/ 136 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ftcid.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftcid.h */ 4 | /* */ 5 | /* FreeType API for accessing CID font information (specification). */ 6 | /* */ 7 | /* Copyright 2007-2016 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 <ft2build.h> 23 | #include FT_FREETYPE_H 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 | /* cid_fonts */ 39 | /* */ 40 | /* <Title> */ 41 | /* CID Fonts */ 42 | /* */ 43 | /* <Abstract> */ 44 | /* CID-keyed font specific API. */ 45 | /* */ 46 | /* <Description> */ 47 | /* This section contains the declaration of CID-keyed font specific */ 48 | /* functions. */ 49 | /* */ 50 | /*************************************************************************/ 51 | 52 | 53 | /********************************************************************** 54 | * 55 | * @function: 56 | * FT_Get_CID_Registry_Ordering_Supplement 57 | * 58 | * @description: 59 | * Retrieve the Registry/Ordering/Supplement triple (also known as the 60 | * "R/O/S") from a CID-keyed font. 61 | * 62 | * @input: 63 | * face :: 64 | * A handle to the input face. 65 | * 66 | * @output: 67 | * registry :: 68 | * The registry, as a C~string, owned by the face. 69 | * 70 | * ordering :: 71 | * The ordering, as a C~string, owned by the face. 72 | * 73 | * supplement :: 74 | * The supplement. 75 | * 76 | * @return: 77 | * FreeType error code. 0~means success. 78 | * 79 | * @note: 80 | * This function only works with CID faces, returning an error 81 | * otherwise. 82 | * 83 | * @since: 84 | * 2.3.6 85 | */ 86 | FT_EXPORT( FT_Error ) 87 | FT_Get_CID_Registry_Ordering_Supplement( FT_Face face, 88 | const char* *registry, 89 | const char* *ordering, 90 | FT_Int *supplement); 91 | 92 | 93 | /********************************************************************** 94 | * 95 | * @function: 96 | * FT_Get_CID_Is_Internally_CID_Keyed 97 | * 98 | * @description: 99 | * Retrieve the type of the input face, CID keyed or not. In 100 | * contrast to the @FT_IS_CID_KEYED macro this function returns 101 | * successfully also for CID-keyed fonts in an SFNT wrapper. 102 | * 103 | * @input: 104 | * face :: 105 | * A handle to the input face. 106 | * 107 | * @output: 108 | * is_cid :: 109 | * The type of the face as an @FT_Bool. 110 | * 111 | * @return: 112 | * FreeType error code. 0~means success. 113 | * 114 | * @note: 115 | * This function only works with CID faces and OpenType fonts, 116 | * returning an error otherwise. 117 | * 118 | * @since: 119 | * 2.3.9 120 | */ 121 | FT_EXPORT( FT_Error ) 122 | FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face, 123 | FT_Bool *is_cid ); 124 | 125 | 126 | /********************************************************************** 127 | * 128 | * @function: 129 | * FT_Get_CID_From_Glyph_Index 130 | * 131 | * @description: 132 | * Retrieve the CID of the input glyph index. 133 | * 134 | * @input: 135 | * face :: 136 | * A handle to the input face. 137 | * 138 | * glyph_index :: 139 | * The input glyph index. 140 | * 141 | * @output: 142 | * cid :: 143 | * The CID as an @FT_UInt. 144 | * 145 | * @return: 146 | * FreeType error code. 0~means success. 147 | * 148 | * @note: 149 | * This function only works with CID faces and OpenType fonts, 150 | * returning an error otherwise. 151 | * 152 | * @since: 153 | * 2.3.9 154 | */ 155 | FT_EXPORT( FT_Error ) 156 | FT_Get_CID_From_Glyph_Index( FT_Face face, 157 | FT_UInt glyph_index, 158 | FT_UInt *cid ); 159 | 160 | /* */ 161 | 162 | 163 | FT_END_HEADER 164 | 165 | #endif /* FTCID_H_ */ 166 | 167 | 168 | /* END */ 169 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ftfntfmt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftfntfmt.h */ 4 | /* */ 5 | /* Support functions for font formats. */ 6 | /* */ 7 | /* Copyright 2002-2016 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 <ft2build.h> 23 | #include FT_FREETYPE_H 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 | /* font_formats */ 39 | /* */ 40 | /* <Title> */ 41 | /* Font Formats */ 42 | /* */ 43 | /* <Abstract> */ 44 | /* Getting the font format. */ 45 | /* */ 46 | /* <Description> */ 47 | /* The single function in this section can be used to get the font */ 48 | /* format. Note that this information is not needed normally; */ 49 | /* however, there are special cases (like in PDF devices) where it is */ 50 | /* important to differentiate, in spite of FreeType's uniform API. */ 51 | /* */ 52 | /*************************************************************************/ 53 | 54 | 55 | /*************************************************************************/ 56 | /* */ 57 | /* <Function> */ 58 | /* FT_Get_Font_Format */ 59 | /* */ 60 | /* <Description> */ 61 | /* Return a string describing the format of a given face. Possible */ 62 | /* values are `TrueType', `Type~1', `BDF', `PCF', `Type~42', */ 63 | /* `CID~Type~1', `CFF', `PFR', and `Windows~FNT'. */ 64 | /* */ 65 | /* The return value is suitable to be used as an X11 FONT_PROPERTY. */ 66 | /* */ 67 | /* <Input> */ 68 | /* face :: */ 69 | /* Input face handle. */ 70 | /* */ 71 | /* <Return> */ 72 | /* Font format string. NULL in case of error. */ 73 | /* */ 74 | /* <Note> */ 75 | /* A deprecated name for the same function is */ 76 | /* `FT_Get_X11_Font_Format'. */ 77 | /* */ 78 | FT_EXPORT( const char* ) 79 | FT_Get_Font_Format( FT_Face face ); 80 | 81 | 82 | /* deprecated */ 83 | FT_EXPORT( const char* ) 84 | FT_Get_X11_Font_Format( FT_Face face ); 85 | 86 | 87 | /* */ 88 | 89 | 90 | FT_END_HEADER 91 | 92 | #endif /* FTFNTFMT_H_ */ 93 | 94 | 95 | /* END */ 96 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ftgasp.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftgasp.h */ 4 | /* */ 5 | /* Access of TrueType's `gasp' table (specification). */ 6 | /* */ 7 | /* Copyright 2007-2016 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 <ft2build.h> 23 | #include FT_FREETYPE_H 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 | /*************************************************************************** 33 | * 34 | * @section: 35 | * gasp_table 36 | * 37 | * @title: 38 | * Gasp Table 39 | * 40 | * @abstract: 41 | * Retrieving TrueType `gasp' table entries. 42 | * 43 | * @description: 44 | * The function @FT_Get_Gasp can be used to query a TrueType or OpenType 45 | * font for specific entries in its `gasp' table, if any. This is 46 | * mainly useful when implementing native TrueType hinting with the 47 | * bytecode interpreter to duplicate the Windows text rendering results. 48 | */ 49 | 50 | /************************************************************************* 51 | * 52 | * @enum: 53 | * FT_GASP_XXX 54 | * 55 | * @description: 56 | * A list of values and/or bit-flags returned by the @FT_Get_Gasp 57 | * function. 58 | * 59 | * @values: 60 | * FT_GASP_NO_TABLE :: 61 | * This special value means that there is no GASP table in this face. 62 | * It is up to the client to decide what to do. 63 | * 64 | * FT_GASP_DO_GRIDFIT :: 65 | * Grid-fitting and hinting should be performed at the specified ppem. 66 | * This *really* means TrueType bytecode interpretation. If this bit 67 | * is not set, no hinting gets applied. 68 | * 69 | * FT_GASP_DO_GRAY :: 70 | * Anti-aliased rendering should be performed at the specified ppem. 71 | * If not set, do monochrome rendering. 72 | * 73 | * FT_GASP_SYMMETRIC_SMOOTHING :: 74 | * If set, smoothing along multiple axes must be used with ClearType. 75 | * 76 | * FT_GASP_SYMMETRIC_GRIDFIT :: 77 | * Grid-fitting must be used with ClearType's symmetric smoothing. 78 | * 79 | * @note: 80 | * The bit-flags `FT_GASP_DO_GRIDFIT' and `FT_GASP_DO_GRAY' are to be 81 | * used for standard font rasterization only. Independently of that, 82 | * `FT_GASP_SYMMETRIC_SMOOTHING' and `FT_GASP_SYMMETRIC_GRIDFIT' are to 83 | * be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT' and 84 | * `FT_GASP_DO_GRAY' are consequently ignored). 85 | * 86 | * `ClearType' is Microsoft's implementation of LCD rendering, partly 87 | * protected by patents. 88 | * 89 | * @since: 90 | * 2.3.0 91 | */ 92 | #define FT_GASP_NO_TABLE -1 93 | #define FT_GASP_DO_GRIDFIT 0x01 94 | #define FT_GASP_DO_GRAY 0x02 95 | #define FT_GASP_SYMMETRIC_SMOOTHING 0x08 96 | #define FT_GASP_SYMMETRIC_GRIDFIT 0x10 97 | 98 | 99 | /************************************************************************* 100 | * 101 | * @func: 102 | * FT_Get_Gasp 103 | * 104 | * @description: 105 | * Read the `gasp' table from a TrueType or OpenType font file and 106 | * return the entry corresponding to a given character pixel size. 107 | * 108 | * @input: 109 | * face :: The source face handle. 110 | * ppem :: The vertical character pixel size. 111 | * 112 | * @return: 113 | * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no 114 | * `gasp' table in the face. 115 | * 116 | * @since: 117 | * 2.3.0 118 | */ 119 | FT_EXPORT( FT_Int ) 120 | FT_Get_Gasp( FT_Face face, 121 | FT_UInt ppem ); 122 | 123 | /* */ 124 | 125 | 126 | #endif /* FTGASP_H_ */ 127 | 128 | 129 | /* END */ 130 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ftgzip.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftgzip.h */ 4 | /* */ 5 | /* Gzip-compressed stream support. */ 6 | /* */ 7 | /* Copyright 2002-2016 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 <ft2build.h> 23 | #include FT_FREETYPE_H 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 | /* <Section> */ 37 | /* gzip */ 38 | /* */ 39 | /* <Title> */ 40 | /* GZIP Streams */ 41 | /* */ 42 | /* <Abstract> */ 43 | /* Using gzip-compressed font files. */ 44 | /* */ 45 | /* <Description> */ 46 | /* This section contains the declaration of Gzip-specific functions. */ 47 | /* */ 48 | /*************************************************************************/ 49 | 50 | 51 | /************************************************************************ 52 | * 53 | * @function: 54 | * FT_Stream_OpenGzip 55 | * 56 | * @description: 57 | * Open a new stream to parse gzip-compressed font files. This is 58 | * mainly used to support the compressed `*.pcf.gz' fonts that come 59 | * with XFree86. 60 | * 61 | * @input: 62 | * stream :: 63 | * The target embedding stream. 64 | * 65 | * source :: 66 | * The source stream. 67 | * 68 | * @return: 69 | * FreeType error code. 0~means success. 70 | * 71 | * @note: 72 | * The source stream must be opened _before_ calling this function. 73 | * 74 | * Calling the internal function `FT_Stream_Close' on the new stream will 75 | * *not* call `FT_Stream_Close' on the source stream. None of the stream 76 | * objects will be released to the heap. 77 | * 78 | * The stream implementation is very basic and resets the decompression 79 | * process each time seeking backwards is needed within the stream. 80 | * 81 | * In certain builds of the library, gzip compression recognition is 82 | * automatically handled when calling @FT_New_Face or @FT_Open_Face. 83 | * This means that if no font driver is capable of handling the raw 84 | * compressed file, the library will try to open a gzipped stream from 85 | * it and re-open the face with it. 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 | FT_EXPORT( FT_Error ) 134 | FT_Gzip_Uncompress( FT_Memory memory, 135 | FT_Byte* output, 136 | FT_ULong* output_len, 137 | const FT_Byte* input, 138 | FT_ULong input_len ); 139 | 140 | /* */ 141 | 142 | 143 | FT_END_HEADER 144 | 145 | #endif /* FTGZIP_H_ */ 146 | 147 | 148 | /* END */ 149 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ftlzw.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftlzw.h */ 4 | /* */ 5 | /* LZW-compressed stream support. */ 6 | /* */ 7 | /* Copyright 2004-2016 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 <ft2build.h> 23 | #include FT_FREETYPE_H 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 | /* <Section> */ 37 | /* lzw */ 38 | /* */ 39 | /* <Title> */ 40 | /* LZW Streams */ 41 | /* */ 42 | /* <Abstract> */ 43 | /* Using LZW-compressed font files. */ 44 | /* */ 45 | /* <Description> */ 46 | /* This section contains the declaration of LZW-specific functions. */ 47 | /* */ 48 | /*************************************************************************/ 49 | 50 | /************************************************************************ 51 | * 52 | * @function: 53 | * FT_Stream_OpenLZW 54 | * 55 | * @description: 56 | * Open a new stream to parse LZW-compressed font files. This is 57 | * mainly used to support the compressed `*.pcf.Z' fonts that come 58 | * with XFree86. 59 | * 60 | * @input: 61 | * stream :: The target embedding stream. 62 | * 63 | * source :: The source stream. 64 | * 65 | * @return: 66 | * FreeType error code. 0~means success. 67 | * 68 | * @note: 69 | * The source stream must be opened _before_ calling this function. 70 | * 71 | * Calling the internal function `FT_Stream_Close' on the new stream will 72 | * *not* call `FT_Stream_Close' on the source stream. None of the stream 73 | * objects will be released to the heap. 74 | * 75 | * The stream implementation is very basic and resets the decompression 76 | * process each time seeking backwards is needed within the stream 77 | * 78 | * In certain builds of the library, LZW compression recognition is 79 | * automatically handled when calling @FT_New_Face or @FT_Open_Face. 80 | * This means that if no font driver is capable of handling the raw 81 | * compressed file, the library will try to open a LZW stream from it 82 | * and re-open the face with it. 83 | * 84 | * This function may return `FT_Err_Unimplemented_Feature' if your build 85 | * of FreeType was not compiled with LZW support. 86 | */ 87 | FT_EXPORT( FT_Error ) 88 | FT_Stream_OpenLZW( FT_Stream stream, 89 | FT_Stream source ); 90 | 91 | /* */ 92 | 93 | 94 | FT_END_HEADER 95 | 96 | #endif /* FTLZW_H_ */ 97 | 98 | 99 | /* END */ 100 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ftotval.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftotval.h */ 4 | /* */ 5 | /* FreeType API for validating OpenType tables (specification). */ 6 | /* */ 7 | /* Copyright 2004-2016 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 <ft2build.h> 34 | #include FT_FREETYPE_H 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 | /* ot_validation */ 50 | /* */ 51 | /* <Title> */ 52 | /* OpenType Validation */ 53 | /* */ 54 | /* <Abstract> */ 55 | /* An API to validate OpenType tables. */ 56 | /* */ 57 | /* <Description> */ 58 | /* This section contains the declaration of functions to validate */ 59 | /* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */ 60 | /* */ 61 | /* <Order> */ 62 | /* FT_OpenType_Validate */ 63 | /* FT_OpenType_Free */ 64 | /* */ 65 | /* FT_VALIDATE_OTXXX */ 66 | /* */ 67 | /*************************************************************************/ 68 | 69 | 70 | /********************************************************************** 71 | * 72 | * @enum: 73 | * FT_VALIDATE_OTXXX 74 | * 75 | * @description: 76 | * A list of bit-field constants used with @FT_OpenType_Validate to 77 | * indicate which OpenType tables should be validated. 78 | * 79 | * @values: 80 | * FT_VALIDATE_BASE :: 81 | * Validate BASE table. 82 | * 83 | * FT_VALIDATE_GDEF :: 84 | * Validate GDEF table. 85 | * 86 | * FT_VALIDATE_GPOS :: 87 | * Validate GPOS table. 88 | * 89 | * FT_VALIDATE_GSUB :: 90 | * Validate GSUB table. 91 | * 92 | * FT_VALIDATE_JSTF :: 93 | * Validate JSTF table. 94 | * 95 | * FT_VALIDATE_MATH :: 96 | * Validate MATH table. 97 | * 98 | * FT_VALIDATE_OT :: 99 | * Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). 100 | * 101 | */ 102 | #define FT_VALIDATE_BASE 0x0100 103 | #define FT_VALIDATE_GDEF 0x0200 104 | #define FT_VALIDATE_GPOS 0x0400 105 | #define FT_VALIDATE_GSUB 0x0800 106 | #define FT_VALIDATE_JSTF 0x1000 107 | #define FT_VALIDATE_MATH 0x2000 108 | 109 | #define FT_VALIDATE_OT ( FT_VALIDATE_BASE | \ 110 | FT_VALIDATE_GDEF | \ 111 | FT_VALIDATE_GPOS | \ 112 | FT_VALIDATE_GSUB | \ 113 | FT_VALIDATE_JSTF | \ 114 | FT_VALIDATE_MATH ) 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 125 | * error 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 | * @function: 175 | * FT_OpenType_Free 176 | * 177 | * @description: 178 | * Free the buffer allocated by OpenType validator. 179 | * 180 | * @input: 181 | * face :: 182 | * A handle to the input face. 183 | * 184 | * table :: 185 | * The pointer to the buffer that is allocated by 186 | * @FT_OpenType_Validate. 187 | * 188 | * @note: 189 | * This function must be used to free the buffer allocated by 190 | * @FT_OpenType_Validate only. 191 | */ 192 | FT_EXPORT( void ) 193 | FT_OpenType_Free( FT_Face face, 194 | FT_Bytes table ); 195 | 196 | /* */ 197 | 198 | 199 | FT_END_HEADER 200 | 201 | #endif /* FTOTVAL_H_ */ 202 | 203 | 204 | /* END */ 205 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ftpfr.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftpfr.h */ 4 | /* */ 5 | /* FreeType API for accessing PFR-specific data (specification only). */ 6 | /* */ 7 | /* Copyright 2002-2016 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 <ft2build.h> 23 | #include FT_FREETYPE_H 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 | /* pfr_fonts */ 39 | /* */ 40 | /* <Title> */ 41 | /* PFR Fonts */ 42 | /* */ 43 | /* <Abstract> */ 44 | /* PFR/TrueDoc specific API. */ 45 | /* */ 46 | /* <Description> */ 47 | /* This section contains the declaration of PFR-specific functions. */ 48 | /* */ 49 | /*************************************************************************/ 50 | 51 | 52 | /********************************************************************** 53 | * 54 | * @function: 55 | * FT_Get_PFR_Metrics 56 | * 57 | * @description: 58 | * Return the outline and metrics resolutions of a given PFR face. 59 | * 60 | * @input: 61 | * face :: 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' 66 | * for non-PFR fonts. Optional (parameter can be NULL). 67 | * 68 | * ametrics_resolution :: 69 | * Metrics resolution. This is equivalent to `outline_resolution' 70 | * for 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 74 | * in metrics units to device sub-pixels. 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 :: A handle to the input face. 109 | * 110 | * left :: Index of the left glyph. 111 | * 112 | * right :: Index of the right glyph. 113 | * 114 | * @output: 115 | * avector :: A kerning vector. 116 | * 117 | * @return: 118 | * FreeType error code. 0~means success. 119 | * 120 | * @note: 121 | * This function always return distances in original PFR metrics 122 | * units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED 123 | * mode, which always returns distances converted to outline units. 124 | * 125 | * You can use the value of the `x_scale' and `y_scale' parameters 126 | * returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels. 127 | */ 128 | FT_EXPORT( FT_Error ) 129 | FT_Get_PFR_Kerning( FT_Face face, 130 | FT_UInt left, 131 | FT_UInt right, 132 | FT_Vector *avector ); 133 | 134 | 135 | /********************************************************************** 136 | * 137 | * @function: 138 | * FT_Get_PFR_Advance 139 | * 140 | * @description: 141 | * Return a given glyph advance, expressed in original metrics units, 142 | * from a PFR font. 143 | * 144 | * @input: 145 | * face :: A handle to the input face. 146 | * 147 | * gindex :: The glyph index. 148 | * 149 | * @output: 150 | * aadvance :: The glyph advance in metrics units. 151 | * 152 | * @return: 153 | * FreeType error code. 0~means success. 154 | * 155 | * @note: 156 | * You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics 157 | * to convert the advance to device sub-pixels (i.e., 1/64th of pixels). 158 | */ 159 | FT_EXPORT( FT_Error ) 160 | FT_Get_PFR_Advance( FT_Face face, 161 | FT_UInt gindex, 162 | FT_Pos *aadvance ); 163 | 164 | /* */ 165 | 166 | 167 | FT_END_HEADER 168 | 169 | #endif /* FTPFR_H_ */ 170 | 171 | 172 | /* END */ 173 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ftsizes.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftsizes.h */ 4 | /* */ 5 | /* FreeType size objects management (specification). */ 6 | /* */ 7 | /* Copyright 1996-2016 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 */ 23 | /* where they are needed. */ 24 | /* */ 25 | /*************************************************************************/ 26 | 27 | 28 | #ifndef FTSIZES_H_ 29 | #define FTSIZES_H_ 30 | 31 | 32 | #include <ft2build.h> 33 | #include FT_FREETYPE_H 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 | /* sizes_management */ 49 | /* */ 50 | /* <Title> */ 51 | /* Size Management */ 52 | /* */ 53 | /* <Abstract> */ 54 | /* Managing multiple sizes per face. */ 55 | /* */ 56 | /* <Description> */ 57 | /* When creating a new face object (e.g., with @FT_New_Face), an */ 58 | /* @FT_Size object is automatically created and used to store all */ 59 | /* pixel-size dependent information, available in the `face->size' */ 60 | /* field. */ 61 | /* */ 62 | /* It is however possible to create more sizes for a given face, */ 63 | /* mostly in order to manage several character pixel sizes of the */ 64 | /* same font family and style. See @FT_New_Size and @FT_Done_Size. */ 65 | /* */ 66 | /* Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only */ 67 | /* modify the contents of the current `active' size; you thus need */ 68 | /* to use @FT_Activate_Size to change it. */ 69 | /* */ 70 | /* 99% of applications won't need the functions provided here, */ 71 | /* especially if they use the caching sub-system, so be cautious */ 72 | /* when using these. */ 73 | /* */ 74 | /*************************************************************************/ 75 | 76 | 77 | /*************************************************************************/ 78 | /* */ 79 | /* <Function> */ 80 | /* FT_New_Size */ 81 | /* */ 82 | /* <Description> */ 83 | /* Create a new size object from a given face object. */ 84 | /* */ 85 | /* <Input> */ 86 | /* face :: A handle to a parent face object. */ 87 | /* */ 88 | /* <Output> */ 89 | /* asize :: A handle to a new size object. */ 90 | /* */ 91 | /* <Return> */ 92 | /* FreeType error code. 0~means success. */ 93 | /* */ 94 | /* <Note> */ 95 | /* You need to call @FT_Activate_Size in order to select the new size */ 96 | /* for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size, */ 97 | /* @FT_Load_Glyph, @FT_Load_Char, etc. */ 98 | /* */ 99 | FT_EXPORT( FT_Error ) 100 | FT_New_Size( FT_Face face, 101 | FT_Size* size ); 102 | 103 | 104 | /*************************************************************************/ 105 | /* */ 106 | /* <Function> */ 107 | /* FT_Done_Size */ 108 | /* */ 109 | /* <Description> */ 110 | /* Discard a given size object. Note that @FT_Done_Face */ 111 | /* automatically discards all size objects allocated with */ 112 | /* @FT_New_Size. */ 113 | /* */ 114 | /* <Input> */ 115 | /* size :: A handle to a target size object. */ 116 | /* */ 117 | /* <Return> */ 118 | /* FreeType error code. 0~means success. */ 119 | /* */ 120 | FT_EXPORT( FT_Error ) 121 | FT_Done_Size( FT_Size size ); 122 | 123 | 124 | /*************************************************************************/ 125 | /* */ 126 | /* <Function> */ 127 | /* FT_Activate_Size */ 128 | /* */ 129 | /* <Description> */ 130 | /* Even though it is possible to create several size objects for a */ 131 | /* given face (see @FT_New_Size for details), functions like */ 132 | /* @FT_Load_Glyph or @FT_Load_Char only use the one that has been */ 133 | /* activated last to determine the `current character pixel size'. */ 134 | /* */ 135 | /* This function can be used to `activate' a previously created size */ 136 | /* object. */ 137 | /* */ 138 | /* <Input> */ 139 | /* size :: 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 */ 146 | /* the 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 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ftsynth.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ftsynth.h */ 4 | /* */ 5 | /* FreeType synthesizing code for emboldening and slanting */ 6 | /* (specification). */ 7 | /* */ 8 | /* Copyright 2000-2016 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 <ft2build.h> 49 | #include FT_FREETYPE_H 50 | 51 | #ifdef FREETYPE_H 52 | #error "freetype.h of FreeType 1 has been loaded!" 53 | #error "Please fix the directory search order for header files" 54 | #error "so that freetype.h of FreeType 2 is found first." 55 | #endif 56 | 57 | 58 | FT_BEGIN_HEADER 59 | 60 | /* Embolden a glyph by a `reasonable' value (which is highly a matter of */ 61 | /* taste). This function is actually a convenience function, providing */ 62 | /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */ 63 | /* */ 64 | /* For emboldened outlines the height, width, and advance metrics are */ 65 | /* increased by the strength of the emboldening -- this even affects */ 66 | /* mono-width fonts! */ 67 | /* */ 68 | /* You can also call @FT_Outline_Get_CBox to get precise values. */ 69 | FT_EXPORT( void ) 70 | FT_GlyphSlot_Embolden( FT_GlyphSlot slot ); 71 | 72 | /* Slant an outline glyph to the right by about 12 degrees. */ 73 | FT_EXPORT( void ) 74 | FT_GlyphSlot_Oblique( FT_GlyphSlot slot ); 75 | 76 | /* */ 77 | 78 | 79 | FT_END_HEADER 80 | 81 | #endif /* FTSYNTH_H_ */ 82 | 83 | 84 | /* END */ 85 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/fttrigon.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* fttrigon.h */ 4 | /* */ 5 | /* FreeType trigonometric functions (specification). */ 6 | /* */ 7 | /* Copyright 2001-2016 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 FT_FREETYPE_H 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 178 | * the 2d 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 `value2-value1'. 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 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/tttags.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* tttags.h */ 4 | /* */ 5 | /* Tags for TrueType and OpenType tables (specification only). */ 6 | /* */ 7 | /* Copyright 1996-2016 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 <ft2build.h> 24 | #include FT_FREETYPE_H 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 | #define TTAG_avar FT_MAKE_TAG( 'a', 'v', 'a', 'r' ) 37 | #define TTAG_BASE FT_MAKE_TAG( 'B', 'A', 'S', 'E' ) 38 | #define TTAG_bdat FT_MAKE_TAG( 'b', 'd', 'a', 't' ) 39 | #define TTAG_BDF FT_MAKE_TAG( 'B', 'D', 'F', ' ' ) 40 | #define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' ) 41 | #define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' ) 42 | #define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' ) 43 | #define TTAG_CBDT FT_MAKE_TAG( 'C', 'B', 'D', 'T' ) 44 | #define TTAG_CBLC FT_MAKE_TAG( 'C', 'B', 'L', 'C' ) 45 | #define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' ) 46 | #define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' ) 47 | #define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' ) 48 | #define TTAG_cvar FT_MAKE_TAG( 'c', 'v', 'a', 'r' ) 49 | #define TTAG_cvt FT_MAKE_TAG( 'c', 'v', 't', ' ' ) 50 | #define TTAG_DSIG FT_MAKE_TAG( 'D', 'S', 'I', 'G' ) 51 | #define TTAG_EBDT FT_MAKE_TAG( 'E', 'B', 'D', 'T' ) 52 | #define TTAG_EBLC FT_MAKE_TAG( 'E', 'B', 'L', 'C' ) 53 | #define TTAG_EBSC FT_MAKE_TAG( 'E', 'B', 'S', 'C' ) 54 | #define TTAG_feat FT_MAKE_TAG( 'f', 'e', 'a', 't' ) 55 | #define TTAG_FOND FT_MAKE_TAG( 'F', 'O', 'N', 'D' ) 56 | #define TTAG_fpgm FT_MAKE_TAG( 'f', 'p', 'g', 'm' ) 57 | #define TTAG_fvar FT_MAKE_TAG( 'f', 'v', 'a', 'r' ) 58 | #define TTAG_gasp FT_MAKE_TAG( 'g', 'a', 's', 'p' ) 59 | #define TTAG_GDEF FT_MAKE_TAG( 'G', 'D', 'E', 'F' ) 60 | #define TTAG_glyf FT_MAKE_TAG( 'g', 'l', 'y', 'f' ) 61 | #define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' ) 62 | #define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' ) 63 | #define TTAG_gvar FT_MAKE_TAG( 'g', 'v', 'a', 'r' ) 64 | #define TTAG_hdmx FT_MAKE_TAG( 'h', 'd', 'm', 'x' ) 65 | #define TTAG_head FT_MAKE_TAG( 'h', 'e', 'a', 'd' ) 66 | #define TTAG_hhea FT_MAKE_TAG( 'h', 'h', 'e', 'a' ) 67 | #define TTAG_hmtx FT_MAKE_TAG( 'h', 'm', 't', 'x' ) 68 | #define TTAG_JSTF FT_MAKE_TAG( 'J', 'S', 'T', 'F' ) 69 | #define TTAG_just FT_MAKE_TAG( 'j', 'u', 's', 't' ) 70 | #define TTAG_kern FT_MAKE_TAG( 'k', 'e', 'r', 'n' ) 71 | #define TTAG_lcar FT_MAKE_TAG( 'l', 'c', 'a', 'r' ) 72 | #define TTAG_loca FT_MAKE_TAG( 'l', 'o', 'c', 'a' ) 73 | #define TTAG_LTSH FT_MAKE_TAG( 'L', 'T', 'S', 'H' ) 74 | #define TTAG_LWFN FT_MAKE_TAG( 'L', 'W', 'F', 'N' ) 75 | #define TTAG_MATH FT_MAKE_TAG( 'M', 'A', 'T', 'H' ) 76 | #define TTAG_maxp FT_MAKE_TAG( 'm', 'a', 'x', 'p' ) 77 | #define TTAG_META FT_MAKE_TAG( 'M', 'E', 'T', 'A' ) 78 | #define TTAG_MMFX FT_MAKE_TAG( 'M', 'M', 'F', 'X' ) 79 | #define TTAG_MMSD FT_MAKE_TAG( 'M', 'M', 'S', 'D' ) 80 | #define TTAG_mort FT_MAKE_TAG( 'm', 'o', 'r', 't' ) 81 | #define TTAG_morx FT_MAKE_TAG( 'm', 'o', 'r', 'x' ) 82 | #define TTAG_name FT_MAKE_TAG( 'n', 'a', 'm', 'e' ) 83 | #define TTAG_opbd FT_MAKE_TAG( 'o', 'p', 'b', 'd' ) 84 | #define TTAG_OS2 FT_MAKE_TAG( 'O', 'S', '/', '2' ) 85 | #define TTAG_OTTO FT_MAKE_TAG( 'O', 'T', 'T', 'O' ) 86 | #define TTAG_PCLT FT_MAKE_TAG( 'P', 'C', 'L', 'T' ) 87 | #define TTAG_POST FT_MAKE_TAG( 'P', 'O', 'S', 'T' ) 88 | #define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' ) 89 | #define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' ) 90 | #define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' ) 91 | #define TTAG_sbix FT_MAKE_TAG( 's', 'b', 'i', 'x' ) 92 | #define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' ) 93 | #define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' ) 94 | #define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' ) 95 | #define TTAG_true FT_MAKE_TAG( 't', 'r', 'u', 'e' ) 96 | #define TTAG_ttc FT_MAKE_TAG( 't', 't', 'c', ' ' ) 97 | #define TTAG_ttcf FT_MAKE_TAG( 't', 't', 'c', 'f' ) 98 | #define TTAG_TYP1 FT_MAKE_TAG( 'T', 'Y', 'P', '1' ) 99 | #define TTAG_typ1 FT_MAKE_TAG( 't', 'y', 'p', '1' ) 100 | #define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' ) 101 | #define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' ) 102 | #define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' ) 103 | #define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' ) 104 | 105 | 106 | FT_END_HEADER 107 | 108 | #endif /* TTAGS_H_ */ 109 | 110 | 111 | /* END */ 112 | -------------------------------------------------------------------------------- /libs/freetype2/includes/freetype/ttunpat.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttunpat.h */ 4 | /* */ 5 | /* Definitions for the unpatented TrueType hinting system. */ 6 | /* Obsolete, retained for backwards compatibility. */ 7 | /* */ 8 | /* Copyright 2003-2016 by */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* Written by Graham Asher <graham.asher@btinternet.com> */ 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 TTUNPAT_H_ 23 | #define TTUNPAT_H_ 24 | 25 | 26 | #include <ft2build.h> 27 | #include FT_FREETYPE_H 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 | * @constant: 42 | * FT_PARAM_TAG_UNPATENTED_HINTING 43 | * 44 | * @description: 45 | * Deprecated. 46 | * 47 | * Previously: A constant used as the tag of an @FT_Parameter structure to 48 | * indicate that unpatented methods only should be used by the TrueType 49 | * bytecode interpreter for a typeface opened by @FT_Open_Face. 50 | * 51 | */ 52 | #define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) 53 | 54 | /* */ 55 | 56 | 57 | FT_END_HEADER 58 | 59 | 60 | #endif /* TTUNPAT_H_ */ 61 | 62 | 63 | /* END */ 64 | -------------------------------------------------------------------------------- /libs/freetype2/includes/ft2build.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ft2build.h */ 4 | /* */ 5 | /* FreeType 2 build and setup macros. */ 6 | /* */ 7 | /* Copyright 1996-2016 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. It is */ 22 | /* the only header file which should be included directly; all other */ 23 | /* FreeType header files should be accessed with macro names (after */ 24 | /* including `ft2build.h'). */ 25 | /* */ 26 | /* A typical example is */ 27 | /* */ 28 | /* #include <ft2build.h> */ 29 | /* #include FT_FREETYPE_H */ 30 | /* */ 31 | /*************************************************************************/ 32 | 33 | 34 | #ifndef FT2BUILD_H_ 35 | #define FT2BUILD_H_ 36 | 37 | #include <freetype/config/ftheader.h> 38 | 39 | #endif /* FT2BUILD_H_ */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /libs/freetype2/lib/osx/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hironishihara/ofxMixedFont/a9a2888531a5b50e0f7c2e4af1627644019faefc/libs/freetype2/lib/osx/libfreetype.a -------------------------------------------------------------------------------- /libs/harfbuzz/COPYING: -------------------------------------------------------------------------------- 1 | HarfBuzz is licensed under the so-called "Old MIT" license. Details follow. 2 | For parts of HarfBuzz that are licensed under different licenses see individual 3 | files names COPYING in subdirectories where applicable. 4 | 5 | Copyright © 2010,2011,2012 Google, Inc. 6 | Copyright © 2012 Mozilla Foundation 7 | Copyright © 2011 Codethink Limited 8 | Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies) 9 | Copyright © 2009 Keith Stribley 10 | Copyright © 2009 Martin Hosken and SIL International 11 | Copyright © 2007 Chris Wilson 12 | Copyright © 2006 Behdad Esfahbod 13 | Copyright © 2005 David Turner 14 | Copyright © 2004,2007,2008,2009,2010 Red Hat, Inc. 15 | Copyright © 1998-2004 David Turner and Werner Lemberg 16 | 17 | For full copyright notices consult the individual files in the package. 18 | 19 | 20 | Permission is hereby granted, without written agreement and without 21 | license or royalty fees, to use, copy, modify, and distribute this 22 | software and its documentation for any purpose, provided that the 23 | above copyright notice and the following two paragraphs appear in 24 | all copies of this software. 25 | 26 | IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 27 | DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 28 | ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 29 | IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 30 | DAMAGE. 31 | 32 | THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 33 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 34 | FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 35 | ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 36 | PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 37 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-blob.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Red Hat, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Red Hat Author(s): Behdad Esfahbod 25 | */ 26 | 27 | #ifndef HB_H_IN 28 | #error "Include <hb.h> instead." 29 | #endif 30 | 31 | #ifndef HB_BLOB_H 32 | #define HB_BLOB_H 33 | 34 | #include "hb-common.h" 35 | 36 | HB_BEGIN_DECLS 37 | 38 | 39 | /* 40 | * Note re various memory-modes: 41 | * 42 | * - In no case shall the HarfBuzz client modify memory 43 | * that is passed to HarfBuzz in a blob. If there is 44 | * any such possibility, MODE_DUPLICATE should be used 45 | * such that HarfBuzz makes a copy immediately, 46 | * 47 | * - Use MODE_READONLY otherse, unless you really really 48 | * really know what you are doing, 49 | * 50 | * - MODE_WRITABLE is appropriate if you really made a 51 | * copy of data solely for the purpose of passing to 52 | * HarfBuzz and doing that just once (no reuse!), 53 | * 54 | * - If the font is mmap()ed, it's ok to use 55 | * READONLY_MAY_MAKE_WRITABLE, however, using that mode 56 | * correctly is very tricky. Use MODE_READONLY instead. 57 | */ 58 | typedef enum { 59 | HB_MEMORY_MODE_DUPLICATE, 60 | HB_MEMORY_MODE_READONLY, 61 | HB_MEMORY_MODE_WRITABLE, 62 | HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE 63 | } hb_memory_mode_t; 64 | 65 | typedef struct hb_blob_t hb_blob_t; 66 | 67 | HB_EXTERN hb_blob_t * 68 | hb_blob_create (const char *data, 69 | unsigned int length, 70 | hb_memory_mode_t mode, 71 | void *user_data, 72 | hb_destroy_func_t destroy); 73 | 74 | /* Always creates with MEMORY_MODE_READONLY. 75 | * Even if the parent blob is writable, we don't 76 | * want the user of the sub-blob to be able to 77 | * modify the parent data as that data may be 78 | * shared among multiple sub-blobs. 79 | */ 80 | HB_EXTERN hb_blob_t * 81 | hb_blob_create_sub_blob (hb_blob_t *parent, 82 | unsigned int offset, 83 | unsigned int length); 84 | 85 | HB_EXTERN hb_blob_t * 86 | hb_blob_get_empty (void); 87 | 88 | HB_EXTERN hb_blob_t * 89 | hb_blob_reference (hb_blob_t *blob); 90 | 91 | HB_EXTERN void 92 | hb_blob_destroy (hb_blob_t *blob); 93 | 94 | HB_EXTERN hb_bool_t 95 | hb_blob_set_user_data (hb_blob_t *blob, 96 | hb_user_data_key_t *key, 97 | void * data, 98 | hb_destroy_func_t destroy, 99 | hb_bool_t replace); 100 | 101 | 102 | HB_EXTERN void * 103 | hb_blob_get_user_data (hb_blob_t *blob, 104 | hb_user_data_key_t *key); 105 | 106 | 107 | HB_EXTERN void 108 | hb_blob_make_immutable (hb_blob_t *blob); 109 | 110 | HB_EXTERN hb_bool_t 111 | hb_blob_is_immutable (hb_blob_t *blob); 112 | 113 | 114 | HB_EXTERN unsigned int 115 | hb_blob_get_length (hb_blob_t *blob); 116 | 117 | HB_EXTERN const char * 118 | hb_blob_get_data (hb_blob_t *blob, unsigned int *length); 119 | 120 | HB_EXTERN char * 121 | hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length); 122 | 123 | 124 | HB_END_DECLS 125 | 126 | #endif /* HB_BLOB_H */ 127 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-coretext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2012 Mozilla Foundation. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Mozilla Author(s): Jonathan Kew 25 | */ 26 | 27 | #ifndef HB_CORETEXT_H 28 | #define HB_CORETEXT_H 29 | 30 | #include "hb.h" 31 | 32 | #include <TargetConditionals.h> 33 | #if TARGET_OS_IPHONE 34 | # include <CoreText/CoreText.h> 35 | # include <CoreGraphics/CoreGraphics.h> 36 | #else 37 | # include <ApplicationServices/ApplicationServices.h> 38 | #endif 39 | 40 | HB_BEGIN_DECLS 41 | 42 | 43 | #define HB_CORETEXT_TAG_MORT HB_TAG('m','o','r','t') 44 | #define HB_CORETEXT_TAG_MORX HB_TAG('m','o','r','x') 45 | 46 | 47 | HB_EXTERN hb_face_t * 48 | hb_coretext_face_create (CGFontRef cg_font); 49 | 50 | 51 | HB_EXTERN CGFontRef 52 | hb_coretext_face_get_cg_font (hb_face_t *face); 53 | 54 | HB_EXTERN CTFontRef 55 | hb_coretext_font_get_ct_font (hb_font_t *font); 56 | 57 | 58 | HB_END_DECLS 59 | 60 | #endif /* HB_CORETEXT_H */ 61 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-deprecated.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Google, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Google Author(s): Behdad Esfahbod 25 | */ 26 | 27 | #ifndef HB_H_IN 28 | #error "Include <hb.h> instead." 29 | #endif 30 | 31 | #ifndef HB_DEPRECATED_H 32 | #define HB_DEPRECATED_H 33 | 34 | #include "hb-common.h" 35 | #include "hb-unicode.h" 36 | #include "hb-font.h" 37 | 38 | HB_BEGIN_DECLS 39 | 40 | #ifndef HB_DISABLE_DEPRECATED 41 | 42 | #define HB_SCRIPT_CANADIAN_ABORIGINAL HB_SCRIPT_CANADIAN_SYLLABICS 43 | 44 | #define HB_BUFFER_FLAGS_DEFAULT HB_BUFFER_FLAG_DEFAULT 45 | #define HB_BUFFER_SERIALIZE_FLAGS_DEFAULT HB_BUFFER_SERIALIZE_FLAG_DEFAULT 46 | 47 | typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data, 48 | hb_codepoint_t unicode, hb_codepoint_t variation_selector, 49 | hb_codepoint_t *glyph, 50 | void *user_data); 51 | 52 | HB_EXTERN void 53 | hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, 54 | hb_font_get_glyph_func_t func, 55 | void *user_data, hb_destroy_func_t destroy); 56 | 57 | #endif 58 | 59 | HB_END_DECLS 60 | 61 | #endif /* HB_DEPRECATED_H */ 62 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-face.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Red Hat, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Red Hat Author(s): Behdad Esfahbod 25 | */ 26 | 27 | #ifndef HB_H_IN 28 | #error "Include <hb.h> instead." 29 | #endif 30 | 31 | #ifndef HB_FACE_H 32 | #define HB_FACE_H 33 | 34 | #include "hb-common.h" 35 | #include "hb-blob.h" 36 | 37 | HB_BEGIN_DECLS 38 | 39 | 40 | /* 41 | * hb_face_t 42 | */ 43 | 44 | typedef struct hb_face_t hb_face_t; 45 | 46 | HB_EXTERN hb_face_t * 47 | hb_face_create (hb_blob_t *blob, 48 | unsigned int index); 49 | 50 | typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data); 51 | 52 | /* calls destroy() when not needing user_data anymore */ 53 | HB_EXTERN hb_face_t * 54 | hb_face_create_for_tables (hb_reference_table_func_t reference_table_func, 55 | void *user_data, 56 | hb_destroy_func_t destroy); 57 | 58 | HB_EXTERN hb_face_t * 59 | hb_face_get_empty (void); 60 | 61 | HB_EXTERN hb_face_t * 62 | hb_face_reference (hb_face_t *face); 63 | 64 | HB_EXTERN void 65 | hb_face_destroy (hb_face_t *face); 66 | 67 | HB_EXTERN hb_bool_t 68 | hb_face_set_user_data (hb_face_t *face, 69 | hb_user_data_key_t *key, 70 | void * data, 71 | hb_destroy_func_t destroy, 72 | hb_bool_t replace); 73 | 74 | 75 | HB_EXTERN void * 76 | hb_face_get_user_data (hb_face_t *face, 77 | hb_user_data_key_t *key); 78 | 79 | HB_EXTERN void 80 | hb_face_make_immutable (hb_face_t *face); 81 | 82 | HB_EXTERN hb_bool_t 83 | hb_face_is_immutable (hb_face_t *face); 84 | 85 | 86 | HB_EXTERN hb_blob_t * 87 | hb_face_reference_table (hb_face_t *face, 88 | hb_tag_t tag); 89 | 90 | HB_EXTERN hb_blob_t * 91 | hb_face_reference_blob (hb_face_t *face); 92 | 93 | HB_EXTERN void 94 | hb_face_set_index (hb_face_t *face, 95 | unsigned int index); 96 | 97 | HB_EXTERN unsigned int 98 | hb_face_get_index (hb_face_t *face); 99 | 100 | HB_EXTERN void 101 | hb_face_set_upem (hb_face_t *face, 102 | unsigned int upem); 103 | 104 | HB_EXTERN unsigned int 105 | hb_face_get_upem (hb_face_t *face); 106 | 107 | HB_EXTERN void 108 | hb_face_set_glyph_count (hb_face_t *face, 109 | unsigned int glyph_count); 110 | 111 | HB_EXTERN unsigned int 112 | hb_face_get_glyph_count (hb_face_t *face); 113 | 114 | 115 | HB_END_DECLS 116 | 117 | #endif /* HB_FACE_H */ 118 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-ft.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Red Hat, Inc. 3 | * Copyright © 2015 Google, Inc. 4 | * 5 | * This is part of HarfBuzz, a text shaping library. 6 | * 7 | * Permission is hereby granted, without written agreement and without 8 | * license or royalty fees, to use, copy, modify, and distribute this 9 | * software and its documentation for any purpose, provided that the 10 | * above copyright notice and the following two paragraphs appear in 11 | * all copies of this software. 12 | * 13 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 14 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 15 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 16 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 17 | * DAMAGE. 18 | * 19 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 20 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 21 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 22 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 23 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 24 | * 25 | * Red Hat Author(s): Behdad Esfahbod 26 | * Google Author(s): Behdad Esfahbod 27 | */ 28 | 29 | #ifndef HB_FT_H 30 | #define HB_FT_H 31 | 32 | #include "hb.h" 33 | 34 | #include <ft2build.h> 35 | #include FT_FREETYPE_H 36 | 37 | HB_BEGIN_DECLS 38 | 39 | /* 40 | * Note: FreeType is not thread-safe. 41 | * Hence, these functions are not either. 42 | */ 43 | 44 | /* 45 | * hb-face from ft-face. 46 | */ 47 | 48 | /* This one creates a new hb-face for given ft-face. 49 | * When the returned hb-face is destroyed, the destroy 50 | * callback is called (if not NULL), with the ft-face passed 51 | * to it. 52 | * 53 | * The client is responsible to make sure that ft-face is 54 | * destroyed after hb-face is destroyed. 55 | * 56 | * Most often you don't want this function. You should use either 57 | * hb_ft_face_create_cached(), or hb_ft_face_create_referenced(). 58 | * In particular, if you are going to pass NULL as destroy, you 59 | * probably should use (the more recent) hb_ft_face_create_referenced() 60 | * instead. 61 | */ 62 | HB_EXTERN hb_face_t * 63 | hb_ft_face_create (FT_Face ft_face, 64 | hb_destroy_func_t destroy); 65 | 66 | /* This version is like hb_ft_face_create(), except that it caches 67 | * the hb-face using the generic pointer of the ft-face. This means 68 | * that subsequent calls to this function with the same ft-face will 69 | * return the same hb-face (correctly referenced). 70 | * 71 | * Client is still responsible for making sure that ft-face is destroyed 72 | * after hb-face is. 73 | */ 74 | HB_EXTERN hb_face_t * 75 | hb_ft_face_create_cached (FT_Face ft_face); 76 | 77 | /* This version is like hb_ft_face_create(), except that it calls 78 | * FT_Reference_Face() on ft-face, as such keeping ft-face alive 79 | * as long as the hb-face is. 80 | * 81 | * This is the most convenient version to use. Use it unless you have 82 | * very good reasons not to. 83 | */ 84 | HB_EXTERN hb_face_t * 85 | hb_ft_face_create_referenced (FT_Face ft_face); 86 | 87 | 88 | /* 89 | * hb-font from ft-face. 90 | */ 91 | 92 | /* 93 | * Note: 94 | * 95 | * Set face size on ft-face before creating hb-font from it. 96 | * Otherwise hb-ft would NOT pick up the font size correctly. 97 | */ 98 | 99 | /* See notes on hb_ft_face_create(). Same issues re lifecycle-management 100 | * apply here. Use hb_ft_font_create_referenced() if you can. */ 101 | HB_EXTERN hb_font_t * 102 | hb_ft_font_create (FT_Face ft_face, 103 | hb_destroy_func_t destroy); 104 | 105 | /* See notes on hb_ft_face_create_referenced() re lifecycle-management 106 | * issues. */ 107 | HB_EXTERN hb_font_t * 108 | hb_ft_font_create_referenced (FT_Face ft_face); 109 | 110 | HB_EXTERN FT_Face 111 | hb_ft_font_get_face (hb_font_t *font); 112 | 113 | HB_EXTERN void 114 | hb_ft_font_set_load_flags (hb_font_t *font, int load_flags); 115 | 116 | HB_EXTERN int 117 | hb_ft_font_get_load_flags (hb_font_t *font); 118 | 119 | /* Makes an hb_font_t use FreeType internally to implement font functions. */ 120 | HB_EXTERN void 121 | hb_ft_font_set_funcs (hb_font_t *font); 122 | 123 | 124 | HB_END_DECLS 125 | 126 | #endif /* HB_FT_H */ 127 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-glib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Red Hat, Inc. 3 | * Copyright © 2011 Google, Inc. 4 | * 5 | * This is part of HarfBuzz, a text shaping library. 6 | * 7 | * Permission is hereby granted, without written agreement and without 8 | * license or royalty fees, to use, copy, modify, and distribute this 9 | * software and its documentation for any purpose, provided that the 10 | * above copyright notice and the following two paragraphs appear in 11 | * all copies of this software. 12 | * 13 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 14 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 15 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 16 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 17 | * DAMAGE. 18 | * 19 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 20 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 21 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 22 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 23 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 24 | * 25 | * Red Hat Author(s): Behdad Esfahbod 26 | * Google Author(s): Behdad Esfahbod 27 | */ 28 | 29 | #ifndef HB_GLIB_H 30 | #define HB_GLIB_H 31 | 32 | #include "hb.h" 33 | 34 | #include <glib.h> 35 | 36 | HB_BEGIN_DECLS 37 | 38 | 39 | HB_EXTERN hb_script_t 40 | hb_glib_script_to_script (GUnicodeScript script); 41 | 42 | HB_EXTERN GUnicodeScript 43 | hb_glib_script_from_script (hb_script_t script); 44 | 45 | 46 | HB_EXTERN hb_unicode_funcs_t * 47 | hb_glib_get_unicode_funcs (void); 48 | 49 | HB_EXTERN hb_blob_t * 50 | hb_glib_blob_create (GBytes *gbytes); 51 | 52 | 53 | HB_END_DECLS 54 | 55 | #endif /* HB_GLIB_H */ 56 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-gobject-enums.h: -------------------------------------------------------------------------------- 1 | 2 | /* Generated data (by glib-mkenums) */ 3 | 4 | /* 5 | * Copyright © 2013 Google, Inc. 6 | * 7 | * This is part of HarfBuzz, a text shaping library. 8 | * 9 | * Permission is hereby granted, without written agreement and without 10 | * license or royalty fees, to use, copy, modify, and distribute this 11 | * software and its documentation for any purpose, provided that the 12 | * above copyright notice and the following two paragraphs appear in 13 | * all copies of this software. 14 | * 15 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 16 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 17 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 18 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 19 | * DAMAGE. 20 | * 21 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 22 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 23 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 24 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 25 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 26 | * 27 | * Google Author(s): Behdad Esfahbod 28 | */ 29 | 30 | #ifndef HB_GOBJECT_H_IN 31 | #error "Include <hb-gobject.h> instead." 32 | #endif 33 | 34 | #ifndef HB_GOBJECT_ENUMS_H 35 | #define HB_GOBJECT_ENUMS_H 36 | 37 | #include "hb.h" 38 | 39 | #include <glib-object.h> 40 | 41 | HB_BEGIN_DECLS 42 | 43 | 44 | HB_EXTERN GType hb_gobject_memory_mode_get_type (void) G_GNUC_CONST; 45 | #define HB_GOBJECT_TYPE_MEMORY_MODE (hb_gobject_memory_mode_get_type ()) 46 | 47 | HB_EXTERN GType hb_gobject_buffer_content_type_get_type (void) G_GNUC_CONST; 48 | #define HB_GOBJECT_TYPE_BUFFER_CONTENT_TYPE (hb_gobject_buffer_content_type_get_type ()) 49 | 50 | HB_EXTERN GType hb_gobject_buffer_flags_get_type (void) G_GNUC_CONST; 51 | #define HB_GOBJECT_TYPE_BUFFER_FLAGS (hb_gobject_buffer_flags_get_type ()) 52 | 53 | HB_EXTERN GType hb_gobject_buffer_cluster_level_get_type (void) G_GNUC_CONST; 54 | #define HB_GOBJECT_TYPE_BUFFER_CLUSTER_LEVEL (hb_gobject_buffer_cluster_level_get_type ()) 55 | 56 | HB_EXTERN GType hb_gobject_buffer_serialize_flags_get_type (void) G_GNUC_CONST; 57 | #define HB_GOBJECT_TYPE_BUFFER_SERIALIZE_FLAGS (hb_gobject_buffer_serialize_flags_get_type ()) 58 | 59 | HB_EXTERN GType hb_gobject_buffer_serialize_format_get_type (void) G_GNUC_CONST; 60 | #define HB_GOBJECT_TYPE_BUFFER_SERIALIZE_FORMAT (hb_gobject_buffer_serialize_format_get_type ()) 61 | 62 | HB_EXTERN GType hb_gobject_direction_get_type (void) G_GNUC_CONST; 63 | #define HB_GOBJECT_TYPE_DIRECTION (hb_gobject_direction_get_type ()) 64 | 65 | HB_EXTERN GType hb_gobject_script_get_type (void) G_GNUC_CONST; 66 | #define HB_GOBJECT_TYPE_SCRIPT (hb_gobject_script_get_type ()) 67 | 68 | HB_EXTERN GType hb_gobject_unicode_general_category_get_type (void) G_GNUC_CONST; 69 | #define HB_GOBJECT_TYPE_UNICODE_GENERAL_CATEGORY (hb_gobject_unicode_general_category_get_type ()) 70 | 71 | HB_EXTERN GType hb_gobject_unicode_combining_class_get_type (void) G_GNUC_CONST; 72 | #define HB_GOBJECT_TYPE_UNICODE_COMBINING_CLASS (hb_gobject_unicode_combining_class_get_type ()) 73 | 74 | HB_EXTERN GType hb_gobject_ot_layout_glyph_class_get_type (void) G_GNUC_CONST; 75 | #define HB_GOBJECT_TYPE_OT_LAYOUT_GLYPH_CLASS (hb_gobject_ot_layout_glyph_class_get_type ()) 76 | 77 | 78 | HB_END_DECLS 79 | 80 | #endif /* HB_GOBJECT_ENUMS_H */ 81 | 82 | /* Generated data ends here */ 83 | 84 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-gobject-structs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2011 Google, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Google Author(s): Behdad Esfahbod 25 | */ 26 | 27 | #ifndef HB_GOBJECT_H_IN 28 | #error "Include <hb-gobject.h> instead." 29 | #endif 30 | 31 | #ifndef HB_GOBJECT_STRUCTS_H 32 | #define HB_GOBJECT_STRUCTS_H 33 | 34 | #include "hb.h" 35 | 36 | #include <glib-object.h> 37 | 38 | HB_BEGIN_DECLS 39 | 40 | 41 | /* Object types */ 42 | 43 | /** 44 | * hb_gobject_blob_get_type: 45 | * 46 | * Since: 0.9.2 47 | **/ 48 | HB_EXTERN GType hb_gobject_blob_get_type (void); 49 | #define HB_GOBJECT_TYPE_BLOB (hb_gobject_blob_get_type ()) 50 | 51 | /** 52 | * hb_gobject_buffer_get_type: 53 | * 54 | * Since: 0.9.2 55 | **/ 56 | HB_EXTERN GType hb_gobject_buffer_get_type (void); 57 | #define HB_GOBJECT_TYPE_BUFFER (hb_gobject_buffer_get_type ()) 58 | 59 | /** 60 | * hb_gobject_face_get_type: 61 | * 62 | * Since: 0.9.2 63 | **/ 64 | HB_EXTERN GType hb_gobject_face_get_type (void); 65 | #define HB_GOBJECT_TYPE_FACE (hb_gobject_face_get_type ()) 66 | 67 | /** 68 | * hb_gobject_font_get_type: 69 | * 70 | * Since: 0.9.2 71 | **/ 72 | HB_EXTERN GType hb_gobject_font_get_type (void); 73 | #define HB_GOBJECT_TYPE_FONT (hb_gobject_font_get_type ()) 74 | 75 | /** 76 | * hb_gobject_font_funcs_get_type: 77 | * 78 | * Since: 0.9.2 79 | **/ 80 | HB_EXTERN GType hb_gobject_font_funcs_get_type (void); 81 | #define HB_GOBJECT_TYPE_FONT_FUNCS (hb_gobject_font_funcs_get_type ()) 82 | 83 | HB_EXTERN GType hb_gobject_set_get_type (void); 84 | #define HB_GOBJECT_TYPE_SET (hb_gobject_set_get_type ()) 85 | 86 | HB_EXTERN GType hb_gobject_shape_plan_get_type (void); 87 | #define HB_GOBJECT_TYPE_SHAPE_PLAN (hb_gobject_shape_plan_get_type ()) 88 | 89 | /** 90 | * hb_gobject_unicode_funcs_get_type: 91 | * 92 | * Since: 0.9.2 93 | **/ 94 | HB_EXTERN GType hb_gobject_unicode_funcs_get_type (void); 95 | #define HB_GOBJECT_TYPE_UNICODE_FUNCS (hb_gobject_unicode_funcs_get_type ()) 96 | 97 | /* Value types */ 98 | 99 | HB_EXTERN GType hb_gobject_feature_get_type (void); 100 | #define HB_GOBJECT_TYPE_FEATURE (hb_gobject_feature_get_type ()) 101 | 102 | HB_EXTERN GType hb_gobject_glyph_info_get_type (void); 103 | #define HB_GOBJECT_TYPE_GLYPH_INFO (hb_gobject_glyph_info_get_type ()) 104 | 105 | HB_EXTERN GType hb_gobject_glyph_position_get_type (void); 106 | #define HB_GOBJECT_TYPE_GLYPH_POSITION (hb_gobject_glyph_position_get_type ()) 107 | 108 | HB_EXTERN GType hb_gobject_segment_properties_get_type (void); 109 | #define HB_GOBJECT_TYPE_SEGMENT_PROPERTIES (hb_gobject_segment_properties_get_type ()) 110 | 111 | HB_EXTERN GType hb_gobject_user_data_key_get_type (void); 112 | #define HB_GOBJECT_TYPE_USER_DATA_KEY (hb_gobject_user_data_key_get_type ()) 113 | 114 | 115 | HB_END_DECLS 116 | 117 | #endif /* HB_GOBJECT_H */ 118 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-gobject.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2011 Google, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Google Author(s): Behdad Esfahbod 25 | */ 26 | 27 | #ifndef HB_GOBJECT_H 28 | #define HB_GOBJECT_H 29 | #define HB_GOBJECT_H_IN 30 | 31 | #include "hb.h" 32 | 33 | #include "hb-gobject-enums.h" 34 | #include "hb-gobject-structs.h" 35 | 36 | HB_BEGIN_DECLS 37 | HB_END_DECLS 38 | 39 | #undef HB_GOBJECT_H_IN 40 | #endif /* HB_GOBJECT_H */ 41 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-icu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Red Hat, Inc. 3 | * Copyright © 2011 Google, Inc. 4 | * 5 | * This is part of HarfBuzz, a text shaping library. 6 | * 7 | * Permission is hereby granted, without written agreement and without 8 | * license or royalty fees, to use, copy, modify, and distribute this 9 | * software and its documentation for any purpose, provided that the 10 | * above copyright notice and the following two paragraphs appear in 11 | * all copies of this software. 12 | * 13 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 14 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 15 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 16 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 17 | * DAMAGE. 18 | * 19 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 20 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 21 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 22 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 23 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 24 | * 25 | * Red Hat Author(s): Behdad Esfahbod 26 | * Google Author(s): Behdad Esfahbod 27 | */ 28 | 29 | #ifndef HB_ICU_H 30 | #define HB_ICU_H 31 | 32 | #include "hb.h" 33 | 34 | #include <unicode/uscript.h> 35 | 36 | HB_BEGIN_DECLS 37 | 38 | 39 | HB_EXTERN hb_script_t 40 | hb_icu_script_to_script (UScriptCode script); 41 | 42 | HB_EXTERN UScriptCode 43 | hb_icu_script_from_script (hb_script_t script); 44 | 45 | 46 | HB_EXTERN hb_unicode_funcs_t * 47 | hb_icu_get_unicode_funcs (void); 48 | 49 | 50 | HB_END_DECLS 51 | 52 | #endif /* HB_ICU_H */ 53 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-ot-font.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Google, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Google Author(s): Behdad Esfahbod, Roozbeh Pournader 25 | */ 26 | 27 | #ifndef HB_OT_H_IN 28 | #error "Include <hb-ot.h> instead." 29 | #endif 30 | 31 | #ifndef HB_OT_FONT_H 32 | #define HB_OT_FONT_H 33 | 34 | #include "hb.h" 35 | 36 | HB_BEGIN_DECLS 37 | 38 | 39 | HB_EXTERN void 40 | hb_ot_font_set_funcs (hb_font_t *font); 41 | 42 | 43 | HB_END_DECLS 44 | 45 | #endif /* HB_OT_FONT_H */ 46 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-ot-shape.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Red Hat, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Red Hat Author(s): Behdad Esfahbod 25 | */ 26 | 27 | #ifndef HB_OT_H_IN 28 | #error "Include <hb-ot.h> instead." 29 | #endif 30 | 31 | #ifndef HB_OT_SHAPE_H 32 | #define HB_OT_SHAPE_H 33 | 34 | #include "hb.h" 35 | 36 | HB_BEGIN_DECLS 37 | 38 | /* TODO port to shape-plan / set. */ 39 | HB_EXTERN void 40 | hb_ot_shape_glyphs_closure (hb_font_t *font, 41 | hb_buffer_t *buffer, 42 | const hb_feature_t *features, 43 | unsigned int num_features, 44 | hb_set_t *glyphs); 45 | 46 | HB_EXTERN void 47 | hb_ot_shape_plan_collect_lookups (hb_shape_plan_t *shape_plan, 48 | hb_tag_t table_tag, 49 | hb_set_t *lookup_indexes /* OUT */); 50 | 51 | HB_END_DECLS 52 | 53 | #endif /* HB_OT_SHAPE_H */ 54 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-ot-tag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Red Hat, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Red Hat Author(s): Behdad Esfahbod 25 | */ 26 | 27 | #ifndef HB_OT_H_IN 28 | #error "Include <hb-ot.h> instead." 29 | #endif 30 | 31 | #ifndef HB_OT_TAG_H 32 | #define HB_OT_TAG_H 33 | 34 | #include "hb.h" 35 | 36 | HB_BEGIN_DECLS 37 | 38 | 39 | #define HB_OT_TAG_DEFAULT_SCRIPT HB_TAG ('D', 'F', 'L', 'T') 40 | #define HB_OT_TAG_DEFAULT_LANGUAGE HB_TAG ('d', 'f', 'l', 't') 41 | 42 | HB_EXTERN void 43 | hb_ot_tags_from_script (hb_script_t script, 44 | hb_tag_t *script_tag_1, 45 | hb_tag_t *script_tag_2); 46 | 47 | HB_EXTERN hb_script_t 48 | hb_ot_tag_to_script (hb_tag_t tag); 49 | 50 | HB_EXTERN hb_tag_t 51 | hb_ot_tag_from_language (hb_language_t language); 52 | 53 | HB_EXTERN hb_language_t 54 | hb_ot_tag_to_language (hb_tag_t tag); 55 | 56 | 57 | HB_END_DECLS 58 | 59 | #endif /* HB_OT_TAG_H */ 60 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-ot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Red Hat, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Red Hat Author(s): Behdad Esfahbod 25 | */ 26 | 27 | #ifndef HB_OT_H 28 | #define HB_OT_H 29 | #define HB_OT_H_IN 30 | 31 | #include "hb.h" 32 | 33 | #include "hb-ot-font.h" 34 | #include "hb-ot-layout.h" 35 | #include "hb-ot-tag.h" 36 | #include "hb-ot-shape.h" 37 | 38 | HB_BEGIN_DECLS 39 | 40 | HB_END_DECLS 41 | 42 | #undef HB_OT_H_IN 43 | #endif /* HB_OT_H */ 44 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-set.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2012 Google, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Google Author(s): Behdad Esfahbod 25 | */ 26 | 27 | #ifndef HB_H_IN 28 | #error "Include <hb.h> instead." 29 | #endif 30 | 31 | #ifndef HB_SET_H 32 | #define HB_SET_H 33 | 34 | #include "hb-common.h" 35 | 36 | HB_BEGIN_DECLS 37 | 38 | 39 | /* 40 | * Since: 0.9.21 41 | */ 42 | #define HB_SET_VALUE_INVALID ((hb_codepoint_t) -1) 43 | 44 | typedef struct hb_set_t hb_set_t; 45 | 46 | 47 | HB_EXTERN hb_set_t * 48 | hb_set_create (void); 49 | 50 | HB_EXTERN hb_set_t * 51 | hb_set_get_empty (void); 52 | 53 | HB_EXTERN hb_set_t * 54 | hb_set_reference (hb_set_t *set); 55 | 56 | HB_EXTERN void 57 | hb_set_destroy (hb_set_t *set); 58 | 59 | HB_EXTERN hb_bool_t 60 | hb_set_set_user_data (hb_set_t *set, 61 | hb_user_data_key_t *key, 62 | void * data, 63 | hb_destroy_func_t destroy, 64 | hb_bool_t replace); 65 | 66 | HB_EXTERN void * 67 | hb_set_get_user_data (hb_set_t *set, 68 | hb_user_data_key_t *key); 69 | 70 | 71 | /* Returns false if allocation has failed before */ 72 | HB_EXTERN hb_bool_t 73 | hb_set_allocation_successful (const hb_set_t *set); 74 | 75 | HB_EXTERN void 76 | hb_set_clear (hb_set_t *set); 77 | 78 | HB_EXTERN hb_bool_t 79 | hb_set_is_empty (const hb_set_t *set); 80 | 81 | HB_EXTERN hb_bool_t 82 | hb_set_has (const hb_set_t *set, 83 | hb_codepoint_t codepoint); 84 | 85 | /* Right now limited to 16-bit integers. Eventually will do full codepoint range, sans -1 86 | * which we will use as a sentinel. */ 87 | HB_EXTERN void 88 | hb_set_add (hb_set_t *set, 89 | hb_codepoint_t codepoint); 90 | 91 | HB_EXTERN void 92 | hb_set_add_range (hb_set_t *set, 93 | hb_codepoint_t first, 94 | hb_codepoint_t last); 95 | 96 | HB_EXTERN void 97 | hb_set_del (hb_set_t *set, 98 | hb_codepoint_t codepoint); 99 | 100 | HB_EXTERN void 101 | hb_set_del_range (hb_set_t *set, 102 | hb_codepoint_t first, 103 | hb_codepoint_t last); 104 | 105 | HB_EXTERN hb_bool_t 106 | hb_set_is_equal (const hb_set_t *set, 107 | const hb_set_t *other); 108 | 109 | HB_EXTERN void 110 | hb_set_set (hb_set_t *set, 111 | const hb_set_t *other); 112 | 113 | HB_EXTERN void 114 | hb_set_union (hb_set_t *set, 115 | const hb_set_t *other); 116 | 117 | HB_EXTERN void 118 | hb_set_intersect (hb_set_t *set, 119 | const hb_set_t *other); 120 | 121 | HB_EXTERN void 122 | hb_set_subtract (hb_set_t *set, 123 | const hb_set_t *other); 124 | 125 | HB_EXTERN void 126 | hb_set_symmetric_difference (hb_set_t *set, 127 | const hb_set_t *other); 128 | 129 | HB_EXTERN void 130 | hb_set_invert (hb_set_t *set); 131 | 132 | HB_EXTERN unsigned int 133 | hb_set_get_population (const hb_set_t *set); 134 | 135 | /* Returns -1 if set empty. */ 136 | HB_EXTERN hb_codepoint_t 137 | hb_set_get_min (const hb_set_t *set); 138 | 139 | /* Returns -1 if set empty. */ 140 | HB_EXTERN hb_codepoint_t 141 | hb_set_get_max (const hb_set_t *set); 142 | 143 | /* Pass -1 in to get started. */ 144 | HB_EXTERN hb_bool_t 145 | hb_set_next (const hb_set_t *set, 146 | hb_codepoint_t *codepoint); 147 | 148 | /* Pass -1 for first and last to get started. */ 149 | HB_EXTERN hb_bool_t 150 | hb_set_next_range (const hb_set_t *set, 151 | hb_codepoint_t *first, 152 | hb_codepoint_t *last); 153 | 154 | 155 | HB_END_DECLS 156 | 157 | #endif /* HB_SET_H */ 158 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-shape-plan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2012 Google, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Google Author(s): Behdad Esfahbod 25 | */ 26 | 27 | #ifndef HB_H_IN 28 | #error "Include <hb.h> instead." 29 | #endif 30 | 31 | #ifndef HB_SHAPE_PLAN_H 32 | #define HB_SHAPE_PLAN_H 33 | 34 | #include "hb-common.h" 35 | #include "hb-font.h" 36 | 37 | HB_BEGIN_DECLS 38 | 39 | typedef struct hb_shape_plan_t hb_shape_plan_t; 40 | 41 | HB_EXTERN hb_shape_plan_t * 42 | hb_shape_plan_create (hb_face_t *face, 43 | const hb_segment_properties_t *props, 44 | const hb_feature_t *user_features, 45 | unsigned int num_user_features, 46 | const char * const *shaper_list); 47 | 48 | HB_EXTERN hb_shape_plan_t * 49 | hb_shape_plan_create_cached (hb_face_t *face, 50 | const hb_segment_properties_t *props, 51 | const hb_feature_t *user_features, 52 | unsigned int num_user_features, 53 | const char * const *shaper_list); 54 | 55 | HB_EXTERN hb_shape_plan_t * 56 | hb_shape_plan_get_empty (void); 57 | 58 | HB_EXTERN hb_shape_plan_t * 59 | hb_shape_plan_reference (hb_shape_plan_t *shape_plan); 60 | 61 | HB_EXTERN void 62 | hb_shape_plan_destroy (hb_shape_plan_t *shape_plan); 63 | 64 | HB_EXTERN hb_bool_t 65 | hb_shape_plan_set_user_data (hb_shape_plan_t *shape_plan, 66 | hb_user_data_key_t *key, 67 | void * data, 68 | hb_destroy_func_t destroy, 69 | hb_bool_t replace); 70 | 71 | HB_EXTERN void * 72 | hb_shape_plan_get_user_data (hb_shape_plan_t *shape_plan, 73 | hb_user_data_key_t *key); 74 | 75 | 76 | HB_EXTERN hb_bool_t 77 | hb_shape_plan_execute (hb_shape_plan_t *shape_plan, 78 | hb_font_t *font, 79 | hb_buffer_t *buffer, 80 | const hb_feature_t *features, 81 | unsigned int num_features); 82 | 83 | HB_EXTERN const char * 84 | hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan); 85 | 86 | 87 | HB_END_DECLS 88 | 89 | #endif /* HB_SHAPE_PLAN_H */ 90 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-shape.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Red Hat, Inc. 3 | * Copyright © 2012 Google, Inc. 4 | * 5 | * This is part of HarfBuzz, a text shaping library. 6 | * 7 | * Permission is hereby granted, without written agreement and without 8 | * license or royalty fees, to use, copy, modify, and distribute this 9 | * software and its documentation for any purpose, provided that the 10 | * above copyright notice and the following two paragraphs appear in 11 | * all copies of this software. 12 | * 13 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 14 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 15 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 16 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 17 | * DAMAGE. 18 | * 19 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 20 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 21 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 22 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 23 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 24 | * 25 | * Red Hat Author(s): Behdad Esfahbod 26 | * Google Author(s): Behdad Esfahbod 27 | */ 28 | 29 | #ifndef HB_H_IN 30 | #error "Include <hb.h> instead." 31 | #endif 32 | 33 | #ifndef HB_SHAPE_H 34 | #define HB_SHAPE_H 35 | 36 | #include "hb-common.h" 37 | #include "hb-buffer.h" 38 | #include "hb-font.h" 39 | 40 | HB_BEGIN_DECLS 41 | 42 | 43 | typedef struct hb_feature_t { 44 | hb_tag_t tag; 45 | uint32_t value; 46 | unsigned int start; 47 | unsigned int end; 48 | } hb_feature_t; 49 | 50 | HB_EXTERN hb_bool_t 51 | hb_feature_from_string (const char *str, int len, 52 | hb_feature_t *feature); 53 | 54 | HB_EXTERN void 55 | hb_feature_to_string (hb_feature_t *feature, 56 | char *buf, unsigned int size); 57 | 58 | 59 | HB_EXTERN void 60 | hb_shape (hb_font_t *font, 61 | hb_buffer_t *buffer, 62 | const hb_feature_t *features, 63 | unsigned int num_features); 64 | 65 | HB_EXTERN hb_bool_t 66 | hb_shape_full (hb_font_t *font, 67 | hb_buffer_t *buffer, 68 | const hb_feature_t *features, 69 | unsigned int num_features, 70 | const char * const *shaper_list); 71 | 72 | HB_EXTERN const char ** 73 | hb_shape_list_shapers (void); 74 | 75 | 76 | HB_END_DECLS 77 | 78 | #endif /* HB_SHAPE_H */ 79 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb-version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2011 Google, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Google Author(s): Behdad Esfahbod 25 | */ 26 | 27 | #ifndef HB_H_IN 28 | #error "Include <hb.h> instead." 29 | #endif 30 | 31 | #ifndef HB_VERSION_H 32 | #define HB_VERSION_H 33 | 34 | #include "hb-common.h" 35 | 36 | HB_BEGIN_DECLS 37 | 38 | 39 | #define HB_VERSION_MAJOR 1 40 | #define HB_VERSION_MINOR 3 41 | #define HB_VERSION_MICRO 0 42 | 43 | #define HB_VERSION_STRING "1.3.0" 44 | 45 | #define HB_VERSION_ATLEAST(major,minor,micro) \ 46 | ((major)*10000+(minor)*100+(micro) <= \ 47 | HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO) 48 | 49 | 50 | HB_EXTERN void 51 | hb_version (unsigned int *major, 52 | unsigned int *minor, 53 | unsigned int *micro); 54 | 55 | HB_EXTERN const char * 56 | hb_version_string (void); 57 | 58 | HB_EXTERN hb_bool_t 59 | hb_version_atleast (unsigned int major, 60 | unsigned int minor, 61 | unsigned int micro); 62 | 63 | 64 | HB_END_DECLS 65 | 66 | #endif /* HB_VERSION_H */ 67 | -------------------------------------------------------------------------------- /libs/harfbuzz/includes/hb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Red Hat, Inc. 3 | * 4 | * This is part of HarfBuzz, a text shaping library. 5 | * 6 | * Permission is hereby granted, without written agreement and without 7 | * license or royalty fees, to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose, provided that the 9 | * above copyright notice and the following two paragraphs appear in 10 | * all copies of this software. 11 | * 12 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14 | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15 | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16 | * DAMAGE. 17 | * 18 | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20 | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21 | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22 | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23 | * 24 | * Red Hat Author(s): Behdad Esfahbod 25 | */ 26 | 27 | #ifndef HB_H 28 | #define HB_H 29 | #define HB_H_IN 30 | 31 | #ifndef HB_EXTERN 32 | #define HB_EXTERN extern 33 | #endif 34 | 35 | #include "hb-blob.h" 36 | #include "hb-buffer.h" 37 | #include "hb-common.h" 38 | #include "hb-deprecated.h" 39 | #include "hb-face.h" 40 | #include "hb-font.h" 41 | #include "hb-set.h" 42 | #include "hb-shape.h" 43 | #include "hb-shape-plan.h" 44 | #include "hb-unicode.h" 45 | #include "hb-version.h" 46 | 47 | HB_BEGIN_DECLS 48 | HB_END_DECLS 49 | 50 | #undef HB_H_IN 51 | #endif /* HB_H */ 52 | -------------------------------------------------------------------------------- /libs/harfbuzz/lib/osx/libharfbuzz.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hironishihara/ofxMixedFont/a9a2888531a5b50e0f7c2e4af1627644019faefc/libs/harfbuzz/lib/osx/libharfbuzz.a -------------------------------------------------------------------------------- /libs/libpng/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | This copy of the libpng notices is provided for your convenience. In case of 3 | any discrepancy between this copy and the notices in the file png.h that is 4 | included in the libpng distribution, the latter shall prevail. 5 | 6 | COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: 7 | 8 | If you modify libpng you may insert additional notices immediately following 9 | this sentence. 10 | 11 | This code is released under the libpng license. 12 | 13 | libpng versions 1.0.7, July 1, 2000 through 1.6.25, September 1, 2016 are 14 | Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are 15 | derived from libpng-1.0.6, and are distributed according to the same 16 | disclaimer and license as libpng-1.0.6 with the following individuals 17 | added to the list of Contributing Authors: 18 | 19 | Simon-Pierre Cadieux 20 | Eric S. Raymond 21 | Mans Rullgard 22 | Cosmin Truta 23 | Gilles Vollant 24 | James Yu 25 | 26 | and with the following additions to the disclaimer: 27 | 28 | There is no warranty against interference with your enjoyment of the 29 | library or against infringement. There is no warranty that our 30 | efforts or the library will fulfill any of your particular purposes 31 | or needs. This library is provided with all faults, and the entire 32 | risk of satisfactory quality, performance, accuracy, and effort is with 33 | the user. 34 | 35 | Some files in the "contrib" directory and some configure-generated 36 | files that are distributed with libpng have other copyright owners and 37 | are released under other open source licenses. 38 | 39 | libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are 40 | Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from 41 | libpng-0.96, and are distributed according to the same disclaimer and 42 | license as libpng-0.96, with the following individuals added to the list 43 | of Contributing Authors: 44 | 45 | Tom Lane 46 | Glenn Randers-Pehrson 47 | Willem van Schaik 48 | 49 | libpng versions 0.89, June 1996, through 0.96, May 1997, are 50 | Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, 51 | and are distributed according to the same disclaimer and license as 52 | libpng-0.88, with the following individuals added to the list of 53 | Contributing Authors: 54 | 55 | John Bowler 56 | Kevin Bracey 57 | Sam Bushell 58 | Magnus Holmgren 59 | Greg Roelofs 60 | Tom Tanner 61 | 62 | Some files in the "scripts" directory have other copyright owners 63 | but are released under this license. 64 | 65 | libpng versions 0.5, May 1995, through 0.88, January 1996, are 66 | Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. 67 | 68 | For the purposes of this copyright and license, "Contributing Authors" 69 | is defined as the following set of individuals: 70 | 71 | Andreas Dilger 72 | Dave Martindale 73 | Guy Eric Schalnat 74 | Paul Schmidt 75 | Tim Wegner 76 | 77 | The PNG Reference Library is supplied "AS IS". The Contributing Authors 78 | and Group 42, Inc. disclaim all warranties, expressed or implied, 79 | including, without limitation, the warranties of merchantability and of 80 | fitness for any purpose. The Contributing Authors and Group 42, Inc. 81 | assume no liability for direct, indirect, incidental, special, exemplary, 82 | or consequential damages, which may result from the use of the PNG 83 | Reference Library, even if advised of the possibility of such damage. 84 | 85 | Permission is hereby granted to use, copy, modify, and distribute this 86 | source code, or portions hereof, for any purpose, without fee, subject 87 | to the following restrictions: 88 | 89 | 1. The origin of this source code must not be misrepresented. 90 | 91 | 2. Altered versions must be plainly marked as such and must not 92 | be misrepresented as being the original source. 93 | 94 | 3. This Copyright notice may not be removed or altered from any 95 | source or altered source distribution. 96 | 97 | The Contributing Authors and Group 42, Inc. specifically permit, without 98 | fee, and encourage the use of this source code as a component to 99 | supporting the PNG file format in commercial products. If you use this 100 | source code in a product, acknowledgment is not required but would be 101 | appreciated. 102 | 103 | END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. 104 | 105 | TRADEMARK: 106 | 107 | The name "libpng" has not been registered by the Copyright owner 108 | as a trademark in any jurisdiction. However, because libpng has 109 | been distributed and maintained world-wide, continually since 1995, 110 | the Copyright owner claims "common-law trademark protection" in any 111 | jurisdiction where common-law trademark is recognized. 112 | 113 | OSI CERTIFICATION: 114 | 115 | Libpng is OSI Certified Open Source Software. OSI Certified Open Source is 116 | a certification mark of the Open Source Initiative. OSI has not addressed 117 | the additional disclaimers inserted at version 1.0.7. 118 | 119 | EXPORT CONTROL: 120 | 121 | The Copyright owner believes that the Export Control Classification 122 | Number (ECCN) for libpng is EAR99, which means not subject to export 123 | controls or International Traffic in Arms Regulations (ITAR) because 124 | it is open source, publicly available software, that does not contain 125 | any encryption software. See the EAR, paragraphs 734.3(b)(3) and 126 | 734.7(b). 127 | 128 | Glenn Randers-Pehrson 129 | glennrp at users.sourceforge.net 130 | September 1, 2016 131 | -------------------------------------------------------------------------------- /libs/libpng/includes/pnglibconf.h: -------------------------------------------------------------------------------- 1 | /* pnglibconf.h - library build configuration */ 2 | 3 | /* libpng version 1.6.25, September 1, 2016 */ 4 | 5 | /* Copyright (c) 1998-2016 Glenn Randers-Pehrson */ 6 | 7 | /* This code is released under the libpng license. */ 8 | /* For conditions of distribution and use, see the disclaimer */ 9 | /* and license in png.h */ 10 | 11 | /* pnglibconf.h */ 12 | /* Machine generated file: DO NOT EDIT */ 13 | /* Derived from: scripts/pnglibconf.dfa */ 14 | #ifndef PNGLCONF_H 15 | #define PNGLCONF_H 16 | /* options */ 17 | #define PNG_16BIT_SUPPORTED 18 | #define PNG_ALIGNED_MEMORY_SUPPORTED 19 | /*#undef PNG_ARM_NEON_API_SUPPORTED*/ 20 | /*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/ 21 | #define PNG_BENIGN_ERRORS_SUPPORTED 22 | #define PNG_BENIGN_READ_ERRORS_SUPPORTED 23 | /*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/ 24 | #define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED 25 | #define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED 26 | #define PNG_COLORSPACE_SUPPORTED 27 | #define PNG_CONSOLE_IO_SUPPORTED 28 | #define PNG_CONVERT_tIME_SUPPORTED 29 | #define PNG_EASY_ACCESS_SUPPORTED 30 | /*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ 31 | #define PNG_ERROR_TEXT_SUPPORTED 32 | #define PNG_FIXED_POINT_SUPPORTED 33 | #define PNG_FLOATING_ARITHMETIC_SUPPORTED 34 | #define PNG_FLOATING_POINT_SUPPORTED 35 | #define PNG_FORMAT_AFIRST_SUPPORTED 36 | #define PNG_FORMAT_BGR_SUPPORTED 37 | #define PNG_GAMMA_SUPPORTED 38 | #define PNG_GET_PALETTE_MAX_SUPPORTED 39 | #define PNG_HANDLE_AS_UNKNOWN_SUPPORTED 40 | #define PNG_INCH_CONVERSIONS_SUPPORTED 41 | #define PNG_INFO_IMAGE_SUPPORTED 42 | #define PNG_IO_STATE_SUPPORTED 43 | #define PNG_MNG_FEATURES_SUPPORTED 44 | #define PNG_POINTER_INDEXING_SUPPORTED 45 | #define PNG_PROGRESSIVE_READ_SUPPORTED 46 | #define PNG_READ_16BIT_SUPPORTED 47 | #define PNG_READ_ALPHA_MODE_SUPPORTED 48 | #define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED 49 | #define PNG_READ_BACKGROUND_SUPPORTED 50 | #define PNG_READ_BGR_SUPPORTED 51 | #define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED 52 | #define PNG_READ_COMPOSITE_NODIV_SUPPORTED 53 | #define PNG_READ_COMPRESSED_TEXT_SUPPORTED 54 | #define PNG_READ_EXPAND_16_SUPPORTED 55 | #define PNG_READ_EXPAND_SUPPORTED 56 | #define PNG_READ_FILLER_SUPPORTED 57 | #define PNG_READ_GAMMA_SUPPORTED 58 | #define PNG_READ_GET_PALETTE_MAX_SUPPORTED 59 | #define PNG_READ_GRAY_TO_RGB_SUPPORTED 60 | #define PNG_READ_INTERLACING_SUPPORTED 61 | #define PNG_READ_INT_FUNCTIONS_SUPPORTED 62 | #define PNG_READ_INVERT_ALPHA_SUPPORTED 63 | #define PNG_READ_INVERT_SUPPORTED 64 | #define PNG_READ_OPT_PLTE_SUPPORTED 65 | #define PNG_READ_PACKSWAP_SUPPORTED 66 | #define PNG_READ_PACK_SUPPORTED 67 | #define PNG_READ_QUANTIZE_SUPPORTED 68 | #define PNG_READ_RGB_TO_GRAY_SUPPORTED 69 | #define PNG_READ_SCALE_16_TO_8_SUPPORTED 70 | #define PNG_READ_SHIFT_SUPPORTED 71 | #define PNG_READ_STRIP_16_TO_8_SUPPORTED 72 | #define PNG_READ_STRIP_ALPHA_SUPPORTED 73 | #define PNG_READ_SUPPORTED 74 | #define PNG_READ_SWAP_ALPHA_SUPPORTED 75 | #define PNG_READ_SWAP_SUPPORTED 76 | #define PNG_READ_TEXT_SUPPORTED 77 | #define PNG_READ_TRANSFORMS_SUPPORTED 78 | #define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED 79 | #define PNG_READ_USER_CHUNKS_SUPPORTED 80 | #define PNG_READ_USER_TRANSFORM_SUPPORTED 81 | #define PNG_READ_bKGD_SUPPORTED 82 | #define PNG_READ_cHRM_SUPPORTED 83 | #define PNG_READ_gAMA_SUPPORTED 84 | #define PNG_READ_hIST_SUPPORTED 85 | #define PNG_READ_iCCP_SUPPORTED 86 | #define PNG_READ_iTXt_SUPPORTED 87 | #define PNG_READ_oFFs_SUPPORTED 88 | #define PNG_READ_pCAL_SUPPORTED 89 | #define PNG_READ_pHYs_SUPPORTED 90 | #define PNG_READ_sBIT_SUPPORTED 91 | #define PNG_READ_sCAL_SUPPORTED 92 | #define PNG_READ_sPLT_SUPPORTED 93 | #define PNG_READ_sRGB_SUPPORTED 94 | #define PNG_READ_tEXt_SUPPORTED 95 | #define PNG_READ_tIME_SUPPORTED 96 | #define PNG_READ_tRNS_SUPPORTED 97 | #define PNG_READ_zTXt_SUPPORTED 98 | #define PNG_SAVE_INT_32_SUPPORTED 99 | #define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED 100 | #define PNG_SEQUENTIAL_READ_SUPPORTED 101 | #define PNG_SETJMP_SUPPORTED 102 | #define PNG_SET_OPTION_SUPPORTED 103 | #define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED 104 | #define PNG_SET_USER_LIMITS_SUPPORTED 105 | #define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED 106 | #define PNG_SIMPLIFIED_READ_BGR_SUPPORTED 107 | #define PNG_SIMPLIFIED_READ_SUPPORTED 108 | #define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED 109 | #define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED 110 | #define PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED 111 | #define PNG_SIMPLIFIED_WRITE_SUPPORTED 112 | #define PNG_STDIO_SUPPORTED 113 | #define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED 114 | #define PNG_TEXT_SUPPORTED 115 | #define PNG_TIME_RFC1123_SUPPORTED 116 | #define PNG_UNKNOWN_CHUNKS_SUPPORTED 117 | #define PNG_USER_CHUNKS_SUPPORTED 118 | #define PNG_USER_LIMITS_SUPPORTED 119 | #define PNG_USER_MEM_SUPPORTED 120 | #define PNG_USER_TRANSFORM_INFO_SUPPORTED 121 | #define PNG_USER_TRANSFORM_PTR_SUPPORTED 122 | #define PNG_WARNINGS_SUPPORTED 123 | #define PNG_WRITE_16BIT_SUPPORTED 124 | #define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED 125 | #define PNG_WRITE_BGR_SUPPORTED 126 | #define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED 127 | #define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED 128 | #define PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED 129 | #define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED 130 | #define PNG_WRITE_FILLER_SUPPORTED 131 | #define PNG_WRITE_FILTER_SUPPORTED 132 | #define PNG_WRITE_FLUSH_SUPPORTED 133 | #define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED 134 | #define PNG_WRITE_INTERLACING_SUPPORTED 135 | #define PNG_WRITE_INT_FUNCTIONS_SUPPORTED 136 | #define PNG_WRITE_INVERT_ALPHA_SUPPORTED 137 | #define PNG_WRITE_INVERT_SUPPORTED 138 | #define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED 139 | #define PNG_WRITE_PACKSWAP_SUPPORTED 140 | #define PNG_WRITE_PACK_SUPPORTED 141 | #define PNG_WRITE_SHIFT_SUPPORTED 142 | #define PNG_WRITE_SUPPORTED 143 | #define PNG_WRITE_SWAP_ALPHA_SUPPORTED 144 | #define PNG_WRITE_SWAP_SUPPORTED 145 | #define PNG_WRITE_TEXT_SUPPORTED 146 | #define PNG_WRITE_TRANSFORMS_SUPPORTED 147 | #define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED 148 | #define PNG_WRITE_USER_TRANSFORM_SUPPORTED 149 | #define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED 150 | #define PNG_WRITE_bKGD_SUPPORTED 151 | #define PNG_WRITE_cHRM_SUPPORTED 152 | #define PNG_WRITE_gAMA_SUPPORTED 153 | #define PNG_WRITE_hIST_SUPPORTED 154 | #define PNG_WRITE_iCCP_SUPPORTED 155 | #define PNG_WRITE_iTXt_SUPPORTED 156 | #define PNG_WRITE_oFFs_SUPPORTED 157 | #define PNG_WRITE_pCAL_SUPPORTED 158 | #define PNG_WRITE_pHYs_SUPPORTED 159 | #define PNG_WRITE_sBIT_SUPPORTED 160 | #define PNG_WRITE_sCAL_SUPPORTED 161 | #define PNG_WRITE_sPLT_SUPPORTED 162 | #define PNG_WRITE_sRGB_SUPPORTED 163 | #define PNG_WRITE_tEXt_SUPPORTED 164 | #define PNG_WRITE_tIME_SUPPORTED 165 | #define PNG_WRITE_tRNS_SUPPORTED 166 | #define PNG_WRITE_zTXt_SUPPORTED 167 | #define PNG_bKGD_SUPPORTED 168 | #define PNG_cHRM_SUPPORTED 169 | #define PNG_gAMA_SUPPORTED 170 | #define PNG_hIST_SUPPORTED 171 | #define PNG_iCCP_SUPPORTED 172 | #define PNG_iTXt_SUPPORTED 173 | #define PNG_oFFs_SUPPORTED 174 | #define PNG_pCAL_SUPPORTED 175 | #define PNG_pHYs_SUPPORTED 176 | #define PNG_sBIT_SUPPORTED 177 | #define PNG_sCAL_SUPPORTED 178 | #define PNG_sPLT_SUPPORTED 179 | #define PNG_sRGB_SUPPORTED 180 | #define PNG_tEXt_SUPPORTED 181 | #define PNG_tIME_SUPPORTED 182 | #define PNG_tRNS_SUPPORTED 183 | #define PNG_zTXt_SUPPORTED 184 | /* end of options */ 185 | /* settings */ 186 | #define PNG_API_RULE 0 187 | #define PNG_DEFAULT_READ_MACROS 1 188 | #define PNG_GAMMA_THRESHOLD_FIXED 5000 189 | #define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE 190 | #define PNG_INFLATE_BUF_SIZE 1024 191 | #define PNG_LINKAGE_API extern 192 | #define PNG_LINKAGE_CALLBACK extern 193 | #define PNG_LINKAGE_DATA extern 194 | #define PNG_LINKAGE_FUNCTION extern 195 | #define PNG_MAX_GAMMA_8 11 196 | #define PNG_QUANTIZE_BLUE_BITS 5 197 | #define PNG_QUANTIZE_GREEN_BITS 5 198 | #define PNG_QUANTIZE_RED_BITS 5 199 | #define PNG_TEXT_Z_DEFAULT_COMPRESSION (-1) 200 | #define PNG_TEXT_Z_DEFAULT_STRATEGY 0 201 | #define PNG_USER_CHUNK_CACHE_MAX 1000 202 | #define PNG_USER_CHUNK_MALLOC_MAX 8000000 203 | #define PNG_USER_HEIGHT_MAX 1000000 204 | #define PNG_USER_WIDTH_MAX 1000000 205 | #define PNG_ZBUF_SIZE 8192 206 | #define PNG_ZLIB_VERNUM 0x1280 207 | #define PNG_Z_DEFAULT_COMPRESSION (-1) 208 | #define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0 209 | #define PNG_Z_DEFAULT_STRATEGY 1 210 | #define PNG_sCAL_PRECISION 5 211 | #define PNG_sRGB_PROFILE_CHECKS 2 212 | /* end of settings */ 213 | #endif /* PNGLCONF_H */ 214 | -------------------------------------------------------------------------------- /libs/libpng/lib/osx/libpng.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hironishihara/ofxMixedFont/a9a2888531a5b50e0f7c2e4af1627644019faefc/libs/libpng/lib/osx/libpng.a -------------------------------------------------------------------------------- /ofxaddons_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hironishihara/ofxMixedFont/a9a2888531a5b50e0f7c2e4af1627644019faefc/ofxaddons_thumbnail.png -------------------------------------------------------------------------------- /src/ofxFT2Font.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofxMixedFontUtil.hpp" 4 | 5 | struct FT_FaceRec_; 6 | struct FT_LibraryRec_; 7 | class ofTexture; 8 | class ofPath; 9 | template<typename T> class ofPixels_; 10 | typedef ofPixels_<unsigned char> ofPixels; 11 | template<typename T> class ofColor_; 12 | typedef ofColor_<unsigned char> ofColor; 13 | class ofMesh; 14 | 15 | class ofxFT2Font : public ofxMixedFontUtil::ofxBaseFont 16 | { 17 | public: 18 | ofxFT2Font(); 19 | ofxFT2Font(const std::string &file_name, float font_size_pt); 20 | virtual ~ofxFT2Font() {}; 21 | 22 | ofxFT2Font(const ofxFT2Font &) = delete; 23 | ofxFT2Font(ofxFT2Font &&) = delete; 24 | ofxFT2Font &operator=(const ofxFT2Font &) = delete; 25 | ofxFT2Font &operator=(ofxFT2Font &&) = delete; 26 | 27 | int initialize(const std::string &file_name, float font_size_pt); 28 | int reset(); 29 | enum DrawingMode { TEXTURE_MODE, PATH_MODE }; 30 | bool selectDrawingMode(const DrawingMode &drawing_mode); 31 | 32 | ofxMixedFontUtil::ofxGlyphData makeGlyphData(const std::u32string &utf32_character, const int &index, int &length) override; 33 | void drawGlyphs(const std::vector<ofxMixedFontUtil::ofxGlyphData> &glyph_list) override; 34 | void drawGlyphsWithTexture(const std::vector<ofxMixedFontUtil::ofxGlyphData> &glyph_list) override; 35 | void drawGlyphsWithPath(const std::vector<ofxMixedFontUtil::ofxGlyphData> &glyph_list) override; 36 | 37 | void drawString(const std::u32string &utf32_string, const ofPoint &coord, const ofxMixedFontUtil::ofxCompFunc &func = ofxMixedFontUtil::defaultCompFunc) override; 38 | ofTexture getStringAsTexture(const std::u32string &utf32_string, const ofxMixedFontUtil::ofxCompFunc &func = ofxMixedFontUtil::defaultCompFunc) override; 39 | std::vector<ofPath> getStringAsPath(const std::u32string &utf32_string, const ofxMixedFontUtil::ofxCompFunc &func = ofxMixedFontUtil::defaultCompFunc) override; 40 | 41 | using ofxBaseFont::isReady; 42 | using ofxBaseFont::textureIsEnabled; 43 | using ofxBaseFont::pathIsEnabled; 44 | using ofxBaseFont::getFontProps; 45 | using ofxBaseFont::getDPI; 46 | using ofxBaseFont::drawString; 47 | using ofxBaseFont::drawStringWithTexture; 48 | using ofxBaseFont::drawStringWithPath; 49 | using ofxBaseFont::getStringBoundingBox; 50 | using ofxBaseFont::getGlyphBoundingBoxes; 51 | using ofxBaseFont::getStringAsTexture; 52 | using ofxBaseFont::getStringAsPath; 53 | 54 | protected: 55 | int setNotDefGlyphProps() override; 56 | int setSpaceGlyphProps() override; 57 | int setFullWidthSpaceGlyphProps() override; 58 | int setLineFeedGlyphProps() override; 59 | using ofxBaseFont::typesetString; 60 | 61 | private: 62 | static std::shared_ptr<FT_LibraryRec_> ft_library_; 63 | 64 | std::string file_path_; 65 | std::shared_ptr<FT_FaceRec_> ft_face_; 66 | bool is_mono_font_; 67 | float internal_scale_factor_; 68 | DrawingMode drawing_mode_; 69 | 70 | int getGlyphIndex(const std::u32string &code_point); 71 | int loadGlyph(const std::u32string &code_point, bool try_load_sub = false); 72 | int makeSpaceGlyphProps(const char32_t &code_point, const float &scale); 73 | 74 | std::vector<ofxMixedFontUtil::ofxGlyphData> loaded_glyphs_; 75 | std::vector<ofPath> loaded_glyph_outlines_; 76 | 77 | static const int ATLAS_TEXTURE_SIZE; 78 | std::shared_ptr<ofPixels> atlas_pixels_; 79 | std::shared_ptr<ofTexture> atlas_texture_; 80 | int atlas_offset_x_; 81 | int atlas_offset_y_; 82 | int next_atlas_offset_y_; 83 | bool atlas_pixels_have_been_updated_; 84 | std::shared_ptr<ofMesh> string_quads_; 85 | 86 | bool blend_is_enabled_; 87 | int blend_src_, blend_dst_; 88 | std::unique_ptr<ofColor> color_; 89 | 90 | void bind(); 91 | void addCharQuad(const int &glyph_index, const ofPoint &coord); 92 | void unbind(); 93 | 94 | }; 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /src/ofxMixedFont.cpp: -------------------------------------------------------------------------------- 1 | #include "ofxMixedFont.hpp" 2 | 3 | #include "ofTexture.h" 4 | #include "ofPath.h" 5 | 6 | typedef struct { 7 | std::weak_ptr<ofxMixedFontUtil::ofxBaseFont> font; 8 | std::vector<bool> assigned_char_flags; 9 | } charAssignation; 10 | 11 | bool ofxMixedFont::add(const ofxBaseFontPtr &font) 12 | { 13 | bool is_successful = false; 14 | 15 | if (font->isReady()) { 16 | font_list.push_back(font); 17 | if (font_list.size() == 1) { 18 | is_ready_ = true; 19 | texture_is_enabled_ = font->textureIsEnabled(); 20 | path_is_enabled_ = font->pathIsEnabled(); 21 | font_props_ = font->getFontProps(); 22 | } 23 | else { 24 | texture_is_enabled_ &= font->textureIsEnabled(); 25 | path_is_enabled_ &= font->pathIsEnabled(); 26 | } 27 | is_successful = true; 28 | } 29 | else { 30 | 31 | } 32 | 33 | return is_successful; 34 | } 35 | 36 | ofxMixedFontUtil::ofxGlyphData ofxMixedFont::makeGlyphData(const std::u32string &utf32_character, const int &index, int &length) 37 | { 38 | length = -1; // Note: This font is not ready. 39 | if (!isReady()) return ofxMixedFontUtil::ofxGlyphData(); 40 | 41 | length = 0; 42 | ofxMixedFontUtil::ofxGlyphData glyph; 43 | bool glyph_is_found = false; 44 | for (auto &font : font_list) { 45 | int tmp_length = 0; 46 | ofxMixedFontUtil::ofxGlyphData tmp_glyph = font->makeGlyphData(utf32_character, index, tmp_length); 47 | if (tmp_length > 0) { 48 | glyph = tmp_glyph; 49 | length = tmp_length; 50 | glyph_is_found = true; 51 | break; 52 | } 53 | } 54 | if (!glyph_is_found && font_list.size() > 0) { 55 | glyph = font_list[0]->makeGlyphData(utf32_character, index, length); 56 | } 57 | 58 | return glyph; 59 | } 60 | 61 | void ofxMixedFont::drawGlyphs(const std::vector<ofxMixedFontUtil::ofxGlyphData> &glyph_list) 62 | { 63 | if (!isReady()) return; 64 | 65 | for (auto &font : font_list) { 66 | font->drawGlyphs(glyph_list); 67 | } 68 | } 69 | 70 | void ofxMixedFont::drawGlyphsWithTexture(const std::vector<ofxMixedFontUtil::ofxGlyphData> &glyph_list) 71 | { 72 | if (!isReady()) return; 73 | // if (!textureIsEnabled()) return; 74 | 75 | for (auto &font : font_list) { 76 | font->drawGlyphsWithTexture(glyph_list); 77 | } 78 | } 79 | 80 | void ofxMixedFont::drawGlyphsWithPath(const std::vector<ofxMixedFontUtil::ofxGlyphData> &glyph_list) 81 | { 82 | if (!isReady()) return; 83 | // if (!pathIsEnabled()) return; 84 | 85 | for (auto &font : font_list) { 86 | font->drawGlyphsWithPath(glyph_list); 87 | } 88 | } 89 | 90 | void ofxMixedFont::drawString(const std::u32string &utf32_string, const ofPoint &coord, const ofxMixedFontUtil::ofxCompFunc &func) 91 | { 92 | if (!isReady()) return; 93 | 94 | std::vector<ofxMixedFontUtil::ofxGlyphData> glyph_list = typesetString(utf32_string, coord, func); 95 | drawGlyphs(glyph_list); 96 | } 97 | 98 | ofTexture ofxMixedFont::getStringAsTexture(const std::u32string &utf32_string, const ofxMixedFontUtil::ofxCompFunc &func) 99 | { 100 | // if (!isReady()) return ofTexture(); 101 | return ofTexture(); 102 | } 103 | 104 | std::vector<ofPath> ofxMixedFont::getStringAsPath(const std::u32string &utf32_string, const ofxMixedFontUtil::ofxCompFunc &func) 105 | { 106 | // if (!isReady()) return std::vector<ofPath>(); 107 | return std::vector<ofPath>(); 108 | } 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /src/ofxMixedFont.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <string> 4 | #include <vector> 5 | #include "ofxMixedFontUtil.hpp" 6 | 7 | class ofTexture; 8 | class ofPath; 9 | 10 | typedef std::shared_ptr<ofxMixedFontUtil::ofxBaseFont> ofxBaseFontPtr; 11 | typedef std::vector<ofxMixedFontUtil::ofxGlyphData> ofxGlyphDataList; 12 | // class ofxMixedFont; 13 | // typedef std::shared_ptr<ofxMixedFont> ofxMixedFontPtr; 14 | 15 | 16 | class ofxMixedFont : public ofxMixedFontUtil::ofxBaseFont 17 | { 18 | public: 19 | ofxMixedFont() {}; 20 | virtual ~ofxMixedFont() {}; 21 | 22 | ofxMixedFont(const ofxMixedFont &) = delete; 23 | ofxMixedFont(ofxMixedFont &&) = delete; 24 | ofxMixedFont &operator=(const ofxMixedFont &) = delete; 25 | ofxMixedFont &operator=(ofxMixedFont &&) = delete; 26 | 27 | bool add(const ofxBaseFontPtr &font); 28 | 29 | ofxMixedFontUtil::ofxGlyphData makeGlyphData(const std::u32string &utf32_character, const int &index, int &length) override; 30 | void drawGlyphs(const std::vector<ofxMixedFontUtil::ofxGlyphData> &glyph_list) override; 31 | void drawGlyphsWithTexture(const std::vector<ofxMixedFontUtil::ofxGlyphData> &glyph_list) override; 32 | void drawGlyphsWithPath(const std::vector<ofxMixedFontUtil::ofxGlyphData> &glyph_list) override; 33 | 34 | void drawString(const std::u32string &utf32_string, const ofPoint &coord, const ofxMixedFontUtil::ofxCompFunc &func = ofxMixedFontUtil::defaultCompFunc) override; 35 | ofTexture getStringAsTexture(const std::u32string &utf32_string, const ofxMixedFontUtil::ofxCompFunc &func = ofxMixedFontUtil::defaultCompFunc) override; 36 | std::vector<ofPath> getStringAsPath(const std::u32string &utf32_string, const ofxMixedFontUtil::ofxCompFunc &func = ofxMixedFontUtil::defaultCompFunc) override; 37 | 38 | using ofxBaseFont::isReady; 39 | using ofxBaseFont::textureIsEnabled; 40 | using ofxBaseFont::pathIsEnabled; 41 | using ofxBaseFont::getFontProps; 42 | using ofxBaseFont::getDPI; 43 | using ofxBaseFont::drawString; 44 | using ofxBaseFont::drawStringWithTexture; 45 | using ofxBaseFont::drawStringWithPath; 46 | using ofxBaseFont::getStringBoundingBox; 47 | using ofxBaseFont::getGlyphBoundingBoxes; 48 | using ofxBaseFont::getStringAsTexture; 49 | using ofxBaseFont::getStringAsPath; 50 | 51 | protected: 52 | int setNotDefGlyphProps() override {}; 53 | int setSpaceGlyphProps() override {}; 54 | int setFullWidthSpaceGlyphProps() override {}; 55 | int setLineFeedGlyphProps() override {}; 56 | using ofxBaseFont::typesetString; 57 | 58 | private: 59 | std::vector<ofxBaseFontPtr> font_list; 60 | 61 | }; 62 | -------------------------------------------------------------------------------- /src/ofxMixedFontUtil.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofTypes.h" 4 | 5 | #include <string> 6 | #include <vector> 7 | #include <locale> 8 | #include <codecvt> 9 | #include <memory> 10 | 11 | class ofTexture; 12 | class ofPath; 13 | class ofRectangle; 14 | 15 | namespace ofxMixedFontUtil { 16 | 17 | static const std::string VERSION = "16.10.1"; 18 | 19 | // Note: px = pt * DPI / PT_PER_INCH 20 | static const float PT_PER_INCH = 72.0; 21 | static const float DPI = 96.0; 22 | 23 | static std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> utf_converter; 24 | const std::u32string convertStringToU32string(const std::string &src); 25 | 26 | typedef struct { 27 | float font_size_pt; 28 | float x_ppem; 29 | float y_ppem; 30 | float line_height; 31 | float ascender_height; 32 | float descender_height; 33 | } ofxFontProps; 34 | 35 | class ofxBaseFont; 36 | 37 | typedef struct { 38 | std::u32string code_point; 39 | int height; 40 | int width; 41 | int bearing_x; 42 | int bearing_y; 43 | int advance; 44 | int vertical_bearing_x; 45 | int vertical_bearing_y; 46 | int vertical_advance; 47 | } ofxGlyphProps; 48 | 49 | typedef struct { 50 | std::weak_ptr<ofxBaseFont> font; 51 | ofxGlyphProps props; 52 | ofPoint coord; 53 | } ofxGlyphData; 54 | 55 | typedef std::function<void (const std::shared_ptr<ofxBaseFont> &font, const ofPoint &coord, std::vector<ofxGlyphData> &glyph_list)> ofxCompFunc; 56 | void defaultCompFunc(const std::shared_ptr<ofxBaseFont> &font, const ofPoint &coord, std::vector<ofxGlyphData> &glyph_list); 57 | 58 | class ofxBaseFont : public enable_shared_from_this<ofxBaseFont> 59 | { 60 | public: 61 | ofxBaseFont(); 62 | virtual ~ofxBaseFont() {}; 63 | 64 | ofxBaseFont(const ofxBaseFont &) = delete; 65 | ofxBaseFont(ofxBaseFont &&) = delete; 66 | ofxBaseFont & operator=(const ofxBaseFont &) = delete; 67 | ofxBaseFont & operator=(ofxBaseFont &&) = delete; 68 | 69 | virtual bool isReady() const final; 70 | virtual bool textureIsEnabled() const final; 71 | virtual bool pathIsEnabled() const final; 72 | virtual ofxFontProps getFontProps() const final; 73 | virtual float getDPI() const final; 74 | 75 | virtual ofxGlyphData makeGlyphData(const std::u32string &utf32_character, const int &index, int &length) = 0; 76 | virtual void drawGlyphs(const std::vector<ofxGlyphData> &glyph_list) = 0; 77 | virtual void drawGlyphsWithTexture(const std::vector<ofxGlyphData> &glyph_list) = 0; 78 | virtual void drawGlyphsWithPath(const std::vector<ofxGlyphData> &glyph_list) = 0; 79 | 80 | // utf32 81 | virtual void drawString(const std::u32string &utf32_string, const ofPoint &coord, const ofxCompFunc &func = defaultCompFunc) = 0; 82 | virtual void drawStringWithTexture(const std::u32string &utf32_string, const ofPoint &coord, const ofxCompFunc &func = defaultCompFunc) final; 83 | virtual void drawStringWithPath(const std::u32string &utf32_string, const ofPoint &coord, const ofxCompFunc &func = defaultCompFunc) final; 84 | virtual ofRectangle getStringBoundingBox(const std::u32string &utf32_string, const ofPoint &coord, const ofxCompFunc &func = defaultCompFunc) final; 85 | virtual std::vector<ofRectangle> getGlyphBoundingBoxes(const std::u32string &utf32_string, const ofPoint &coord, const ofxCompFunc &func = defaultCompFunc) final; 86 | 87 | virtual ofTexture getStringAsTexture(const std::u32string &utf32_string, const ofxCompFunc &func = defaultCompFunc) = 0; 88 | virtual std::vector<ofPath> getStringAsPath(const std::u32string &utf32_string, const ofxCompFunc &func = defaultCompFunc) = 0; 89 | 90 | virtual void drawString(const std::u32string &utf32_string, const float &x, const float &y, const float &z = 0.f, const ofxCompFunc &func = defaultCompFunc) final; 91 | virtual void drawStringWithTexture(const std::u32string &utf32_string, const float &x, const float &y, const float &z = 0.f, const ofxCompFunc &func = defaultCompFunc) final; 92 | virtual void drawStringWithPath(const std::u32string &utf32_string, const float &x, const float &y, const float &z = 0.f, const ofxCompFunc &func = defaultCompFunc) final; 93 | virtual ofRectangle getStringBoundingBox(const std::u32string &utf32_string, const float &x, const float &y, const float &z = 0.f, const ofxCompFunc &func = defaultCompFunc) final; 94 | virtual std::vector<ofRectangle> getGlyphBoundingBoxes(const std::u32string &utf32_string, const float &x, const float &y, const float &z = 0.f, const ofxCompFunc &func = defaultCompFunc) final; 95 | 96 | virtual void drawString(const std::u32string &utf32_string, const float &x, const float &y, const ofxCompFunc &func) final; 97 | virtual void drawStringWithTexture(const std::u32string &utf32_string, const float &x, const float &y, const ofxCompFunc &func) final; 98 | virtual void drawStringWithPath(const std::u32string &utf32_string, const float &x, const float &y, const ofxCompFunc &func) final; 99 | virtual ofRectangle getStringBoundingBox(const std::u32string &utf32_string, const float &x, const float &y, const ofxCompFunc &func = defaultCompFunc) final; 100 | virtual std::vector<ofRectangle> getGlyphBoundingBoxes(const std::u32string &utf32_string, const float &x, const float &y, const ofxCompFunc &func = defaultCompFunc) final; 101 | 102 | // utf8 (or narrow multibyte) 103 | virtual void drawString(const std::string &src_string, const ofPoint &coord, const ofxCompFunc &func = defaultCompFunc) final; 104 | virtual void drawStringWithTexture(const std::string &src_string, const ofPoint &coord, const ofxCompFunc &func = defaultCompFunc) final; 105 | virtual void drawStringWithPath(const std::string &src_string, const ofPoint &coord, const ofxCompFunc &func = defaultCompFunc) final; 106 | virtual ofRectangle getStringBoundingBox(const std::string &src_string, const ofPoint &coord, const ofxCompFunc &func = defaultCompFunc) final; 107 | virtual std::vector<ofRectangle> getGlyphBoundingBoxes(const std::string &src_string, const ofPoint &coord, const ofxCompFunc &func = defaultCompFunc) final; 108 | 109 | virtual ofTexture getStringAsTexture(const std::string &src_string, const ofxCompFunc &func = defaultCompFunc) final; 110 | virtual std::vector<ofPath> getStringAsPath(const std::string &src_string, const ofxCompFunc &func = defaultCompFunc) final; 111 | 112 | virtual void drawString(const std::string &src_string, const float &x, const float &y, const float &z = 0.f, const ofxCompFunc &func = defaultCompFunc) final; 113 | virtual void drawStringWithTexture(const std::string &src_string, const float &x, const float &y, const float &z = 0.f, const ofxCompFunc &func = defaultCompFunc) final; 114 | virtual void drawStringWithPath(const std::string &src_string, const float &x, const float &y, const float &z = 0.f, const ofxCompFunc &func = defaultCompFunc) final; 115 | virtual ofRectangle getStringBoundingBox(const std::string &src_string, const float &x, const float &y, const float &z = 0.f, const ofxCompFunc &func = defaultCompFunc) final; 116 | virtual std::vector<ofRectangle> getGlyphBoundingBoxes(const std::string &src_string, const float &x, const float &y, const float &z = 0.f, const ofxCompFunc &func = defaultCompFunc) final; 117 | 118 | virtual void drawString(const std::string &src_string, const float &x, const float &y, const ofxCompFunc &func = defaultCompFunc) final; 119 | virtual void drawStringWithTexture(const std::string &src_string, const float &x, const float &y, const ofxCompFunc &func = defaultCompFunc) final; 120 | virtual void drawStringWithPath(const std::string &src_string, const float &x, const float &y, const ofxCompFunc &func = defaultCompFunc) final; 121 | virtual ofRectangle getStringBoundingBox(const std::string &src_string, const float &x, const float &y, const ofxCompFunc &func = defaultCompFunc) final; 122 | virtual std::vector<ofRectangle> getGlyphBoundingBoxes(const std::string &src_string, const float &x, const float &y, const ofxCompFunc &func = defaultCompFunc) final; 123 | 124 | protected: 125 | virtual int setNotDefGlyphProps() = 0; 126 | virtual int setSpaceGlyphProps() = 0; 127 | virtual int setFullWidthSpaceGlyphProps() = 0; 128 | virtual int setLineFeedGlyphProps() = 0; 129 | virtual std::vector<ofxGlyphData> typesetString(const std::u32string &utf32_string, const ofPoint &coord, const ofxCompFunc &func) final; 130 | 131 | ofxFontProps font_props_; 132 | bool is_ready_; 133 | bool texture_is_enabled_; 134 | bool path_is_enabled_; 135 | 136 | }; 137 | 138 | } 139 | --------------------------------------------------------------------------------