\hypertarget{hex2otf_8c_source}{}\doxysection{hex2otf.\+c}
\label{hex2otf_8c_source}\index{src/hex2otf.c@{src/hex2otf.c}}
\mbox{\hyperlink{hex2otf_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00001}00001 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00002}00002 \textcolor{comment}{    @file hex2otf.c}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00003}00003 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00004}00004 \textcolor{comment}{    @brief hex2otf -\/ Convert GNU Unifont .hex file to OpenType font}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00005}00005 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00006}00006 \textcolor{comment}{    This program reads a Unifont .hex format file and a file containing}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00007}00007 \textcolor{comment}{    combining mark offset information, and produces an OpenType font file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00008}00008 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00009}00009 \textcolor{comment}{    @copyright Copyright © 2022 何志翔 (He Zhixiang)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00010}00010 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00011}00011 \textcolor{comment}{    @author 何志翔 (He Zhixiang)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00012}00012 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00013}00013 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00014}00014 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00015}00015 \textcolor{comment}{    LICENSE:}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00016}00016 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00017}00017 \textcolor{comment}{    This program is free software; you can redistribute it and/or}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00018}00018 \textcolor{comment}{    modify it under the terms of the GNU General Public License}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00019}00019 \textcolor{comment}{    as published by the Free Software Foundation; either version 2}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00020}00020 \textcolor{comment}{    of the License, or (at your option) any later version.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00021}00021 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00022}00022 \textcolor{comment}{    This program is distributed in the hope that it will be useful,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00023}00023 \textcolor{comment}{    but WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00024}00024 \textcolor{comment}{    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00025}00025 \textcolor{comment}{    GNU General Public License for more details.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00026}00026 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00027}00027 \textcolor{comment}{    You should have received a copy of the GNU General Public License}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00028}00028 \textcolor{comment}{    along with this program; if not, write to the Free Software}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00029}00029 \textcolor{comment}{    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00030}00030 \textcolor{comment}{    02110-\/1301, USA.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00031}00031 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00032}00032 \textcolor{comment}{    NOTE: It is a violation of the license terms of this software}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00033}00033 \textcolor{comment}{    to delete or override license and copyright information contained}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00034}00034 \textcolor{comment}{    in the hex2otf.h file if creating a font derived from Unifont glyphs.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00035}00035 \textcolor{comment}{    Fonts derived from Unifont can add names to the copyright notice}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00036}00036 \textcolor{comment}{    for creators of new or modified glyphs.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00037}00037 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <assert.h>}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <ctype.h>}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <inttypes.h>}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <stdarg.h>}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <stdbool.h>}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <stddef.h>}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <stdlib.h>}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <string.h>}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00048}00048 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00049}00049 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{hex2otf_8h}{hex2otf.h}}"{}}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00051}\mbox{\hyperlink{hex2otf_8c_a1c6d5de492ac61ad29aec7aa9a436bbf}{00051}} \textcolor{preprocessor}{\#define VERSION "{}1.0.1"{}}  \textcolor{comment}{///< Program version, for "{}-\/-\/version"{} option.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00053}00053 \textcolor{comment}{// This program assumes the execution character set is compatible with ASCII.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00054}00054 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00055}\mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{00055}} \textcolor{preprocessor}{\#define U16MAX 0xffff       }\textcolor{comment}{///< Maximum UTF-\/16 code point value.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00056}\mbox{\hyperlink{hex2otf_8c_a7ccab01e56208030185cefdca13e0ac8}{00056}} \textcolor{preprocessor}{\#define U32MAX 0xffffffff   }\textcolor{comment}{///< Maximum UTF-\/32 code point value.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00058}\mbox{\hyperlink{hex2otf_8c_af25acbe53b9070c1400a04c9231691bb}{00058}} \textcolor{preprocessor}{\#define PRI\_CP "{}U+\%.4"{}}PRIXFAST32 \textcolor{comment}{///< Format string to print Unicode code point.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00060}00060 \textcolor{preprocessor}{\#ifndef static\_assert}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00061}\mbox{\hyperlink{hex2otf_8c_abce67139ad0bc979ef080a694e60fb36}{00061}} \textcolor{preprocessor}{\#define static\_assert(a, b) (assert(a)) }\textcolor{comment}{///< If "{}a"{} is true, return string "{}b"{}.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00062}00062 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00064}00064 \textcolor{comment}{// Set or clear a particular bit.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00065}\mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{00065}} \textcolor{preprocessor}{\#define BX(shift, x) ((uintmax\_t)(!!(x)) << (shift)) }\textcolor{comment}{///< Truncate \& shift word.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00066}\mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{00066}} \textcolor{preprocessor}{\#define B0(shift) BX((shift), 0)    }\textcolor{comment}{///< Clear a given bit in a word.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00067}\mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{00067}} \textcolor{preprocessor}{\#define B1(shift) BX((shift), 1)    }\textcolor{comment}{///< Set   a given bit in a word.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00069}\mbox{\hyperlink{hex2otf_8c_a688a4772d61221e9378e5003da51265a}{00069}} \textcolor{preprocessor}{\#define GLYPH\_MAX\_WIDTH 16  }\textcolor{comment}{///< Maximum glyph width, in pixels.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00070}\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{00070}} \textcolor{preprocessor}{\#define GLYPH\_HEIGHT 16     }\textcolor{comment}{///< Maximum glyph height, in pixels.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00071}00071 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00072}00072 \textcolor{comment}{/// Number of bytes to represent one bitmap glyph as a binary array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00073}\mbox{\hyperlink{hex2otf_8c_ad0f95bf4a3a4a28b173b971e246b8745}{00073}} \textcolor{comment}{}\textcolor{preprocessor}{\#define GLYPH\_MAX\_BYTE\_COUNT (GLYPH\_HEIGHT * GLYPH\_MAX\_WIDTH / 8)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00074}00074 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00075}00075 \textcolor{comment}{/// Count of pixels below baseline.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00076}\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{00076}} \textcolor{comment}{}\textcolor{preprocessor}{\#define DESCENDER 2}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00077}00077 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00078}00078 \textcolor{comment}{/// Count of pixels above baseline.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00079}\mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{00079}} \textcolor{comment}{}\textcolor{preprocessor}{\#define ASCENDER (GLYPH\_HEIGHT -\/ DESCENDER)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00080}00080 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00081}00081 \textcolor{comment}{/// Font units per em.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00082}\mbox{\hyperlink{hex2otf_8c_a652fd701381105d0d34ca4084cca413c}{00082}} \textcolor{comment}{}\textcolor{preprocessor}{\#define FUPEM 64}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00083}00083 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00084}00084 \textcolor{comment}{/// An OpenType font has at most 65536 glyphs.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00085}\mbox{\hyperlink{hex2otf_8c_a1a1d1da8a5f6da54d749399b173c9bfc}{00085}} \textcolor{comment}{}\textcolor{preprocessor}{\#define MAX\_GLYPHS 65536}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00086}00086 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00087}00087 \textcolor{comment}{/// Name IDs 0-\/255 are used for standard names.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00088}\mbox{\hyperlink{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}{00088}} \textcolor{comment}{}\textcolor{preprocessor}{\#define MAX\_NAME\_IDS 256}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00089}00089 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00090}00090 \textcolor{comment}{/// Convert pixels to font units.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00091}\mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{00091}} \textcolor{comment}{}\textcolor{preprocessor}{\#define FU(x) ((x) * FUPEM / GLYPH\_HEIGHT)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00092}00092 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00093}00093 \textcolor{comment}{/// Convert glyph byte count to pixel width.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00094}\mbox{\hyperlink{hex2otf_8c_a79e768c38f3b21419f01d2d1347523be}{00094}} \textcolor{comment}{}\textcolor{preprocessor}{\#define PW(x) ((x) / (GLYPH\_HEIGHT / 8))}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00095}00095 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00096}00096 \textcolor{comment}{/// Definition of "{}byte"{} type as an unsigned char.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00097}\mbox{\hyperlink{hex2otf_8c_a0c8186d9b9b7880309c27230bbb5e69d}{00097}} \textcolor{comment}{}\textcolor{keyword}{typedef} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} \mbox{\hyperlink{hex2otf_8c_a0c8186d9b9b7880309c27230bbb5e69d}{byte}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00098}00098 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00099}00099 \textcolor{comment}{/// This type must be able to represent max(GLYPH\_MAX\_WIDTH, GLYPH\_HEIGHT).}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00100}\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{00100}} \textcolor{comment}{}\textcolor{keyword}{typedef} int\_least8\_t \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00101}00101 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00102}00102 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00103}00103 \textcolor{comment}{    @brief Print an error message on stderr, then exit.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00104}00104 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00105}00105 \textcolor{comment}{    This function prints the provided error string and optional}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00106}00106 \textcolor{comment}{    following arguments to stderr, and then exits with a status}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00107}00107 \textcolor{comment}{    of EXIT\_FAILURE.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00108}00108 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00109}00109 \textcolor{comment}{    @param[in] reason The output string to describe the error.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00110}00110 \textcolor{comment}{    @param[in] ... Optional following arguments to output.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00111}00111 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00112}00112 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00113}\mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{00113}} \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{keyword}{const} \textcolor{keywordtype}{char} *reason, ...)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00114}00114 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00115}00115     fputs (\textcolor{stringliteral}{"{}ERROR: "{}}, stderr);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00116}00116     va\_list args;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00117}00117     va\_start (args, reason);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00118}00118     vfprintf (stderr, reason, args);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00119}00119     va\_end (args);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00120}00120     putc (\textcolor{charliteral}{'\(\backslash\)n'}, stderr);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00121}00121     exit (EXIT\_FAILURE);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00122}00122 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00123}00123 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00124}00124 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00125}00125 \textcolor{comment}{    @brief Generic data structure for a linked list of buffer elements.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00126}00126 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00127}00127 \textcolor{comment}{    A buffer can act as a vector (when filled with 'store*' functions),}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00128}00128 \textcolor{comment}{    or a temporary output area (when filled with 'cache*' functions).}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00129}00129 \textcolor{comment}{    The 'store*' functions use native endian.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00130}00130 \textcolor{comment}{    The 'cache*' functions use big endian or other formats in OpenType.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00131}00131 \textcolor{comment}{    Beware of memory alignment.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00132}00132 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00133}\mbox{\hyperlink{struct_buffer}{00133}} \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\mbox{\hyperlink{struct_buffer}{Buffer}}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00134}00134 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00135}00135     \textcolor{keywordtype}{size\_t} capacity; \textcolor{comment}{// = 0 iff this buffer is free}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00136}00136     \textcolor{keywordtype}{byte} *begin, *next, *end;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00137}\mbox{\hyperlink{hex2otf_8c_a7feadaf37f40473cfc76921f8754c0f7}{00137}} \} \mbox{\hyperlink{hex2otf_8c_a7feadaf37f40473cfc76921f8754c0f7}{Buffer}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00138}00138 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00139}\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{00139}} \mbox{\hyperlink{struct_buffer}{Buffer}} *\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}; \textcolor{comment}{///< Initial allocation of empty array of buffer pointers.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00140}\mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{00140}} \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}};  \textcolor{comment}{///< Number of buffers in a Buffer * array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00141}\mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{00141}} \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}}; \textcolor{comment}{///< Index number to tail element of Buffer * array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00142}00142 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00143}00143 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00144}00144 \textcolor{comment}{    @brief Initialize an array of buffer pointers to all zeroes.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00145}00145 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00146}00146 \textcolor{comment}{    This function initializes the "{}allBuffers"{} array of buffer}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00147}00147 \textcolor{comment}{    pointers to all zeroes.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00148}00148 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00149}00149 \textcolor{comment}{    @param[in] count The number of buffer array pointers to allocate.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00150}00150 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00151}00151 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00152}\mbox{\hyperlink{hex2otf_8c_a4cebe6a72365812b5f392f4db9dc5db5}{00152}} \mbox{\hyperlink{hex2otf_8c_a4cebe6a72365812b5f392f4db9dc5db5}{initBuffers}} (\textcolor{keywordtype}{size\_t} count)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00153}00153 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00154}00154     assert (count > 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00155}00155     assert (\mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}} == 0); \textcolor{comment}{// uninitialized}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00156}00156     \mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}} = calloc (count, \textcolor{keyword}{sizeof} *\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00157}00157     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00158}00158         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Failed to initialize buffers."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00159}00159     \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}} = count;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00160}00160     \mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}} = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00161}00161 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00162}00162 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00163}00163 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00164}00164 \textcolor{comment}{    @brief Free all allocated buffer pointers.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00165}00165 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00166}00166 \textcolor{comment}{    This function frees all buffer pointers previously allocated}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00167}00167 \textcolor{comment}{    in the initBuffers function.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00168}00168 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00169}00169 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00170}\mbox{\hyperlink{hex2otf_8c_ac947cbe076da5fbab8f5e4c1c821b7a6}{00170}} \mbox{\hyperlink{hex2otf_8c_ac947cbe076da5fbab8f5e4c1c821b7a6}{cleanBuffers}} ()}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00171}00171 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00172}00172     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{size\_t} i = 0; i < \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}}; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00173}00173         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}[i].capacity)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00174}00174             free (\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}[i].begin);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00175}00175     free (\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00176}00176     \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}} = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00177}00177 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00178}00178 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00179}00179 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00180}00180 \textcolor{comment}{    @brief Create a new buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00181}00181 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00182}00182 \textcolor{comment}{    This function creates a new buffer array of type Buffer,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00183}00183 \textcolor{comment}{    with an initial size of initialCapacity elements.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00184}00184 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00185}00185 \textcolor{comment}{    @param[in] initialCapacity The initial number of elements in the buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00186}00186 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00187}00187 \mbox{\hyperlink{struct_buffer}{Buffer}} *}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00188}\mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{00188}} \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (\textcolor{keywordtype}{size\_t} initialCapacity)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00189}00189 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00190}00190     assert (initialCapacity > 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00191}00191     \mbox{\hyperlink{struct_buffer}{Buffer}} *buf = NULL;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00192}00192     \textcolor{keywordtype}{size\_t} sentinel = \mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00193}00193     \textcolor{keywordflow}{do}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00194}00194     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00195}00195         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}} == \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00196}00196             \mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}} = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00197}00197         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}[\mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}}].capacity == 0)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00198}00198         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00199}00199             buf = \&\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}[\mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}}++];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00200}00200             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00201}00201         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00202}00202     \} \textcolor{keywordflow}{while} (++\mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}} != sentinel);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00203}00203     \textcolor{keywordflow}{if} (!buf) \textcolor{comment}{// no existing buffer available}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00204}00204     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00205}00205         \textcolor{keywordtype}{size\_t} newSize = \textcolor{keyword}{sizeof} (\mbox{\hyperlink{hex2otf_8c_a7feadaf37f40473cfc76921f8754c0f7}{Buffer}}) * \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}} * 2;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00206}00206         \textcolor{keywordtype}{void} *extended = realloc (\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}, newSize);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00207}00207         \textcolor{keywordflow}{if} (!extended)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00208}00208             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Failed to create new buffers."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00209}00209         \mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}} = extended;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00210}00210         memset (\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}} + \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}}, 0, \textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct_buffer}{Buffer}}) * \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00211}00211         buf = \&\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}[\mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}}];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00212}00212         \mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}} = \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}} + 1;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00213}00213         \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}} *= 2;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00214}00214     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00215}00215     buf-\/>begin = malloc (initialCapacity);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00216}00216     \textcolor{keywordflow}{if} (!buf-\/>begin)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00217}00217         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Failed to allocate \%zu bytes of memory."{}}, initialCapacity);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00218}00218     buf-\/>capacity = initialCapacity;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00219}00219     buf-\/>next = buf-\/>begin;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00220}00220     buf-\/>end = buf-\/>begin + initialCapacity;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00221}00221     \textcolor{keywordflow}{return} buf;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00222}00222 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00223}00223 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00224}00224 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00225}00225 \textcolor{comment}{    @brief Ensure that the buffer has at least the specified minimum size.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00226}00226 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00227}00227 \textcolor{comment}{    This function takes a buffer array of type Buffer and the}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00228}00228 \textcolor{comment}{    necessary minimum number of elements as inputs, and attempts}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00229}00229 \textcolor{comment}{    to increase the size of the buffer if it must be larger.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00230}00230 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00231}00231 \textcolor{comment}{    If the buffer is too small and cannot be resized, the program}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00232}00232 \textcolor{comment}{    will terminate with an error message and an exit status of}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00233}00233 \textcolor{comment}{    EXIT\_FAILURE.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00234}00234 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00235}00235 \textcolor{comment}{    @param[in,out] buf The buffer to check.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00236}00236 \textcolor{comment}{    @param[in] needed The required minimum number of elements in the buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00237}00237 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00238}00238 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00239}\mbox{\hyperlink{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}{00239}} \mbox{\hyperlink{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}{ensureBuffer}} (\mbox{\hyperlink{struct_buffer}{Buffer}} *buf, \textcolor{keywordtype}{size\_t} needed)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00240}00240 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00241}00241     \textcolor{keywordflow}{if} (buf-\/>end -\/ buf-\/>next >= needed)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00242}00242         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00243}00243     ptrdiff\_t occupied = buf-\/>next -\/ buf-\/>begin;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00244}00244     \textcolor{keywordtype}{size\_t} required = occupied + needed;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00245}00245     \textcolor{keywordflow}{if} (required < needed) \textcolor{comment}{// overflow}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00246}00246         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Cannot allocate \%zu + \%zu bytes of memory."{}}, occupied, needed);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00247}00247     \textcolor{keywordflow}{if} (required > SIZE\_MAX / 2)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00248}00248         buf-\/>capacity = required;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00249}00249     \textcolor{keywordflow}{else} \textcolor{keywordflow}{while} (buf-\/>capacity < required)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00250}00250         buf-\/>capacity *= 2;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00251}00251     \textcolor{keywordtype}{void} *extended = realloc (buf-\/>begin, buf-\/>capacity);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00252}00252     \textcolor{keywordflow}{if} (!extended)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00253}00253         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Failed to allocate \%zu bytes of memory."{}}, buf-\/>capacity);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00254}00254     buf-\/>begin = extended;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00255}00255     buf-\/>next = buf-\/>begin + occupied;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00256}00256     buf-\/>end = buf-\/>begin + buf-\/>capacity;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00257}00257 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00258}00258 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00259}00259 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00260}00260 \textcolor{comment}{    @brief Count the number of elements in a buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00261}00261 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00262}00262 \textcolor{comment}{    @param[in] buf The buffer to be examined.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00263}00263 \textcolor{comment}{    @return The number of elements in the buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00264}00264 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00265}00265 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{size\_t}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00266}00266 countBufferedBytes (\textcolor{keyword}{const} \mbox{\hyperlink{struct_buffer}{Buffer}} *buf)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00267}00267 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00268}00268     \textcolor{keywordflow}{return} buf-\/>next -\/ buf-\/>begin;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00269}00269 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00270}00270 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00271}00271 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00272}00272 \textcolor{comment}{    @brief Get the start of the buffer array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00273}00273 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00274}00274 \textcolor{comment}{    @param[in] buf The buffer to be examined.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00275}00275 \textcolor{comment}{    @return A pointer of type Buffer * to the start of the buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00276}00276 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00277}00277 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void} *}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00278}00278 getBufferHead (\textcolor{keyword}{const} \mbox{\hyperlink{struct_buffer}{Buffer}} *buf)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00279}00279 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00280}00280     \textcolor{keywordflow}{return} buf-\/>begin;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00281}00281 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00282}00282 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00283}00283 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00284}00284 \textcolor{comment}{    @brief Get the end of the buffer array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00285}00285 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00286}00286 \textcolor{comment}{    @param[in] buf The buffer to be examined.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00287}00287 \textcolor{comment}{    @return A pointer of type Buffer * to the end of the buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00288}00288 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00289}00289 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void} *}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00290}00290 getBufferTail (\textcolor{keyword}{const} \mbox{\hyperlink{struct_buffer}{Buffer}} *buf)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00291}00291 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00292}00292     \textcolor{keywordflow}{return} buf-\/>next;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00293}00293 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00294}00294 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00295}00295 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00296}00296 \textcolor{comment}{    @brief Add a slot to the end of a buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00297}00297 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00298}00298 \textcolor{comment}{    This function ensures that the buffer can grow by one slot,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00299}00299 \textcolor{comment}{    and then returns a pointer to the new slot within the buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00300}00300 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00301}00301 \textcolor{comment}{    @param[in] buf The pointer to an array of type Buffer *.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00302}00302 \textcolor{comment}{    @param[in] slotSize The new slot number.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00303}00303 \textcolor{comment}{    @return A pointer to the new slot within the buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00304}00304 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00305}00305 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void} *}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00306}00306 getBufferSlot (\mbox{\hyperlink{struct_buffer}{Buffer}} *buf, \textcolor{keywordtype}{size\_t} slotSize)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00307}00307 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00308}00308     \mbox{\hyperlink{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}{ensureBuffer}} (buf, slotSize);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00309}00309     \textcolor{keywordtype}{void} *slot = buf-\/>next;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00310}00310     buf-\/>next += slotSize;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00311}00311     \textcolor{keywordflow}{return} slot;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00312}00312 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00313}00313 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00314}00314 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00315}00315 \textcolor{comment}{    @brief Reset a buffer pointer to the buffer's beginning.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00316}00316 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00317}00317 \textcolor{comment}{    This function resets an array of type Buffer * to point}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00318}00318 \textcolor{comment}{    its tail to the start of the array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00319}00319 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00320}00320 \textcolor{comment}{    @param[in] buf The pointer to an array of type Buffer *.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00321}00321 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00322}00322 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00323}00323 resetBuffer (\mbox{\hyperlink{struct_buffer}{Buffer}} *buf)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00324}00324 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00325}00325     buf-\/>next = buf-\/>begin;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00326}00326 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00327}00327 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00328}00328 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00329}00329 \textcolor{comment}{    @brief Free the memory previously allocated for a buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00330}00330 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00331}00331 \textcolor{comment}{    This function frees the memory allocated to an array}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00332}00332 \textcolor{comment}{    of type Buffer *.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00333}00333 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00334}00334 \textcolor{comment}{    @param[in] buf The pointer to an array of type Buffer *.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00335}00335 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00336}00336 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00337}\mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{00337}} \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (\mbox{\hyperlink{struct_buffer}{Buffer}} *buf)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00338}00338 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00339}00339     free (buf-\/>begin);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00340}00340     buf-\/>capacity = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00341}00341 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00342}00342 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00343}00343 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00344}00344 \textcolor{comment}{    @brief Temporary define to look up an element in an array of given type.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00345}00345 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00346}00346 \textcolor{comment}{    This defintion is used to create lookup functions to return}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00347}00347 \textcolor{comment}{    a given element in unsigned arrays of size 8, 16, and 32 bytes,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00348}00348 \textcolor{comment}{    and in an array of pixels.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00349}00349 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00350}\mbox{\hyperlink{hex2otf_8c_a0e5f5e7d04aec261ae28e2fca801194c}{00350}} \textcolor{preprocessor}{\#define defineStore(name, type) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00351}00351 \textcolor{preprocessor}{void name (Buffer *buf, type value) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00352}00352 \textcolor{preprocessor}{\{ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00353}00353 \textcolor{preprocessor}{    type *slot = getBufferSlot (buf, sizeof value); \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00354}00354 \textcolor{preprocessor}{    *slot = value; \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00355}00355 \textcolor{preprocessor}{\}}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00356}00356 \mbox{\hyperlink{hex2otf_8c_a0e5f5e7d04aec261ae28e2fca801194c}{defineStore}} (storeU8, uint\_least8\_t)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00357}00357 \mbox{\hyperlink{hex2otf_8c_a0e5f5e7d04aec261ae28e2fca801194c}{defineStore}} (storeU16, uint\_least16\_t)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00358}00358 \mbox{\hyperlink{hex2otf_8c_a0e5f5e7d04aec261ae28e2fca801194c}{defineStore}} (storeU32, uint\_least32\_t)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00359}00359 \mbox{\hyperlink{hex2otf_8c_a0e5f5e7d04aec261ae28e2fca801194c}{defineStore}} (storePixels, \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00360}00360 \textcolor{preprocessor}{\#undef defineStore}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00361}00361 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00362}00362 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00363}00363 \textcolor{comment}{    @brief Cache bytes in a big-\/endian format.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00364}00364 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00365}00365 \textcolor{comment}{    This function adds from 1, 2, 3, or 4 bytes to the end of}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00366}00366 \textcolor{comment}{    a byte array in big-\/endian order.  The buffer is updated}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00367}00367 \textcolor{comment}{    to account for the newly-\/added bytes.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00368}00368 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00369}00369 \textcolor{comment}{    @param[in,out] buf The array of bytes to which to append new bytes.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00370}00370 \textcolor{comment}{    @param[in] value The bytes to add, passed as a 32-\/bit unsigned word.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00371}00371 \textcolor{comment}{    @param[in] bytes The number of bytes to append to the buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00372}00372 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00373}00373 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00374}00374 cacheU (\mbox{\hyperlink{struct_buffer}{Buffer}} *buf, uint\_fast32\_t value, \textcolor{keywordtype}{int} bytes)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00375}00375 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00376}00376     assert (1 <= bytes \&\& bytes <= 4);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00377}00377     \mbox{\hyperlink{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}{ensureBuffer}} (buf, bytes);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00378}00378     \textcolor{keywordflow}{switch} (bytes)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00379}00379     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00380}00380         \textcolor{keywordflow}{case} 4: *buf-\/>next++ = value >> 24 \& 0xff; \textcolor{comment}{// fall through}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00381}00381         \textcolor{keywordflow}{case} 3: *buf-\/>next++ = value >> 16 \& 0xff; \textcolor{comment}{// fall through}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00382}00382         \textcolor{keywordflow}{case} 2: *buf-\/>next++ = value >> 8  \& 0xff; \textcolor{comment}{// fall through}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00383}00383         \textcolor{keywordflow}{case} 1: *buf-\/>next++ = value       \& 0xff;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00384}00384     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00385}00385 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00386}00386 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00387}00387 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00388}00388 \textcolor{comment}{    @brief Append one unsigned byte to the end of a byte array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00389}00389 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00390}00390 \textcolor{comment}{    This function adds one byte to the end of a byte array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00391}00391 \textcolor{comment}{    The buffer is updated to account for the newly-\/added byte.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00392}00392 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00393}00393 \textcolor{comment}{    @param[in,out] buf The array of bytes to which to append a new byte.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00394}00394 \textcolor{comment}{    @param[in] value The 8-\/bit unsigned value to append to the buf array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00395}00395 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00396}00396 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00397}\mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{00397}} \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (\mbox{\hyperlink{struct_buffer}{Buffer}} *buf, uint\_fast8\_t value)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00398}00398 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00399}00399     storeU8 (buf, value \& 0xff);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00400}00400 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00401}00401 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00402}00402 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00403}00403 \textcolor{comment}{    @brief Append two unsigned bytes to the end of a byte array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00404}00404 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00405}00405 \textcolor{comment}{    This function adds two bytes to the end of a byte array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00406}00406 \textcolor{comment}{    The buffer is updated to account for the newly-\/added bytes.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00407}00407 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00408}00408 \textcolor{comment}{    @param[in,out] buf The array of bytes to which to append two new bytes.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00409}00409 \textcolor{comment}{    @param[in] value The 16-\/bit unsigned value to append to the buf array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00410}00410 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00411}00411 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00412}\mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{00412}} \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (\mbox{\hyperlink{struct_buffer}{Buffer}} *buf, uint\_fast16\_t value)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00413}00413 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00414}00414     cacheU (buf, value, 2);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00415}00415 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00416}00416 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00417}00417 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00418}00418 \textcolor{comment}{    @brief Append four unsigned bytes to the end of a byte array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00419}00419 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00420}00420 \textcolor{comment}{    This function adds four bytes to the end of a byte array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00421}00421 \textcolor{comment}{    The buffer is updated to account for the newly-\/added bytes.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00422}00422 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00423}00423 \textcolor{comment}{    @param[in,out] buf The array of bytes to which to append four new bytes.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00424}00424 \textcolor{comment}{    @param[in] value The 32-\/bit unsigned value to append to the buf array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00425}00425 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00426}00426 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00427}\mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{00427}} \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (\mbox{\hyperlink{struct_buffer}{Buffer}} *buf, uint\_fast32\_t value)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00428}00428 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00429}00429     cacheU (buf, value, 4);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00430}00430 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00431}00431 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00432}00432 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00433}00433 \textcolor{comment}{    @brief Cache charstring number encoding in a CFF buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00434}00434 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00435}00435 \textcolor{comment}{    This function caches two's complement 8-\/, 16-\/, and 32-\/bit}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00436}00436 \textcolor{comment}{    words as per Adobe's Type 2 Charstring encoding for operands.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00437}00437 \textcolor{comment}{    These operands are used in Compact Font Format data structures.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00438}00438 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00439}00439 \textcolor{comment}{    Byte values can have offsets, for which this function}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00440}00440 \textcolor{comment}{    compensates, optionally followed by additional bytes:}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00441}00441 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00442}00442 \textcolor{comment}{        Byte Range   Offset   Bytes   Adjusted Range}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00443}00443 \textcolor{comment}{        -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/   -\/-\/-\/-\/-\/-\/   -\/-\/-\/-\/-\/   -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00444}00444 \textcolor{comment}{          0 to 11        0      1     0 to 11 (operators)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00445}00445 \textcolor{comment}{            12           0      2     Next byte is 8-\/bit op code}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00446}00446 \textcolor{comment}{         13 to 18        0      1     13 to 18 (operators)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00447}00447 \textcolor{comment}{         19 to 20        0      2+    hintmask and cntrmask operators}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00448}00448 \textcolor{comment}{         21 to 27        0      1     21 to 27 (operators)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00449}00449 \textcolor{comment}{            28           0      3     16-\/bit 2's complement number}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00450}00450 \textcolor{comment}{         29 to 31        0      1     29 to 31 (operators)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00451}00451 \textcolor{comment}{         32 to 246    -\/139      1     -\/107 to +107}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00452}00452 \textcolor{comment}{        247 to 250    +108      2     +108 to +1131}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00453}00453 \textcolor{comment}{        251 to 254    -\/108      2     -\/108 to -\/1131}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00454}00454 \textcolor{comment}{           255           0      5     16-\/bit integer and 16-\/bit fraction}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00455}00455 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00456}00456 \textcolor{comment}{    @param[in,out] buf The buffer to which the operand value is appended.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00457}00457 \textcolor{comment}{    @param[in] value The operand value.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00458}00458 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00459}00459 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00460}\mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{00460}} \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (\mbox{\hyperlink{struct_buffer}{Buffer}} *buf, int\_fast32\_t value)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00461}00461 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00462}00462     \textcolor{keywordflow}{if} (-\/107 <= value \&\& value <= 107)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00463}00463         \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (buf, value + 139);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00464}00464     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (108 <= value \&\& value <= 1131)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00465}00465     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00466}00466         \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (buf, (value -\/ 108) / 256 + 247);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00467}00467         \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (buf, (value -\/ 108) \% 256);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00468}00468     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00469}00469     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (-\/32768 <= value \&\& value <= 32767)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00470}00470     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00471}00471         \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (buf, 28);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00472}00472         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (buf, value);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00473}00473     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00474}00474     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (-\/2147483647 <= value \&\& value <= 2147483647)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00475}00475     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00476}00476         \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (buf, 29);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00477}00477         \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (buf, value);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00478}00478     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00479}00479     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00480}00480         assert (\textcolor{keyword}{false}); \textcolor{comment}{// other encodings are not used and omitted}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00481}00481     \textcolor{keyword}{static\_assert} (\mbox{\hyperlink{hex2otf_8c_a688a4772d61221e9378e5003da51265a}{GLYPH\_MAX\_WIDTH}} <= 107, \textcolor{stringliteral}{"{}More encodings are needed."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00482}00482 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00483}00483 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00484}00484 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00485}00485 \textcolor{comment}{    @brief Append 1 to 4 bytes of zeroes to a buffer, for padding.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00486}00486 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00487}00487 \textcolor{comment}{    @param[in,out] buf The buffer to which the operand value is appended.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00488}00488 \textcolor{comment}{    @param[in] count The number of bytes containing zeroes to append.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00489}00489 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00490}00490 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00491}\mbox{\hyperlink{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}{00491}} \mbox{\hyperlink{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}{cacheZeros}} (\mbox{\hyperlink{struct_buffer}{Buffer}} *buf, \textcolor{keywordtype}{size\_t} count)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00492}00492 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00493}00493     \mbox{\hyperlink{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}{ensureBuffer}} (buf, count);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00494}00494     memset (buf-\/>next, 0, count);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00495}00495     buf-\/>next += count;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00496}00496 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00497}00497 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00498}00498 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00499}00499 \textcolor{comment}{    @brief Append a string of bytes to a buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00500}00500 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00501}00501 \textcolor{comment}{    This function appends an array of 1 to 4 bytes to the end of }}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00502}00502 \textcolor{comment}{    a buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00503}00503 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00504}00504 \textcolor{comment}{    @param[in,out] buf The buffer to which the bytes are appended.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00505}00505 \textcolor{comment}{    @param[in] src The array of bytes to append to the buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00506}00506 \textcolor{comment}{    @param[in] count The number of bytes containing zeroes to append.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00507}00507 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00508}00508 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00509}\mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{00509}} \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (\mbox{\hyperlink{struct_buffer}{Buffer}} *restrict buf, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *restrict src, \textcolor{keywordtype}{size\_t} count)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00510}00510 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00511}00511     \mbox{\hyperlink{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}{ensureBuffer}} (buf, count);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00512}00512     memcpy (buf-\/>next, src, count);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00513}00513     buf-\/>next += count;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00514}00514 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00515}00515 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00516}00516 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00517}00517 \textcolor{comment}{    @brief Append bytes of a table to a byte buffer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00518}00518 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00519}00519 \textcolor{comment}{    @param[in,out] bufDest The buffer to which the new bytes are appended.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00520}00520 \textcolor{comment}{    @param[in] bufSrc The bytes to append to the buffer array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00521}00521 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00522}00522 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00523}\mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{00523}} \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}} (\mbox{\hyperlink{struct_buffer}{Buffer}} *restrict bufDest, \textcolor{keyword}{const} \mbox{\hyperlink{struct_buffer}{Buffer}} *restrict bufSrc)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00524}00524 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00525}00525     \textcolor{keywordtype}{size\_t} length = countBufferedBytes (bufSrc);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00526}00526     \mbox{\hyperlink{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}{ensureBuffer}} (bufDest, length);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00527}00527     memcpy (bufDest-\/>next, bufSrc-\/>begin, length);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00528}00528     bufDest-\/>next += length;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00529}00529 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00530}00530 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00531}00531 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00532}00532 \textcolor{comment}{    @brief Write an array of bytes to an output file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00533}00533 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00534}00534 \textcolor{comment}{    @param[in] bytes An array of unsigned bytes to write.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00535}00535 \textcolor{comment}{    @param[in] file The file pointer for writing, of type FILE *.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00536}00536 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00537}00537 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00538}\mbox{\hyperlink{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}{00538}} \mbox{\hyperlink{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}{writeBytes}} (\textcolor{keyword}{const} \textcolor{keywordtype}{byte} bytes[], \textcolor{keywordtype}{size\_t} count, FILE *file)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00539}00539 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00540}00540     \textcolor{keywordflow}{if} (fwrite (bytes, count, 1, file) != 1 \&\& count != 0)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00541}00541         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Failed to write \%zu bytes to output file."{}}, count);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00542}00542 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00543}00543 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00544}00544 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00545}00545 \textcolor{comment}{    @brief Write an unsigned 16-\/bit value to an output file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00546}00546 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00547}00547 \textcolor{comment}{    This function writes a 16-\/bit unsigned value in big-\/endian order}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00548}00548 \textcolor{comment}{    to an output file specified with a file pointer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00549}00549 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00550}00550 \textcolor{comment}{    @param[in] value The 16-\/bit value to write.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00551}00551 \textcolor{comment}{    @param[in] file The file pointer for writing, of type FILE *.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00552}00552 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00553}00553 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00554}\mbox{\hyperlink{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}{00554}} \mbox{\hyperlink{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}{writeU16}} (uint\_fast16\_t value, FILE *file)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00555}00555 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00556}00556     \textcolor{keywordtype}{byte} bytes[] =}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00557}00557     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00558}00558         (value >> 8) \& 0xff,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00559}00559         (value     ) \& 0xff,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00560}00560     \};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00561}00561     \mbox{\hyperlink{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}{writeBytes}} (bytes, \textcolor{keyword}{sizeof} bytes, file);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00562}00562 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00563}00563 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00564}00564 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00565}00565 \textcolor{comment}{    @brief Write an unsigned 32-\/bit value to an output file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00566}00566 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00567}00567 \textcolor{comment}{    This function writes a 32-\/bit unsigned value in big-\/endian order}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00568}00568 \textcolor{comment}{    to an output file specified with a file pointer.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00569}00569 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00570}00570 \textcolor{comment}{    @param[in] value The 32-\/bit value to write.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00571}00571 \textcolor{comment}{    @param[in] file The file pointer for writing, of type FILE *.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00572}00572 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00573}00573 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00574}\mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{00574}} \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}} (uint\_fast32\_t value, FILE *file)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00575}00575 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00576}00576     \textcolor{keywordtype}{byte} bytes[] =}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00577}00577     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00578}00578         (value >> 24) \& 0xff,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00579}00579         (value >> 16) \& 0xff,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00580}00580         (value >>  8) \& 0xff,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00581}00581         (value      ) \& 0xff,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00582}00582     \};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00583}00583     \mbox{\hyperlink{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}{writeBytes}} (bytes, \textcolor{keyword}{sizeof} bytes, file);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00584}00584 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00585}00585 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00586}00586 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00587}00587 \textcolor{comment}{    @brief Write an entire buffer array of bytes to an output file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00588}00588 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00589}00589 \textcolor{comment}{    This function determines the size of a buffer of bytes and}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00590}00590 \textcolor{comment}{    writes that number of bytes to an output file specified with}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00591}00591 \textcolor{comment}{    a file pointer.  The number of bytes is determined from the}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00592}00592 \textcolor{comment}{    length information stored as part of the Buffer * data structure.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00593}00593 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00594}00594 \textcolor{comment}{    @param[in] buf An array containing unsigned bytes to write.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00595}00595 \textcolor{comment}{    @param[in] file The file pointer for writing, of type FILE *.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00596}00596 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00597}00597 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00598}00598 writeBuffer (\textcolor{keyword}{const} \mbox{\hyperlink{struct_buffer}{Buffer}} *buf, FILE *file)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00599}00599 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00600}00600     \mbox{\hyperlink{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}{writeBytes}} (getBufferHead (buf), countBufferedBytes (buf), file);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00601}00601 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00602}00602 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00603}00603 \textcolor{comment}{/// Array of OpenType names indexed directly by Name IDs.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00604}\mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{00604}} \textcolor{comment}{}\textcolor{keyword}{typedef} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{NameStrings}}[\mbox{\hyperlink{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}{MAX\_NAME\_IDS}}];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00605}00605 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00606}00606 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00607}00607 \textcolor{comment}{   @brief Data structure to hold data for one bitmap glyph.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00608}00608 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00609}00609 \textcolor{comment}{   This data structure holds data to represent one Unifont bitmap}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00610}00610 \textcolor{comment}{   glyph: Unicode code point, number of bytes in its bitmap array,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00611}00611 \textcolor{comment}{   whether or not it is a combining character, and an offset from}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00612}00612 \textcolor{comment}{   the glyph origin to the start of the bitmap.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00613}00613 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00614}\mbox{\hyperlink{struct_glyph}{00614}} \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\mbox{\hyperlink{struct_glyph}{Glyph}}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00615}00615 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00616}\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{00616}}     uint\_least32\_t \mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}}; \textcolor{comment}{///< undefined for glyph 0}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00617}\mbox{\hyperlink{struct_glyph_abbbc1113c6e10dc0fa986abbb7f7665e}{00617}}     \textcolor{keywordtype}{byte} \mbox{\hyperlink{struct_glyph_abbbc1113c6e10dc0fa986abbb7f7665e}{bitmap}}[\mbox{\hyperlink{hex2otf_8c_ad0f95bf4a3a4a28b173b971e246b8745}{GLYPH\_MAX\_BYTE\_COUNT}}]; \textcolor{comment}{///< hexadecimal bitmap character array}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00618}\mbox{\hyperlink{struct_glyph_aa309ceb984d5524ef7dab0e8927fdd64}{00618}}     uint\_least8\_t \mbox{\hyperlink{struct_glyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}}; \textcolor{comment}{///< length of bitmap data}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00619}\mbox{\hyperlink{struct_glyph_ada6b8b4b9419096c413b5a29dbc54aac}{00619}}     \textcolor{keywordtype}{bool} \mbox{\hyperlink{struct_glyph_ada6b8b4b9419096c413b5a29dbc54aac}{combining}}; \textcolor{comment}{///< whether this is a combining glyph}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00620}\mbox{\hyperlink{struct_glyph_ac113da35f4193641855eaf51547f9b43}{00620}}     \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} \mbox{\hyperlink{struct_glyph_ac113da35f4193641855eaf51547f9b43}{pos}}; \textcolor{comment}{///< number of pixels the glyph should be moved to the right}\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00621}00621 \textcolor{comment}{                  ///< (negative number means moving to the left)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00622}\mbox{\hyperlink{struct_glyph_a7fb4dc03b71777de880164eee4ffbc51}{00622}} \textcolor{comment}{}    \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} \mbox{\hyperlink{struct_glyph_a7fb4dc03b71777de880164eee4ffbc51}{lsb}}; \textcolor{comment}{///< left side bearing (x position of leftmost contour point)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00623}\mbox{\hyperlink{hex2otf_8c_a8ac383e879c9d7d9af6005444970c837}{00623}} \} \mbox{\hyperlink{hex2otf_8c_a8ac383e879c9d7d9af6005444970c837}{Glyph}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00624}00624 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00625}00625 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00626}00626 \textcolor{comment}{   @brief Data structure to hold information for one font.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00627}00627 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00628}\mbox{\hyperlink{struct_font}{00628}} \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\mbox{\hyperlink{struct_font}{Font}}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00629}00629 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00630}00630     \mbox{\hyperlink{struct_buffer}{Buffer}} *tables;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00631}00631     \mbox{\hyperlink{struct_buffer}{Buffer}} *glyphs;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00632}00632     uint\_fast32\_t glyphCount;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00633}00633     \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} maxWidth;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00634}\mbox{\hyperlink{hex2otf_8c_a6793c760667fe6bf1481f61567954c12}{00634}} \} \mbox{\hyperlink{hex2otf_8c_a6793c760667fe6bf1481f61567954c12}{Font}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00635}00635 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00636}00636 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00637}00637 \textcolor{comment}{   @brief Data structure for an OpenType table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00638}00638 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00639}00639 \textcolor{comment}{   This data structure contains a table tag and a pointer to the}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00640}00640 \textcolor{comment}{   start of the buffer that holds data for this OpenType table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00641}00641 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00642}00642 \textcolor{comment}{   For information on the OpenType tables and their structure, see}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00643}00643 \textcolor{comment}{   https://docs.microsoft.com/en-\/us/typography/opentype/spec/otff\#font-\/tables.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00644}00644 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00645}\mbox{\hyperlink{struct_table}{00645}} \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\mbox{\hyperlink{struct_table}{Table}}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00646}00646 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00647}00647     uint\_fast32\_t tag;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00648}00648     \mbox{\hyperlink{struct_buffer}{Buffer}} *content;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00649}\mbox{\hyperlink{hex2otf_8c_aaa5713bb2ecdf81c430009179b806232}{00649}} \} \mbox{\hyperlink{hex2otf_8c_aaa5713bb2ecdf81c430009179b806232}{Table}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00650}00650 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00651}00651 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00652}00652 \textcolor{comment}{    @brief Index to Location ("{}loca"{}) offset information.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00653}00653 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00654}00654 \textcolor{comment}{    This enumerated type encodes the type of offset to locations}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00655}00655 \textcolor{comment}{    in a table.  It denotes Offset16 (16-\/bit) and Offset32 (32-\/bit)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00656}00656 \textcolor{comment}{    offset types.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00657}00657 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00658}\mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}{00658}} \textcolor{keyword}{enum} \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}{LocaFormat}} \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00659}\mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaa9c5871c30feb10df049d99bd703dfda4}{00659}}     \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaa9c5871c30feb10df049d99bd703dfda4}{LOCA\_OFFSET16}} = 0,    \textcolor{comment}{///< Offset to location is a 16-\/bit Offset16 value}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00660}00660     \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaad5e47b5a6bbf31be31e9b1328e7beef8}{LOCA\_OFFSET32}} = 1     \textcolor{comment}{///< Offset to location is a 32-\/bit Offset32 value}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00661}\mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaad5e47b5a6bbf31be31e9b1328e7beef8}{00661}} \};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00662}00662 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00663}00663 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00664}00664 \textcolor{comment}{    @brief Convert a 4-\/byte array to the machine's native 32-\/bit endian order.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00665}00665 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00666}00666 \textcolor{comment}{    This function takes an array of 4 bytes in big-\/endian order and}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00667}00667 \textcolor{comment}{    converts it to a 32-\/bit word in the endian order of the native machine.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00668}00668 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00669}00669 \textcolor{comment}{    @param[in] tag The array of 4 bytes in big-\/endian order.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00670}00670 \textcolor{comment}{    @return The 32-\/bit unsigned word in a machine's native endian order.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00671}00671 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00672}00672 \textcolor{keyword}{static} \textcolor{keyword}{inline} uint\_fast32\_t tagAsU32 (\textcolor{keyword}{const} \textcolor{keywordtype}{char} tag[\textcolor{keyword}{static} 4])}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00673}00673 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00674}00674     uint\_fast32\_t r = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00675}00675     r |= (tag[0] \& 0xff) << 24;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00676}00676     r |= (tag[1] \& 0xff) << 16;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00677}00677     r |= (tag[2] \& 0xff) << 8;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00678}00678     r |= (tag[3] \& 0xff);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00679}00679     \textcolor{keywordflow}{return} r;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00680}00680 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00681}00681 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00682}00682 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00683}00683 \textcolor{comment}{    @brief Add a TrueType or OpenType table to the font.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00684}00684 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00685}00685 \textcolor{comment}{    This function adds a TrueType or OpenType table to a font.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00686}00686 \textcolor{comment}{    The 4-\/byte table tag is passed as an unsigned 32-\/bit integer}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00687}00687 \textcolor{comment}{    in big-\/endian format.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00688}00688 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00689}00689 \textcolor{comment}{    @param[in,out] font The font to which a font table will be added.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00690}00690 \textcolor{comment}{    @param[in] tag The 4-\/byte table name.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00691}00691 \textcolor{comment}{    @param[in] content The table bytes to add, of type Buffer *.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00692}00692 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00693}00693 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00694}\mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{00694}} \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (\mbox{\hyperlink{struct_font}{Font}} *font, \textcolor{keyword}{const} \textcolor{keywordtype}{char} tag[\textcolor{keyword}{static} 4], \mbox{\hyperlink{struct_buffer}{Buffer}} *content)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00695}00695 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00696}00696     \mbox{\hyperlink{struct_table}{Table}} *table = getBufferSlot (font-\/>tables, sizeof (\mbox{\hyperlink{struct_table}{Table}}));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00697}00697     table-\/>tag = tagAsU32 (tag);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00698}00698     table-\/>content = content;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00699}00699 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00700}00700 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00701}00701 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00702}00702 \textcolor{comment}{    @brief  Sort tables according to OpenType recommendations.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00703}00703 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00704}00704 \textcolor{comment}{    The various tables in a font are sorted in an order recommended}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00705}00705 \textcolor{comment}{    for TrueType font files.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00706}00706 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00707}00707 \textcolor{comment}{    @param[in,out] font The font in which to sort tables.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00708}00708 \textcolor{comment}{    @param[in] isCFF True iff Compact Font Format (CFF) is being used.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00709}00709 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00710}00710 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00711}\mbox{\hyperlink{hex2otf_8c_a049e485562f7f4dfe978c4146ad225b8}{00711}} \mbox{\hyperlink{hex2otf_8c_a049e485562f7f4dfe978c4146ad225b8}{organizeTables}} (\mbox{\hyperlink{struct_font}{Font}} *font, \textcolor{keywordtype}{bool} isCFF)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00712}00712 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00713}00713     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\textcolor{keyword}{const} cffOrder[] = \{\textcolor{stringliteral}{"{}head"{}},\textcolor{stringliteral}{"{}hhea"{}},\textcolor{stringliteral}{"{}maxp"{}},\textcolor{stringliteral}{"{}OS/2"{}},\textcolor{stringliteral}{"{}name"{}},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00714}00714         \textcolor{stringliteral}{"{}cmap"{}},\textcolor{stringliteral}{"{}post"{}},\textcolor{stringliteral}{"{}CFF "{}},NULL\};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00715}00715     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\textcolor{keyword}{const} truetypeOrder[] = \{\textcolor{stringliteral}{"{}head"{}},\textcolor{stringliteral}{"{}hhea"{}},\textcolor{stringliteral}{"{}maxp"{}},\textcolor{stringliteral}{"{}OS/2"{}},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00716}00716         \textcolor{stringliteral}{"{}hmtx"{}},\textcolor{stringliteral}{"{}LTSH"{}},\textcolor{stringliteral}{"{}VDMX"{}},\textcolor{stringliteral}{"{}hdmx"{}},\textcolor{stringliteral}{"{}cmap"{}},\textcolor{stringliteral}{"{}fpgm"{}},\textcolor{stringliteral}{"{}prep"{}},\textcolor{stringliteral}{"{}cvt "{}},\textcolor{stringliteral}{"{}loca"{}},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00717}00717         \textcolor{stringliteral}{"{}glyf"{}},\textcolor{stringliteral}{"{}kern"{}},\textcolor{stringliteral}{"{}name"{}},\textcolor{stringliteral}{"{}post"{}},\textcolor{stringliteral}{"{}gasp"{}},\textcolor{stringliteral}{"{}PCLT"{}},\textcolor{stringliteral}{"{}DSIG"{}},NULL\};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00718}00718     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\textcolor{keyword}{const} *\textcolor{keyword}{const} order = isCFF ? cffOrder : truetypeOrder;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00719}00719     \mbox{\hyperlink{struct_table}{Table}} *unordered = getBufferHead (font-\/>tables);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00720}00720     \textcolor{keyword}{const} \mbox{\hyperlink{struct_table}{Table}} *\textcolor{keyword}{const} tablesEnd = getBufferTail (font-\/>tables);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00721}00721     \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \textcolor{keywordtype}{char} *\textcolor{keyword}{const} *p = order; *p; p++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00722}00722     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00723}00723         uint\_fast32\_t tag = tagAsU32 (*p);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00724}00724         \textcolor{keywordflow}{for} (\mbox{\hyperlink{struct_table}{Table}} *t = unordered; t < tablesEnd; t++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00725}00725         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00726}00726             \textcolor{keywordflow}{if} (t-\/>tag != tag)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00727}00727                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00728}00728             \textcolor{keywordflow}{if} (t != unordered)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00729}00729             \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00730}00730                 \mbox{\hyperlink{struct_table}{Table}} temp = *unordered;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00731}00731                 *unordered = *t;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00732}00732                 *t = temp;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00733}00733             \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00734}00734             unordered++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00735}00735             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00736}00736         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00737}00737     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00738}00738 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00739}00739 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00740}00740 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00741}00741 \textcolor{comment}{   @brief Data structure for data associated with one OpenType table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00742}00742 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00743}00743 \textcolor{comment}{   This data structure contains an OpenType table's tag, start within}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00744}00744 \textcolor{comment}{   an OpenType font file, length in bytes, and checksum at the end of}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00745}00745 \textcolor{comment}{   the table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00746}00746 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00747}\mbox{\hyperlink{struct_table_record}{00747}} \textcolor{keyword}{struct }\mbox{\hyperlink{struct_table_record}{TableRecord}}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00748}00748 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00749}00749     uint\_least32\_t tag, offset, length, checksum;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00750}00750 \};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00751}00751 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00752}00752 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00753}00753 \textcolor{comment}{    @brief Compare tables by 4-\/byte unsigned table tag value.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00754}00754 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00755}00755 \textcolor{comment}{    This function takes two pointers to a TableRecord data structure}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00756}00756 \textcolor{comment}{    and extracts the four-\/byte tag structure element for each.  The}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00757}00757 \textcolor{comment}{    two 32-\/bit numbers are then compared.  If the first tag is greater}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00758}00758 \textcolor{comment}{    than the first, then gt = 1 and lt = 0, and so 1 -\/ 0 = 1 is}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00759}00759 \textcolor{comment}{    returned.  If the first is less than the second, then gt = 0 and}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00760}00760 \textcolor{comment}{    lt = 1, and so 0 -\/ 1 = -\/1 is returned.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00761}00761 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00762}00762 \textcolor{comment}{    @param[in] a Pointer to the first TableRecord structure.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00763}00763 \textcolor{comment}{    @param[in] b Pointer to the second TableRecord structure.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00764}00764 \textcolor{comment}{    @return 1 if the tag in "{}a"{} is greater, -\/1 if less, 0 if equal.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00765}00765 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00766}00766 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00767}\mbox{\hyperlink{hex2otf_8c_af1223f39e8627e0a3b0b7b533e6d0b64}{00767}} \mbox{\hyperlink{hex2otf_8c_af1223f39e8627e0a3b0b7b533e6d0b64}{byTableTag}} (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *a, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *b)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00768}00768 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00769}00769     \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{struct_table_record}{TableRecord}} *\textcolor{keyword}{const} ra = a, *\textcolor{keyword}{const} rb = b;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00770}00770     \textcolor{keywordtype}{int} gt = ra-\/>tag > rb-\/>tag;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00771}00771     \textcolor{keywordtype}{int} lt = ra-\/>tag < rb-\/>tag;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00772}00772     \textcolor{keywordflow}{return} gt -\/ lt;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00773}00773 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00774}00774 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00775}00775 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00776}00776 \textcolor{comment}{   @brief Write OpenType font to output file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00777}00777 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00778}00778 \textcolor{comment}{   This function writes the constructed OpenType font to the}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00779}00779 \textcolor{comment}{   output file named "{}filename"{}.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00780}00780 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00781}00781 \textcolor{comment}{   @param[in] font Pointer to the font, of type Font *.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00782}00782 \textcolor{comment}{   @param[in] isCFF Boolean indicating whether the font has CFF data.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00783}00783 \textcolor{comment}{   @param[in] filename The name of the font file to create.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00784}00784 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00785}00785 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00786}\mbox{\hyperlink{hex2otf_8c_a074562f0527ff6db8b1b956b9356a315}{00786}} \mbox{\hyperlink{hex2otf_8c_a074562f0527ff6db8b1b956b9356a315}{writeFont}} (\mbox{\hyperlink{struct_font}{Font}} *font, \textcolor{keywordtype}{bool} isCFF, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *fileName)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00787}00787 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00788}00788     FILE *file = fopen (fileName, \textcolor{stringliteral}{"{}wb"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00789}00789     \textcolor{keywordflow}{if} (!file)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00790}00790         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Failed to open file '\%s'."{}}, fileName);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00791}00791     \textcolor{keyword}{const} \mbox{\hyperlink{struct_table}{Table}} *\textcolor{keyword}{const} tables = getBufferHead (font-\/>tables);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00792}00792     \textcolor{keyword}{const} \mbox{\hyperlink{struct_table}{Table}} *\textcolor{keyword}{const} tablesEnd = getBufferTail (font-\/>tables);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00793}00793     \textcolor{keywordtype}{size\_t} tableCount = tablesEnd -\/ tables;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00794}00794     assert (0 < tableCount \&\& tableCount <= \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00795}00795     \textcolor{keywordtype}{size\_t} offset = 12 + 16 * tableCount;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00796}00796     uint\_fast32\_t totalChecksum = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00797}00797     \mbox{\hyperlink{struct_buffer}{Buffer}} *tableRecords =}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00798}00798         \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (\textcolor{keyword}{sizeof} (\textcolor{keyword}{struct} \mbox{\hyperlink{struct_table_record}{TableRecord}}) * tableCount);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00799}00799     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{size\_t} i = 0; i < tableCount; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00800}00800     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00801}00801         \textcolor{keyword}{struct }\mbox{\hyperlink{struct_table_record}{TableRecord}} *record =}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00802}00802             getBufferSlot (tableRecords, \textcolor{keyword}{sizeof} *record);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00803}00803         record-\/>tag = tables[i].tag;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00804}00804         \textcolor{keywordtype}{size\_t} length = countBufferedBytes (tables[i].content);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00805}00805 \textcolor{preprocessor}{        \#if SIZE\_MAX > U32MAX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00806}00806             \textcolor{keywordflow}{if} (offset > \mbox{\hyperlink{hex2otf_8c_a7ccab01e56208030185cefdca13e0ac8}{U32MAX}})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00807}00807                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Table offset exceeded 4 GiB."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00808}00808             \textcolor{keywordflow}{if} (length > \mbox{\hyperlink{hex2otf_8c_a7ccab01e56208030185cefdca13e0ac8}{U32MAX}})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00809}00809                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Table size exceeded 4 GiB."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00810}00810 \textcolor{preprocessor}{        \#endif}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00811}00811         record-\/>length = length;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00812}00812         record-\/>checksum = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00813}00813         \textcolor{keyword}{const} \textcolor{keywordtype}{byte} *p = getBufferHead (tables[i].content);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00814}00814         \textcolor{keyword}{const} \textcolor{keywordtype}{byte} *\textcolor{keyword}{const} end = getBufferTail (tables[i].content);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00815}00815 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00816}00816 \textcolor{comment}{        /// Add a byte shifted by 24, 16, 8, or 0 bits.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00817}00817 \textcolor{comment}{}\textcolor{preprocessor}{        \#define addByte(shift) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00818}00818 \textcolor{preprocessor}{            if (p == end) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00819}00819 \textcolor{preprocessor}{                break; \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00820}00820 \textcolor{preprocessor}{            record-\/>checksum += (uint\_fast32\_t)*p++ << (shift);}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00821}00821 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00822}00822         \textcolor{keywordflow}{for} (;;)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00823}00823         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00824}00824             addByte (24)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00825}00825             addByte (16)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00826}00826             addByte (8)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00827}00827             addByte (0)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00828}00828         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00829}00829 \textcolor{preprocessor}{        \#undef addByte}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00830}00830         \mbox{\hyperlink{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}{cacheZeros}} (tables[i].content, (\string~length + 1U) \& 3U);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00831}00831         record-\/>offset = offset;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00832}00832         offset += countBufferedBytes (tables[i].content);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00833}00833         totalChecksum += record-\/>checksum;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00834}00834     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00835}00835     \textcolor{keyword}{struct }\mbox{\hyperlink{struct_table_record}{TableRecord}} *records = getBufferHead (tableRecords);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00836}00836     qsort (records, tableCount, \textcolor{keyword}{sizeof} *records, \mbox{\hyperlink{hex2otf_8c_af1223f39e8627e0a3b0b7b533e6d0b64}{byTableTag}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00837}00837     \textcolor{comment}{// Offset Table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00838}00838     uint\_fast32\_t sfntVersion = isCFF ? 0x4f54544f : 0x00010000;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00839}00839     \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}} (sfntVersion, file); \textcolor{comment}{// sfntVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00840}00840     totalChecksum += sfntVersion;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00841}00841     uint\_fast16\_t entrySelector = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00842}00842     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{size\_t} k = tableCount; k != 1; k >>= 1)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00843}00843         entrySelector++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00844}00844     uint\_fast16\_t searchRange = 1 << (entrySelector + 4);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00845}00845     uint\_fast16\_t rangeShift = (tableCount -\/ (1 << entrySelector)) << 4;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00846}00846     \mbox{\hyperlink{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}{writeU16}} (tableCount, file); \textcolor{comment}{// numTables}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00847}00847     \mbox{\hyperlink{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}{writeU16}} (searchRange, file); \textcolor{comment}{// searchRange}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00848}00848     \mbox{\hyperlink{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}{writeU16}} (entrySelector, file); \textcolor{comment}{// entrySelector}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00849}00849     \mbox{\hyperlink{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}{writeU16}} (rangeShift, file); \textcolor{comment}{// rangeShift}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00850}00850     totalChecksum += (uint\_fast32\_t)tableCount << 16;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00851}00851     totalChecksum += searchRange;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00852}00852     totalChecksum += (uint\_fast32\_t)entrySelector << 16;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00853}00853     totalChecksum += rangeShift;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00854}00854     \textcolor{comment}{// Table Records (always sorted by table tags)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00855}00855     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{size\_t} i = 0; i < tableCount; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00856}00856     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00857}00857         \textcolor{comment}{// Table Record}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00858}00858         \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}} (records[i].tag, file); \textcolor{comment}{// tableTag}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00859}00859         \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}} (records[i].checksum, file); \textcolor{comment}{// checkSum}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00860}00860         \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}} (records[i].offset, file); \textcolor{comment}{// offset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00861}00861         \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}} (records[i].length, file); \textcolor{comment}{// length}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00862}00862         totalChecksum += records[i].tag;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00863}00863         totalChecksum += records[i].checksum;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00864}00864         totalChecksum += records[i].offset;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00865}00865         totalChecksum += records[i].length;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00866}00866     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00867}00867     \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (tableRecords);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00868}00868     \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{struct_table}{Table}} *table = tables; table < tablesEnd; table++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00869}00869     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00870}00870         \textcolor{keywordflow}{if} (table-\/>tag == 0x68656164) \textcolor{comment}{// 'head' table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00871}00871         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00872}00872             \textcolor{keywordtype}{byte} *begin = getBufferHead (table-\/>content);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00873}00873             \textcolor{keywordtype}{byte} *end = getBufferTail (table-\/>content);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00874}00874             \mbox{\hyperlink{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}{writeBytes}} (begin, 8, file);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00875}00875             \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}} (0xb1b0afbaU -\/ totalChecksum, file); \textcolor{comment}{// checksumAdjustment}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00876}00876             \mbox{\hyperlink{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}{writeBytes}} (begin + 12, end -\/ (begin + 12), file);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00877}00877             \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00878}00878         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00879}00879         writeBuffer (table-\/>content, file);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00880}00880     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00881}00881     fclose (file);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00882}00882 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00883}00883 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00884}00884 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00885}00885 \textcolor{comment}{    @brief Convert a hexadecimal digit character to a 4-\/bit number.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00886}00886 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00887}00887 \textcolor{comment}{    This function takes a character that contains one hexadecimal digit}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00888}00888 \textcolor{comment}{    and returns the 4-\/bit value (as an unsigned 8-\/bit value) corresponding}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00889}00889 \textcolor{comment}{    to the hexadecimal digit.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00890}00890 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00891}00891 \textcolor{comment}{    @param[in] nibble The character containing one hexadecimal digit.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00892}00892 \textcolor{comment}{    @return The hexadecimal digit value, 0 through 15, inclusive.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00893}00893 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00894}00894 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{byte}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00895}00895 nibbleValue (\textcolor{keywordtype}{char} nibble)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00896}00896 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00897}00897     \textcolor{keywordflow}{if} (isdigit (nibble))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00898}00898         \textcolor{keywordflow}{return} nibble -\/ \textcolor{charliteral}{'0'};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00899}00899     nibble = toupper (nibble);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00900}00900     \textcolor{keywordflow}{return} nibble -\/ \textcolor{charliteral}{'A'} + 10;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00901}00901 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00902}00902 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00903}00903 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00904}00904 \textcolor{comment}{    @brief Read up to 6 hexadecimal digits and a colon from file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00905}00905 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00906}00906 \textcolor{comment}{    This function reads up to 6 hexadecimal digits followed by}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00907}00907 \textcolor{comment}{    a colon from a file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00908}00908 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00909}00909 \textcolor{comment}{    If the end of the file is reached, the function returns true.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00910}00910 \textcolor{comment}{    The file name is provided to include in an error message if}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00911}00911 \textcolor{comment}{    the end of file was reached unexpectedly.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00912}00912 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00913}00913 \textcolor{comment}{    @param[out] codePoint The Unicode code point.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00914}00914 \textcolor{comment}{    @param[in] fileName The name of the input file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00915}00915 \textcolor{comment}{    @param[in] file Pointer to the input file stream.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00916}00916 \textcolor{comment}{    @return true if at end of file, false otherwise.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00917}00917 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00918}00918 \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00919}\mbox{\hyperlink{hex2otf_8c_ae28f2f636e4d3dd3b5784a3bc3f92b58}{00919}} \mbox{\hyperlink{hex2otf_8c_ae28f2f636e4d3dd3b5784a3bc3f92b58}{readCodePoint}} (uint\_fast32\_t *codePoint, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *fileName, FILE *file)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00920}00920 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00921}00921     *codePoint = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00922}00922     uint\_fast8\_t digitCount = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00923}00923     \textcolor{keywordflow}{for} (;;)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00924}00924     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00925}00925         \textcolor{keywordtype}{int} c = getc (file);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00926}00926         \textcolor{keywordflow}{if} (isxdigit (c) \&\& ++digitCount <= 6)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00927}00927         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00928}00928             *codePoint = (*codePoint << 4) | nibbleValue (c);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00929}00929             \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00930}00930         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00931}00931         \textcolor{keywordflow}{if} (c == \textcolor{charliteral}{':'} \&\& digitCount > 0)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00932}00932             \textcolor{keywordflow}{return} \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00933}00933         \textcolor{keywordflow}{if} (c == EOF)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00934}00934         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00935}00935             \textcolor{keywordflow}{if} (digitCount == 0)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00936}00936                 \textcolor{keywordflow}{return} \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00937}00937             \textcolor{keywordflow}{if} (feof (file))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00938}00938                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}\%s: Unexpected end of file."{}}, fileName);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00939}00939             \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00940}00940                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}\%s: Read error."{}}, fileName);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00941}00941         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00942}00942         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}\%s: Unexpected character: \%\#.2x."{}}, fileName, (\textcolor{keywordtype}{unsigned})c);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00943}00943     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00944}00944 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00945}00945 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00946}00946 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00947}00947 \textcolor{comment}{    @brief Read glyph definitions from a Unifont .hex format file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00948}00948 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00949}00949 \textcolor{comment}{    This function reads in the glyph bitmaps contained in a Unifont}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00950}00950 \textcolor{comment}{    .hex format file.  These input files contain one glyph bitmap}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00951}00951 \textcolor{comment}{    per line.  Each line is of the form}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00952}00952 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00953}00953 \textcolor{comment}{        <hexadecimal code point> ':' <hexadecimal bitmap sequence>}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00954}00954 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00955}00955 \textcolor{comment}{    The code point field typically consists of 4 hexadecimal digits}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00956}00956 \textcolor{comment}{    for a code point in Unicode Plane 0, and 6 hexadecimal digits for}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00957}00957 \textcolor{comment}{    code points above Plane 0.  The hexadecimal bitmap sequence is}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00958}00958 \textcolor{comment}{    32 hexadecimal digits long for a glyph that is 8 pixels wide by}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00959}00959 \textcolor{comment}{    16 pixels high, and 64 hexadecimal digits long for a glyph that}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00960}00960 \textcolor{comment}{    is 16 pixels wide by 16 pixels high.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00961}00961 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00962}00962 \textcolor{comment}{    @param[in,out] font The font data structure to update with new glyphs.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00963}00963 \textcolor{comment}{    @param[in] fileName The name of the Unifont .hex format input file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00964}00964 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00965}00965 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00966}\mbox{\hyperlink{hex2otf_8c_ad77c441582f862d494a734eb9855dd41}{00966}} \mbox{\hyperlink{hex2otf_8c_ad77c441582f862d494a734eb9855dd41}{readGlyphs}} (\mbox{\hyperlink{struct_font}{Font}} *font, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *fileName)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00967}00967 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00968}00968     FILE *file = fopen (fileName, \textcolor{stringliteral}{"{}r"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00969}00969     \textcolor{keywordflow}{if} (!file)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00970}00970         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Failed to open file '\%s'."{}}, fileName);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00971}00971     uint\_fast32\_t glyphCount = 1; \textcolor{comment}{// for glyph 0}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00972}00972     uint\_fast8\_t maxByteCount = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00973}00973     \{ \textcolor{comment}{// Hard code the .notdef glyph.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00974}00974         \textcolor{keyword}{const} \textcolor{keywordtype}{byte} bitmap[] = \textcolor{stringliteral}{"{}\(\backslash\)0\(\backslash\)0\(\backslash\)0\string~fZZzvv\string~vv\string~\(\backslash\)0\(\backslash\)0"{}}; \textcolor{comment}{// same as U+FFFD}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00975}00975         \textcolor{keyword}{const} \textcolor{keywordtype}{size\_t} byteCount = \textcolor{keyword}{sizeof} bitmap -\/ 1;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00976}00976         assert (byteCount <= \mbox{\hyperlink{hex2otf_8c_ad0f95bf4a3a4a28b173b971e246b8745}{GLYPH\_MAX\_BYTE\_COUNT}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00977}00977         assert (byteCount \% \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}} == 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00978}00978         \mbox{\hyperlink{struct_glyph}{Glyph}} *notdef = getBufferSlot (font-\/>glyphs, sizeof (\mbox{\hyperlink{struct_glyph}{Glyph}}));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00979}00979         memcpy (notdef-\/>\mbox{\hyperlink{struct_glyph_abbbc1113c6e10dc0fa986abbb7f7665e}{bitmap}}, bitmap, byteCount);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00980}00980         notdef-\/>\mbox{\hyperlink{struct_glyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}} = maxByteCount = byteCount;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00981}00981         notdef-\/>\mbox{\hyperlink{struct_glyph_ada6b8b4b9419096c413b5a29dbc54aac}{combining}} = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00982}00982         notdef-\/>\mbox{\hyperlink{struct_glyph_ac113da35f4193641855eaf51547f9b43}{pos}} = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00983}00983         notdef-\/>\mbox{\hyperlink{struct_glyph_a7fb4dc03b71777de880164eee4ffbc51}{lsb}} = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00984}00984     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00985}00985     \textcolor{keywordflow}{for} (;;)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00986}00986     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00987}00987         uint\_fast32\_t codePoint;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00988}00988         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hex2otf_8c_ae28f2f636e4d3dd3b5784a3bc3f92b58}{readCodePoint}} (\&codePoint, fileName, file))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00989}00989             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00990}00990         \textcolor{keywordflow}{if} (++glyphCount > \mbox{\hyperlink{hex2otf_8c_a1a1d1da8a5f6da54d749399b173c9bfc}{MAX\_GLYPHS}})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00991}00991             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}OpenType does not support more than \%lu glyphs."{}},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00992}00992                 \mbox{\hyperlink{hex2otf_8c_a1a1d1da8a5f6da54d749399b173c9bfc}{MAX\_GLYPHS}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00993}00993         \mbox{\hyperlink{struct_glyph}{Glyph}} *glyph = getBufferSlot (font-\/>glyphs, sizeof (\mbox{\hyperlink{struct_glyph}{Glyph}}));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00994}00994         glyph-\/>\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}} = codePoint;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00995}00995         glyph-\/>\mbox{\hyperlink{struct_glyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}} = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00996}00996         glyph-\/>\mbox{\hyperlink{struct_glyph_ada6b8b4b9419096c413b5a29dbc54aac}{combining}} = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00997}00997         glyph-\/>\mbox{\hyperlink{struct_glyph_ac113da35f4193641855eaf51547f9b43}{pos}} = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00998}00998         glyph-\/>\mbox{\hyperlink{struct_glyph_a7fb4dc03b71777de880164eee4ffbc51}{lsb}} = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l00999}00999         \textcolor{keywordflow}{for} (\textcolor{keywordtype}{byte} *p = glyph-\/>\mbox{\hyperlink{struct_glyph_abbbc1113c6e10dc0fa986abbb7f7665e}{bitmap}};; p++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01000}01000         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01001}01001             \textcolor{keywordtype}{int} h, l;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01002}01002             \textcolor{keywordflow}{if} (isxdigit (h = getc (file)) \&\& isxdigit (l = getc (file)))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01003}01003             \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01004}01004                 \textcolor{keywordflow}{if} (++glyph-\/>\mbox{\hyperlink{struct_glyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}} > \mbox{\hyperlink{hex2otf_8c_ad0f95bf4a3a4a28b173b971e246b8745}{GLYPH\_MAX\_BYTE\_COUNT}})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01005}01005                     \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Hex stream of "{}}\mbox{\hyperlink{hex2otf_8c_af25acbe53b9070c1400a04c9231691bb}{PRI\_CP}}\textcolor{stringliteral}{"{} is too long."{}}, codePoint);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01006}01006                 *p = nibbleValue (h) << 4 | nibbleValue (l);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01007}01007             \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01008}01008             \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (h == \textcolor{charliteral}{'\(\backslash\)n'} || (h == EOF \&\& feof (file)))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01009}01009                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01010}01010             \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ferror (file))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01011}01011                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}\%s: Read error."{}}, fileName);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01012}01012             \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01013}01013                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Hex stream of "{}}\mbox{\hyperlink{hex2otf_8c_af25acbe53b9070c1400a04c9231691bb}{PRI\_CP}}\textcolor{stringliteral}{"{} is invalid."{}}, codePoint);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01014}01014         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01015}01015         \textcolor{keywordflow}{if} (glyph-\/>\mbox{\hyperlink{struct_glyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}} \% \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}} != 0)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01016}01016             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Hex length of "{}}\mbox{\hyperlink{hex2otf_8c_af25acbe53b9070c1400a04c9231691bb}{PRI\_CP}}\textcolor{stringliteral}{"{} is indivisible by glyph height \%d."{}},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01017}01017                 codePoint, \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01018}01018         \textcolor{keywordflow}{if} (glyph-\/>\mbox{\hyperlink{struct_glyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}} > maxByteCount)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01019}01019             maxByteCount = glyph-\/>\mbox{\hyperlink{struct_glyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01020}01020     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01021}01021     \textcolor{keywordflow}{if} (glyphCount == 1)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01022}01022         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}No glyph is specified."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01023}01023     font-\/>glyphCount = glyphCount;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01024}01024     font-\/>maxWidth = \mbox{\hyperlink{hex2otf_8c_a79e768c38f3b21419f01d2d1347523be}{PW}} (maxByteCount);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01025}01025     fclose (file);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01026}01026 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01027}01027 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01028}01028 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01029}01029 \textcolor{comment}{    @brief Compare two Unicode code points to determine which is greater.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01030}01030 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01031}01031 \textcolor{comment}{    This function compares the Unicode code points contained within}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01032}01032 \textcolor{comment}{    two Glyph data structures.  The function returns 1 if the first}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01033}01033 \textcolor{comment}{    code point is greater, and -\/1 if the second is greater.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01034}01034 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01035}01035 \textcolor{comment}{    @param[in] a A Glyph data structure containing the first code point.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01036}01036 \textcolor{comment}{    @param[in] b A Glyph data structure containing the second code point.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01037}01037 \textcolor{comment}{    @return 1 if the code point a is greater, -\/1 if less, 0 if equal.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01038}01038 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01039}01039 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01040}\mbox{\hyperlink{hex2otf_8c_a0d187cc87528ef35478afd7a68309f08}{01040}} \mbox{\hyperlink{hex2otf_8c_a0d187cc87528ef35478afd7a68309f08}{byCodePoint}} (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *a, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *b)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01041}01041 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01042}01042     \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *\textcolor{keyword}{const} ga = a, *\textcolor{keyword}{const} gb = b;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01043}01043     \textcolor{keywordtype}{int} gt = ga-\/>\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}} > gb-\/>codePoint;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01044}01044     \textcolor{keywordtype}{int} lt = ga-\/>\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}} < gb-\/>codePoint;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01045}01045     \textcolor{keywordflow}{return} gt -\/ lt;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01046}01046 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01047}01047 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01048}01048 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01049}01049 \textcolor{comment}{    @brief Position a glyph within a 16-\/by-\/16 pixel bounding box.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01050}01050 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01051}01051 \textcolor{comment}{    Position a glyph within the 16-\/by-\/16 pixel drawing area and}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01052}01052 \textcolor{comment}{    note whether or not the glyph is a combining character.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01053}01053 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01054}01054 \textcolor{comment}{    N.B.: Glyphs must be sorted by code point before calling this function.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01055}01055 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01056}01056 \textcolor{comment}{    @param[in,out] font Font data structure pointer to store glyphs.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01057}01057 \textcolor{comment}{    @param[in] fileName Name of glyph file to read.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01058}01058 \textcolor{comment}{    @param[in] xMin Minimum x-\/axis value (for left side bearing).}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01059}01059 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01060}01060 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01061}\mbox{\hyperlink{hex2otf_8c_af3ba1ba33ebe63ba0340842b7f83021c}{01061}} \mbox{\hyperlink{hex2otf_8c_af3ba1ba33ebe63ba0340842b7f83021c}{positionGlyphs}} (\mbox{\hyperlink{struct_font}{Font}} *font, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *fileName, \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} *xMin)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01062}01062 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01063}01063     *xMin = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01064}01064     FILE *file = fopen (fileName, \textcolor{stringliteral}{"{}r"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01065}01065     \textcolor{keywordflow}{if} (!file)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01066}01066         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Failed to open file '\%s'."{}}, fileName);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01067}01067     \mbox{\hyperlink{struct_glyph}{Glyph}} *glyphs = getBufferHead (font-\/>glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01068}01068     \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *\textcolor{keyword}{const} endGlyph = glyphs + font-\/>glyphCount;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01069}01069     \mbox{\hyperlink{struct_glyph}{Glyph}} *nextGlyph = \&glyphs[1]; \textcolor{comment}{// predict and avoid search}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01070}01070     \textcolor{keywordflow}{for} (;;)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01071}01071     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01072}01072         uint\_fast32\_t codePoint;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01073}01073         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hex2otf_8c_ae28f2f636e4d3dd3b5784a3bc3f92b58}{readCodePoint}} (\&codePoint, fileName, file))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01074}01074             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01075}01075         \mbox{\hyperlink{struct_glyph}{Glyph}} *glyph = nextGlyph;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01076}01076         \textcolor{keywordflow}{if} (glyph == endGlyph || glyph-\/>\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}} != codePoint)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01077}01077         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01078}01078             \textcolor{comment}{// Prediction failed. Search.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01079}01079             \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} key = \{ .\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}} = codePoint \};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01080}01080             glyph = bsearch (\&key, glyphs + 1, font-\/>glyphCount -\/ 1,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01081}01081                 \textcolor{keyword}{sizeof} key, \mbox{\hyperlink{hex2otf_8c_a0d187cc87528ef35478afd7a68309f08}{byCodePoint}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01082}01082             \textcolor{keywordflow}{if} (!glyph)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01083}01083                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Glyph "{}}\mbox{\hyperlink{hex2otf_8c_af25acbe53b9070c1400a04c9231691bb}{PRI\_CP}}\textcolor{stringliteral}{"{} is positioned but not defined."{}},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01084}01084                     codePoint);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01085}01085         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01086}01086         nextGlyph = glyph + 1;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01087}01087         \textcolor{keywordtype}{char} s[8];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01088}01088         \textcolor{keywordflow}{if} (!fgets (s, \textcolor{keyword}{sizeof} s, file))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01089}01089             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}\%s: Read error."{}}, fileName);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01090}01090         \textcolor{keywordtype}{char} *end;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01091}01091         \textcolor{keyword}{const} \textcolor{keywordtype}{long} value = strtol (s, \&end, 10);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01092}01092         \textcolor{keywordflow}{if} (*end != \textcolor{charliteral}{'\(\backslash\)n'} \&\& *end != \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01093}01093             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Position of glyph "{}}\mbox{\hyperlink{hex2otf_8c_af25acbe53b9070c1400a04c9231691bb}{PRI\_CP}}\textcolor{stringliteral}{"{} is invalid."{}}, codePoint);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01094}01094         \textcolor{comment}{// Currently no glyph is moved to the right,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01095}01095         \textcolor{comment}{// so positive position is considered out of range.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01096}01096         \textcolor{comment}{// If this limit is to be lifted,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01097}01097         \textcolor{comment}{// 'xMax' of bounding box in 'head' table shall also be updated.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01098}01098         \textcolor{keywordflow}{if} (value < -\/GLYPH\_MAX\_WIDTH || value > 0)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01099}01099             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Position of glyph "{}}\mbox{\hyperlink{hex2otf_8c_af25acbe53b9070c1400a04c9231691bb}{PRI\_CP}}\textcolor{stringliteral}{"{} is out of range."{}}, codePoint);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01100}01100         glyph-\/>\mbox{\hyperlink{struct_glyph_ada6b8b4b9419096c413b5a29dbc54aac}{combining}} = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01101}01101         glyph-\/>\mbox{\hyperlink{struct_glyph_ac113da35f4193641855eaf51547f9b43}{pos}} = value;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01102}01102         glyph-\/>\mbox{\hyperlink{struct_glyph_a7fb4dc03b71777de880164eee4ffbc51}{lsb}} = value; \textcolor{comment}{// updated during outline generation}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01103}01103         \textcolor{keywordflow}{if} (value < *xMin)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01104}01104             *xMin = value;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01105}01105     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01106}01106     fclose (file);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01107}01107 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01108}01108 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01109}01109 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01110}01110 \textcolor{comment}{    @brief Sort the glyphs in a font by Unicode code point.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01111}01111 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01112}01112 \textcolor{comment}{    This function reads in an array of glyphs and sorts them}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01113}01113 \textcolor{comment}{    by Unicode code point.  If a duplicate code point is encountered,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01114}01114 \textcolor{comment}{    that will result in a fatal error with an error message to stderr.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01115}01115 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01116}01116 \textcolor{comment}{    @param[in,out] font Pointer to a Font structure with glyphs to sort.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01117}01117 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01118}01118 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01119}\mbox{\hyperlink{hex2otf_8c_a77ff68152c5cb38605010bc7621b0722}{01119}} \mbox{\hyperlink{hex2otf_8c_a77ff68152c5cb38605010bc7621b0722}{sortGlyphs}} (\mbox{\hyperlink{struct_font}{Font}} *font)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01120}01120 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01121}01121     \mbox{\hyperlink{struct_glyph}{Glyph}} *glyphs = getBufferHead (font-\/>glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01122}01122     \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *\textcolor{keyword}{const} glyphsEnd = getBufferTail (font-\/>glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01123}01123     glyphs++; \textcolor{comment}{// glyph 0 does not need sorting}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01124}01124     qsort (glyphs, glyphsEnd -\/ glyphs, \textcolor{keyword}{sizeof} *glyphs, \mbox{\hyperlink{hex2otf_8c_a0d187cc87528ef35478afd7a68309f08}{byCodePoint}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01125}01125     \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *glyph = glyphs; glyph < glyphsEnd -\/ 1; glyph++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01126}01126     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01127}01127         \textcolor{keywordflow}{if} (glyph[0].codePoint == glyph[1].codePoint)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01128}01128             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Duplicate code point: "{}}\mbox{\hyperlink{hex2otf_8c_af25acbe53b9070c1400a04c9231691bb}{PRI\_CP}}\textcolor{stringliteral}{"{}."{}}, glyph[0].codePoint);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01129}01129         assert (glyph[0].codePoint < glyph[1].codePoint);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01130}01130     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01131}01131 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01132}01132 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01133}01133 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01134}01134 \textcolor{comment}{    @brief Specify the current contour drawing operation.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01135}01135 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01136}\mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38}{01136}} \textcolor{keyword}{enum} \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38}{ContourOp}} \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01137}\mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}{01137}}     \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}{OP\_CLOSE}},    \textcolor{comment}{///< Close the current contour path that was being drawn.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01138}01138     \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a01f5371958d06ab1411c46f72f049f45}{OP\_POINT}}     \textcolor{comment}{///< Add one more (x,y) point to the contor being drawn.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01139}\mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a01f5371958d06ab1411c46f72f049f45}{01139}} \};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01140}01140 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01141}01141 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01142}01142 \textcolor{comment}{    @brief Fill to the left side (CFF) or right side (TrueType) of a contour.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01143}01143 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01144}\mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8c}{01144}} \textcolor{keyword}{enum} \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8c}{FillSide}} \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01145}\mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8caf18243d8ef6a7f601ae03a6cffbabadd}{01145}}     \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8caf18243d8ef6a7f601ae03a6cffbabadd}{FILL\_LEFT}},    \textcolor{comment}{///< Draw outline counter-\/clockwise (CFF, PostScript).}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01146}01146     \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8ca0bbdc63e5d0938274b80230bc55d03b8}{FILL\_RIGHT}}    \textcolor{comment}{///< Draw outline clockwise (TrueType).}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01147}\mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8ca0bbdc63e5d0938274b80230bc55d03b8}{01147}} \};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01148}01148 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01149}01149 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01150}01150 \textcolor{comment}{    @brief Build a glyph outline.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01151}01151 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01152}01152 \textcolor{comment}{    This function builds a glyph outline from a Unifont glyph bitmap.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01153}01153 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01154}01154 \textcolor{comment}{    @param[out] result The resulting glyph outline.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01155}01155 \textcolor{comment}{    @param[in] bitmap A bitmap array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01156}01156 \textcolor{comment}{    @param[in] byteCount the number of bytes in the input bitmap array.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01157}01157 \textcolor{comment}{    @param[in] fillSide Enumerated indicator to fill left or right side.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01158}01158 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01159}01159 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01160}\mbox{\hyperlink{hex2otf_8c_a5af7c9bcfd40e5b11f9d12c40966bb65}{01160}} \mbox{\hyperlink{hex2otf_8c_a5af7c9bcfd40e5b11f9d12c40966bb65}{buildOutline}} (\mbox{\hyperlink{struct_buffer}{Buffer}} *result, \textcolor{keyword}{const} \textcolor{keywordtype}{byte} bitmap[], \textcolor{keyword}{const} \textcolor{keywordtype}{size\_t} byteCount,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01161}01161     \textcolor{keyword}{const} \textcolor{keyword}{enum} \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8c}{FillSide}} fillSide)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01162}01162 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01163}01163     \textcolor{keyword}{enum} Direction \{RIGHT, LEFT, DOWN, UP\}; \textcolor{comment}{// order is significant}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01164}01164 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01165}01165     \textcolor{comment}{// respective coordinate deltas}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01166}01166     \textcolor{keyword}{const} \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} dx[] = \{1, -\/1, 0, 0\}, dy[] = \{0, 0, -\/1, 1\};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01167}01167 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01168}01168     assert (byteCount \% \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}} == 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01169}01169     \textcolor{keyword}{const} uint\_fast8\_t bytesPerRow = byteCount / \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01170}01170     \textcolor{keyword}{const} \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} glyphWidth = bytesPerRow * 8;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01171}01171     assert (glyphWidth <= \mbox{\hyperlink{hex2otf_8c_a688a4772d61221e9378e5003da51265a}{GLYPH\_MAX\_WIDTH}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01172}01172 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01173}01173 \textcolor{preprocessor}{    \#if GLYPH\_MAX\_WIDTH < 32}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01174}01174         \textcolor{keyword}{typedef} uint\_fast32\_t row\_t;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01175}01175 \textcolor{preprocessor}{    \#elif GLYPH\_MAX\_WIDTH < 64}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01176}01176         \textcolor{keyword}{typedef} uint\_fast64\_t row\_t;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01177}01177 \textcolor{preprocessor}{    \#else}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01178}01178 \textcolor{preprocessor}{        \#error GLYPH\_MAX\_WIDTH is too large.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01179}01179 \textcolor{preprocessor}{    \#endif}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01180}01180 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01181}01181     row\_t pixels[\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}} + 2] = \{0\};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01182}01182     \textcolor{keywordflow}{for} (\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} row = \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}}; row > 0; row-\/-\/)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01183}01183         \textcolor{keywordflow}{for} (\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} b = 0; b < bytesPerRow; b++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01184}01184             pixels[row] = pixels[row] << 8 | *bitmap++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01185}01185     \textcolor{keyword}{typedef} row\_t graph\_t[\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}} + 1];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01186}01186     graph\_t vectors[4];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01187}01187     \textcolor{keyword}{const} row\_t *lower = pixels, *upper = pixels + 1;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01188}01188     \textcolor{keywordflow}{for} (\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} row = 0; row <= \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}}; row++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01189}01189     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01190}01190         \textcolor{keyword}{const} row\_t m = (fillSide == \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8ca0bbdc63e5d0938274b80230bc55d03b8}{FILL\_RIGHT}}) -\/ 1;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01191}01191         vectors[RIGHT][row] = (m \string^ (*lower << 1)) \& (\string~m \string^ (*upper << 1));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01192}01192         vectors[LEFT ][row] = (m \string^ (*upper     )) \& (\string~m \string^ (*lower     ));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01193}01193         vectors[DOWN ][row] = (m \string^ (*lower     )) \& (\string~m \string^ (*lower << 1));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01194}01194         vectors[UP   ][row] = (m \string^ (*upper << 1)) \& (\string~m \string^ (*upper     ));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01195}01195         lower++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01196}01196         upper++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01197}01197     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01198}01198     graph\_t selection = \{0\};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01199}01199     \textcolor{keyword}{const} row\_t x0 = (row\_t)1 << glyphWidth;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01200}01200 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01201}01201 \textcolor{comment}{    /// Get the value of a given bit that is in a given row.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01202}01202 \textcolor{comment}{}\textcolor{preprocessor}{    \#define getRowBit(rows, x, y)  ((rows)[(y)] \&  x0 >> (x))}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01203}01203 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01204}01204 \textcolor{comment}{    /// Invert the value of a given bit that is in a given row.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01205}01205 \textcolor{comment}{}\textcolor{preprocessor}{    \#define flipRowBit(rows, x, y) ((rows)[(y)] \string^= x0 >> (x))}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01206}01206 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01207}01207     \textcolor{keywordflow}{for} (\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} y = \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}}; y >= 0; y-\/-\/)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01208}01208     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01209}01209         \textcolor{keywordflow}{for} (\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} x = 0; x <= glyphWidth; x++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01210}01210         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01211}01211             assert (!getRowBit (vectors[LEFT], x, y));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01212}01212             assert (!getRowBit (vectors[UP], x, y));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01213}01213             \textcolor{keyword}{enum} Direction initial;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01214}01214 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01215}01215             \textcolor{keywordflow}{if} (getRowBit (vectors[RIGHT], x, y))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01216}01216                 initial = RIGHT;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01217}01217             \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (getRowBit (vectors[DOWN], x, y))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01218}01218                 initial = DOWN;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01219}01219             \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01220}01220                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01221}01221 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01222}01222             \textcolor{keyword}{static\_assert} ((\mbox{\hyperlink{hex2otf_8c_a688a4772d61221e9378e5003da51265a}{GLYPH\_MAX\_WIDTH}} + 1) * (\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}} + 1) * 2 <=}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01223}01223                 \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}}, \textcolor{stringliteral}{"{}potential overflow"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01224}01224 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01225}01225             uint\_fast16\_t lastPointCount = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01226}01226             \textcolor{keywordflow}{for} (\textcolor{keywordtype}{bool} converged = \textcolor{keyword}{false};;)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01227}01227             \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01228}01228                 uint\_fast16\_t pointCount = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01229}01229                 \textcolor{keyword}{enum} Direction heading = initial;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01230}01230                 \textcolor{keywordflow}{for} (\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} tx = x, ty = y;;)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01231}01231                 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01232}01232                     \textcolor{keywordflow}{if} (converged)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01233}01233                     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01234}01234                         storePixels (result, \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a01f5371958d06ab1411c46f72f049f45}{OP\_POINT}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01235}01235                         storePixels (result, tx);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01236}01236                         storePixels (result, ty);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01237}01237                     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01238}01238                     \textcolor{keywordflow}{do}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01239}01239                     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01240}01240                         \textcolor{keywordflow}{if} (converged)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01241}01241                             flipRowBit (vectors[heading], tx, ty);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01242}01242                         tx += dx[heading];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01243}01243                         ty += dy[heading];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01244}01244                     \} \textcolor{keywordflow}{while} (getRowBit (vectors[heading], tx, ty));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01245}01245                     \textcolor{keywordflow}{if} (tx == x \&\& ty == y)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01246}01246                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01247}01247                     \textcolor{keyword}{static\_assert} ((UP \string^ DOWN) == 1 \&\& (LEFT \string^ RIGHT) == 1,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01248}01248                         \textcolor{stringliteral}{"{}wrong enums"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01249}01249                     heading = (heading \& 2) \string^ 2;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01250}01250                     heading |= !!getRowBit (selection, tx, ty);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01251}01251                     heading \string^= !getRowBit (vectors[heading], tx, ty);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01252}01252                     assert (getRowBit (vectors[heading], tx, ty));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01253}01253                     flipRowBit (selection, tx, ty);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01254}01254                     pointCount++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01255}01255                 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01256}01256                 \textcolor{keywordflow}{if} (converged)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01257}01257                     \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01258}01258                 converged = pointCount == lastPointCount;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01259}01259                 lastPointCount = pointCount;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01260}01260             \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01261}01261 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01262}01262             storePixels (result, \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}{OP\_CLOSE}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01263}01263         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01264}01264     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01265}01265 \textcolor{preprocessor}{    \#undef getRowBit}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01266}01266 \textcolor{preprocessor}{    \#undef flipRowBit}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01267}01267 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01268}01268 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01269}01269 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01270}01270 \textcolor{comment}{    @brief Prepare 32-\/bit glyph offsets in a font table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01271}01271 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01272}01272 \textcolor{comment}{    @param[in] sizes Array of glyph sizes, for offset calculations.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01273}01273 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01274}01274 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01275}\mbox{\hyperlink{hex2otf_8c_a97af00050b8fd6b7e7b81c7027e4c8e6}{01275}} \mbox{\hyperlink{hex2otf_8c_a97af00050b8fd6b7e7b81c7027e4c8e6}{prepareOffsets}} (\textcolor{keywordtype}{size\_t} *sizes)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01276}01276 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01277}01277     \textcolor{keywordtype}{size\_t} *p = sizes;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01278}01278     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{size\_t} *i = sizes + 1; *i; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01279}01279         *i += *p++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01280}01280     \textcolor{keywordflow}{if} (*p > 2147483647U) \textcolor{comment}{// offset not representable}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01281}01281         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}CFF table is too large."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01282}01282 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01283}01283 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01284}01284 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01285}01285 \textcolor{comment}{    @brief Prepare a font name string index.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01286}01286 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01287}01287 \textcolor{comment}{    @param[in] names List of name strings.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01288}01288 \textcolor{comment}{    @return Pointer to a Buffer struct containing the string names.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01289}01289 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01290}01290 \mbox{\hyperlink{struct_buffer}{Buffer}} *}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01291}\mbox{\hyperlink{hex2otf_8c_aa52cd46a50cdc2040a72e5c7ecfa944b}{01291}} \mbox{\hyperlink{hex2otf_8c_aa52cd46a50cdc2040a72e5c7ecfa944b}{prepareStringIndex}} (\textcolor{keyword}{const} \mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{NameStrings}} names)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01292}01292 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01293}01293     \mbox{\hyperlink{struct_buffer}{Buffer}} *buf = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (256);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01294}01294     assert (names[6]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01295}01295     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *strings[] = \{\textcolor{stringliteral}{"{}Adobe"{}}, \textcolor{stringliteral}{"{}Identity"{}}, names[6]\};\textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01296}01296 \textcolor{comment}{    /// Get the number of elements in array char *strings[].}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01297}01297 \textcolor{comment}{}\textcolor{preprocessor}{    \#define stringCount (sizeof strings / sizeof *strings)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01298}01298     \textcolor{keyword}{static\_assert} (stringCount <= \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}}, \textcolor{stringliteral}{"{}too many strings"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01299}01299     \textcolor{keywordtype}{size\_t} offset = 1;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01300}01300     \textcolor{keywordtype}{size\_t} lengths[stringCount];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01301}01301     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{size\_t} i = 0; i < stringCount; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01302}01302     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01303}01303         assert (strings[i]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01304}01304         lengths[i] = strlen (strings[i]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01305}01305         offset += lengths[i];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01306}01306     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01307}01307     \textcolor{keywordtype}{int} offsetSize = 1 + (offset > 0xff)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01308}01308                        + (offset > 0xffff)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01309}01309                        + (offset > 0xffffff);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01310}01310     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (buf, stringCount); \textcolor{comment}{// count}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01311}01311     \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (buf, offsetSize); \textcolor{comment}{// offSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01312}01312     cacheU (buf, offset = 1, offsetSize); \textcolor{comment}{// offset[0]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01313}01313     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{size\_t} i = 0; i < stringCount; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01314}01314         cacheU (buf, offset += lengths[i], offsetSize); \textcolor{comment}{// offset[i + 1]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01315}01315     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{size\_t} i = 0; i < stringCount; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01316}01316         \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (buf, strings[i], lengths[i]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01317}01317 \textcolor{preprocessor}{    \#undef stringCount}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01318}01318     \textcolor{keywordflow}{return} buf;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01319}01319 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01320}01320 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01321}01321 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01322}01322 \textcolor{comment}{    @brief Add a CFF table to a font.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01323}01323 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01324}01324 \textcolor{comment}{    @param[in,out] font Pointer to a Font struct to contain the CFF table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01325}01325 \textcolor{comment}{    @param[in] version Version of CFF table, with value 1 or 2.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01326}01326 \textcolor{comment}{    @param[in] names List of NameStrings.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01327}01327 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01328}01328 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01329}\mbox{\hyperlink{hex2otf_8c_a3d62aa29f94c3fa78ca4438739d64a62}{01329}} \mbox{\hyperlink{hex2otf_8c_a3d62aa29f94c3fa78ca4438739d64a62}{fillCFF}} (\mbox{\hyperlink{struct_font}{Font}} *font, \textcolor{keywordtype}{int} version, \textcolor{keyword}{const} \mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{NameStrings}} names)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01330}01330 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01331}01331     \textcolor{comment}{// HACK: For convenience, CFF data structures are hard coded.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01332}01332     assert (0 < version \&\& version <= 2);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01333}01333     \mbox{\hyperlink{struct_buffer}{Buffer}} *cff = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (65536);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01334}01334     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, version == 1 ? \textcolor{stringliteral}{"{}CFF "{}} : \textcolor{stringliteral}{"{}CFF2"{}}, cff);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01335}01335 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01336}01336 \textcolor{comment}{    /// Use fixed width integer for variables to simplify offset calculation.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01337}01337 \textcolor{comment}{}\textcolor{preprocessor}{    \#define cacheCFF32(buf, x) (cacheU8 ((buf), 29), cacheU32 ((buf), (x)))}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01338}01338 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01339}01339     \textcolor{comment}{// In Unifont, 16px glyphs are more common. This is used by CFF1 only.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01340}01340     \textcolor{keyword}{const} \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} defaultWidth = 16, nominalWidth = 8;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01341}01341     \textcolor{keywordflow}{if} (version == 1)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01342}01342     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01343}01343         \mbox{\hyperlink{struct_buffer}{Buffer}} *strings = \mbox{\hyperlink{hex2otf_8c_aa52cd46a50cdc2040a72e5c7ecfa944b}{prepareStringIndex}} (names);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01344}01344         \textcolor{keywordtype}{size\_t} stringsSize = countBufferedBytes (strings);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01345}01345         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *cffName = names[6];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01346}01346         assert (cffName);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01347}01347         \textcolor{keywordtype}{size\_t} nameLength = strlen (cffName);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01348}01348         \textcolor{keywordtype}{size\_t} namesSize = nameLength + 5;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01349}01349         \textcolor{comment}{// These sizes must be updated together with the data below.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01350}01350         \textcolor{keywordtype}{size\_t} offsets[] = \{4, namesSize, 45, stringsSize, 2, 5, 8, 32, 4, 0\};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01351}01351         \mbox{\hyperlink{hex2otf_8c_a97af00050b8fd6b7e7b81c7027e4c8e6}{prepareOffsets}} (offsets);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01352}01352         \{ \textcolor{comment}{// Header}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01353}01353             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 1); \textcolor{comment}{// major}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01354}01354             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 0); \textcolor{comment}{// minor}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01355}01355             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 4); \textcolor{comment}{// hdrSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01356}01356             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 1); \textcolor{comment}{// offSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01357}01357         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01358}01358         assert (countBufferedBytes (cff) == offsets[0]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01359}01359         \{ \textcolor{comment}{// Name INDEX (should not be used by OpenType readers)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01360}01360             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cff, 1); \textcolor{comment}{// count}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01361}01361             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 1); \textcolor{comment}{// offSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01362}01362             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 1); \textcolor{comment}{// offset[0]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01363}01363             \textcolor{keywordflow}{if} (nameLength + 1 > 255) \textcolor{comment}{// must be too long; spec limit is 63}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01364}01364                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}PostScript name is too long."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01365}01365             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, nameLength + 1); \textcolor{comment}{// offset[1]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01366}01366             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, cffName, nameLength);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01367}01367         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01368}01368         assert (countBufferedBytes (cff) == offsets[1]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01369}01369         \{ \textcolor{comment}{// Top DICT INDEX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01370}01370             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cff, 1); \textcolor{comment}{// count}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01371}01371             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 1); \textcolor{comment}{// offSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01372}01372             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 1); \textcolor{comment}{// offset[0]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01373}01373             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 41); \textcolor{comment}{// offset[1]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01374}01374             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 391); \textcolor{comment}{// "{}Adobe"{}}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01375}01375             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 392); \textcolor{comment}{// "{}Identity"{}}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01376}01376             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01377}01377             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, (\textcolor{keywordtype}{byte}[])\{12, 30\}, 2); \textcolor{comment}{// ROS}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01378}01378             cacheCFF32 (cff, font-\/>glyphCount);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01379}01379             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, (\textcolor{keywordtype}{byte}[])\{12, 34\}, 2); \textcolor{comment}{// CIDCount}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01380}01380             cacheCFF32 (cff, offsets[6]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01381}01381             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, (\textcolor{keywordtype}{byte}[])\{12, 36\}, 2); \textcolor{comment}{// FDArray}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01382}01382             cacheCFF32 (cff, offsets[5]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01383}01383             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, (\textcolor{keywordtype}{byte}[])\{12, 37\}, 2); \textcolor{comment}{// FDSelect}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01384}01384             cacheCFF32 (cff, offsets[4]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01385}01385             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 15); \textcolor{comment}{// charset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01386}01386             cacheCFF32 (cff, offsets[8]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01387}01387             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 17); \textcolor{comment}{// CharStrings}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01388}01388         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01389}01389         assert (countBufferedBytes (cff) == offsets[2]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01390}01390         \{ \textcolor{comment}{// String INDEX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01391}01391             \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}} (cff, strings);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01392}01392             \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (strings);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01393}01393         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01394}01394         assert (countBufferedBytes (cff) == offsets[3]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01395}01395         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cff, 0); \textcolor{comment}{// Global Subr INDEX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01396}01396         assert (countBufferedBytes (cff) == offsets[4]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01397}01397         \{ \textcolor{comment}{// Charsets}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01398}01398             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 2); \textcolor{comment}{// format}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01399}01399             \{ \textcolor{comment}{// Range2[0]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01400}01400                 \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cff, 1); \textcolor{comment}{// first}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01401}01401                 \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cff, font-\/>glyphCount -\/ 2); \textcolor{comment}{// nLeft}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01402}01402             \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01403}01403         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01404}01404         assert (countBufferedBytes (cff) == offsets[5]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01405}01405         \{ \textcolor{comment}{// FDSelect}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01406}01406             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 3); \textcolor{comment}{// format}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01407}01407             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cff, 1); \textcolor{comment}{// nRanges}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01408}01408             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cff, 0); \textcolor{comment}{// first}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01409}01409             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 0); \textcolor{comment}{// fd}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01410}01410             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cff, font-\/>glyphCount); \textcolor{comment}{// sentinel}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01411}01411         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01412}01412         assert (countBufferedBytes (cff) == offsets[6]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01413}01413         \{ \textcolor{comment}{// FDArray}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01414}01414             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cff, 1); \textcolor{comment}{// count}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01415}01415             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 1); \textcolor{comment}{// offSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01416}01416             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 1); \textcolor{comment}{// offset[0]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01417}01417             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 28); \textcolor{comment}{// offset[1]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01418}01418             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 393);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01419}01419             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, (\textcolor{keywordtype}{byte}[])\{12, 38\}, 2); \textcolor{comment}{// FontName}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01420}01420             \textcolor{comment}{// Windows requires FontMatrix in Font DICT.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01421}01421             \textcolor{keyword}{const} \textcolor{keywordtype}{byte} unit[] = \{0x1e,0x15,0x62,0x5c,0x6f\}; \textcolor{comment}{// 1/64 (0.015625)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01422}01422             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, unit, \textcolor{keyword}{sizeof} unit);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01423}01423             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01424}01424             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01425}01425             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, unit, \textcolor{keyword}{sizeof} unit);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01426}01426             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01427}01427             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01428}01428             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, (\textcolor{keywordtype}{byte}[])\{12, 7\}, 2); \textcolor{comment}{// FontMatrix}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01429}01429             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, offsets[8] -\/ offsets[7]); \textcolor{comment}{// size}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01430}01430             cacheCFF32 (cff, offsets[7]); \textcolor{comment}{// offset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01431}01431             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 18); \textcolor{comment}{// Private}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01432}01432         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01433}01433         assert (countBufferedBytes (cff) == offsets[7]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01434}01434         \{ \textcolor{comment}{// Private}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01435}01435             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (defaultWidth));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01436}01436             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 20); \textcolor{comment}{// defaultWidthX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01437}01437             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (nominalWidth));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01438}01438             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 21); \textcolor{comment}{// nominalWidthX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01439}01439         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01440}01440         assert (countBufferedBytes (cff) == offsets[8]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01441}01441     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01442}01442     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01443}01443     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01444}01444         assert (version == 2);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01445}01445         \textcolor{comment}{// These sizes must be updated together with the data below.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01446}01446         \textcolor{keywordtype}{size\_t} offsets[] = \{5, 21, 4, 10, 0\};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01447}01447         \mbox{\hyperlink{hex2otf_8c_a97af00050b8fd6b7e7b81c7027e4c8e6}{prepareOffsets}} (offsets);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01448}01448         \{ \textcolor{comment}{// Header}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01449}01449             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 2); \textcolor{comment}{// majorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01450}01450             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 0); \textcolor{comment}{// minorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01451}01451             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 5); \textcolor{comment}{// headerSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01452}01452             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cff, offsets[1] -\/ offsets[0]); \textcolor{comment}{// topDictLength}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01453}01453         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01454}01454         assert (countBufferedBytes (cff) == offsets[0]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01455}01455         \{ \textcolor{comment}{// Top DICT}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01456}01456             \textcolor{keyword}{const} \textcolor{keywordtype}{byte} unit[] = \{0x1e,0x15,0x62,0x5c,0x6f\}; \textcolor{comment}{// 1/64 (0.015625)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01457}01457             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, unit, \textcolor{keyword}{sizeof} unit);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01458}01458             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01459}01459             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01460}01460             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, unit, \textcolor{keyword}{sizeof} unit);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01461}01461             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01462}01462             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01463}01463             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, (\textcolor{keywordtype}{byte}[])\{12, 7\}, 2); \textcolor{comment}{// FontMatrix}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01464}01464             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, offsets[2]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01465}01465             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (cff, (\textcolor{keywordtype}{byte}[])\{12, 36\}, 2); \textcolor{comment}{// FDArray}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01466}01466             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, offsets[3]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01467}01467             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 17); \textcolor{comment}{// CharStrings}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01468}01468         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01469}01469         assert (countBufferedBytes (cff) == offsets[1]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01470}01470         \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (cff, 0); \textcolor{comment}{// Global Subr INDEX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01471}01471         assert (countBufferedBytes (cff) == offsets[2]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01472}01472         \{ \textcolor{comment}{// Font DICT INDEX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01473}01473             \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (cff, 1); \textcolor{comment}{// count}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01474}01474             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 1); \textcolor{comment}{// offSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01475}01475             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 1); \textcolor{comment}{// offset[0]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01476}01476             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 4); \textcolor{comment}{// offset[1]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01477}01477             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01478}01478             \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (cff, 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01479}01479             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, 18); \textcolor{comment}{// Private}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01480}01480         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01481}01481         assert (countBufferedBytes (cff) == offsets[3]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01482}01482     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01483}01483     \{ \textcolor{comment}{// CharStrings INDEX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01484}01484         \mbox{\hyperlink{struct_buffer}{Buffer}} *offsets = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (4096);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01485}01485         \mbox{\hyperlink{struct_buffer}{Buffer}} *charstrings = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (4096);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01486}01486         \mbox{\hyperlink{struct_buffer}{Buffer}} *outline = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (1024);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01487}01487         \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *glyph = getBufferHead (font-\/>glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01488}01488         \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *\textcolor{keyword}{const} endGlyph = glyph + font-\/>glyphCount;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01489}01489         \textcolor{keywordflow}{for} (; glyph < endGlyph; glyph++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01490}01490         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01491}01491             \textcolor{comment}{// CFF offsets start at 1}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01492}01492             storeU32 (offsets, countBufferedBytes (charstrings) + 1);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01493}01493 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01494}01494             \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} rx = -\/glyph-\/>\mbox{\hyperlink{struct_glyph_ac113da35f4193641855eaf51547f9b43}{pos}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01495}01495             \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} ry = \mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01496}01496             resetBuffer (outline);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01497}01497             \mbox{\hyperlink{hex2otf_8c_a5af7c9bcfd40e5b11f9d12c40966bb65}{buildOutline}} (outline, glyph-\/>\mbox{\hyperlink{struct_glyph_abbbc1113c6e10dc0fa986abbb7f7665e}{bitmap}}, glyph-\/>\mbox{\hyperlink{struct_glyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}}, \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8caf18243d8ef6a7f601ae03a6cffbabadd}{FILL\_LEFT}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01498}01498             \textcolor{keyword}{enum} CFFOp \{rmoveto=21, hmoveto=22, vmoveto=4, hlineto=6,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01499}01499                 vlineto=7, endchar=14\};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01500}01500             \textcolor{keyword}{enum} CFFOp pendingOp = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01501}01501             \textcolor{keyword}{const} \textcolor{keywordtype}{int} STACK\_LIMIT = version == 1 ? 48 : 513;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01502}01502             \textcolor{keywordtype}{int} stackSize = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01503}01503             \textcolor{keywordtype}{bool} isDrawing = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01504}01504             \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} width = glyph-\/>\mbox{\hyperlink{struct_glyph_ada6b8b4b9419096c413b5a29dbc54aac}{combining}} ? 0 : \mbox{\hyperlink{hex2otf_8c_a79e768c38f3b21419f01d2d1347523be}{PW}} (glyph-\/>\mbox{\hyperlink{struct_glyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01505}01505             \textcolor{keywordflow}{if} (version == 1 \&\& width != defaultWidth)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01506}01506             \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01507}01507                 \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (charstrings, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (width -\/ nominalWidth));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01508}01508                 stackSize++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01509}01509             \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01510}01510             \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} *p = getBufferHead (outline),}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01511}01511                  *\textcolor{keyword}{const} end = getBufferTail (outline); p < end;)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01512}01512             \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01513}01513                 \textcolor{keywordtype}{int} s = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01514}01514                 \textcolor{keyword}{const} \textcolor{keyword}{enum} \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38}{ContourOp}} op = *p++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01515}01515                 \textcolor{keywordflow}{if} (op == \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a01f5371958d06ab1411c46f72f049f45}{OP\_POINT}})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01516}01516                 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01517}01517                     \textcolor{keyword}{const} \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} x = *p++, y = *p++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01518}01518                     \textcolor{keywordflow}{if} (x != rx)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01519}01519                     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01520}01520                         \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (charstrings, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (x -\/ rx));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01521}01521                         rx = x;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01522}01522                         stackSize++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01523}01523                         s |= 1;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01524}01524                     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01525}01525                     \textcolor{keywordflow}{if} (y != ry)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01526}01526                     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01527}01527                         \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (charstrings, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (y -\/ ry));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01528}01528                         ry = y;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01529}01529                         stackSize++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01530}01530                         s |= 2;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01531}01531                     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01532}01532                     assert (!(isDrawing \&\& s == 3));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01533}01533                 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01534}01534                 \textcolor{keywordflow}{if} (s)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01535}01535                 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01536}01536                     \textcolor{keywordflow}{if} (!isDrawing)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01537}01537                     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01538}01538                         \textcolor{keyword}{const} \textcolor{keyword}{enum} CFFOp moves[] = \{0, hmoveto, vmoveto,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01539}01539                             rmoveto\};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01540}01540                         \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (charstrings, moves[s]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01541}01541                         stackSize = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01542}01542                     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01543}01543                     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!pendingOp)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01544}01544                         pendingOp = (\textcolor{keyword}{enum} CFFOp[])\{0, hlineto, vlineto\}[s];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01545}01545                 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01546}01546                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!isDrawing)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01547}01547                 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01548}01548                     \textcolor{comment}{// only when the first point happens to be (0, 0)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01549}01549                     \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}} (charstrings, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (0));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01550}01550                     \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (charstrings, hmoveto);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01551}01551                     stackSize = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01552}01552                 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01553}01553                 \textcolor{keywordflow}{if} (op == \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}{OP\_CLOSE}} || stackSize >= STACK\_LIMIT)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01554}01554                 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01555}01555                     assert (stackSize <= STACK\_LIMIT);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01556}01556                     \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (charstrings, pendingOp);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01557}01557                     pendingOp = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01558}01558                     stackSize = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01559}01559                 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01560}01560                 isDrawing = op != \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}{OP\_CLOSE}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01561}01561             \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01562}01562             \textcolor{keywordflow}{if} (version == 1)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01563}01563                 \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (charstrings, endchar);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01564}01564         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01565}01565         \textcolor{keywordtype}{size\_t} lastOffset = countBufferedBytes (charstrings) + 1;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01566}01566 \textcolor{preprocessor}{        \#if SIZE\_MAX > U32MAX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01567}01567             \textcolor{keywordflow}{if} (lastOffset > \mbox{\hyperlink{hex2otf_8c_a7ccab01e56208030185cefdca13e0ac8}{U32MAX}})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01568}01568                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}CFF data exceeded size limit."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01569}01569 \textcolor{preprocessor}{        \#endif}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01570}01570         storeU32 (offsets, lastOffset);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01571}01571         \textcolor{keywordtype}{int} offsetSize = 1 + (lastOffset > 0xff)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01572}01572                            + (lastOffset > 0xffff)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01573}01573                            + (lastOffset > 0xffffff);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01574}01574         \textcolor{comment}{// count (must match 'numGlyphs' in 'maxp' table)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01575}01575         cacheU (cff, font-\/>glyphCount, version * 2);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01576}01576         \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (cff, offsetSize); \textcolor{comment}{// offSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01577}01577         \textcolor{keyword}{const} uint\_least32\_t *p = getBufferHead (offsets);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01578}01578         \textcolor{keyword}{const} uint\_least32\_t *\textcolor{keyword}{const} end = getBufferTail (offsets);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01579}01579         \textcolor{keywordflow}{for} (; p < end; p++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01580}01580             cacheU (cff, *p, offsetSize); \textcolor{comment}{// offsets}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01581}01581         \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}} (cff, charstrings); \textcolor{comment}{// data}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01582}01582         \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (offsets);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01583}01583         \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (charstrings);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01584}01584         \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (outline);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01585}01585     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01586}01586 \textcolor{preprocessor}{    \#undef cacheCFF32}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01587}01587 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01588}01588 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01589}01589 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01590}01590 \textcolor{comment}{    @brief Add a TrueType table to a font.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01591}01591 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01592}01592 \textcolor{comment}{    @param[in,out] font Pointer to a Font struct to contain the TrueType table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01593}01593 \textcolor{comment}{    @param[in] format The TrueType "{}loca"{} table format, Offset16 or Offset32.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01594}01594 \textcolor{comment}{    @param[in] names List of NameStrings.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01595}01595 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01596}01596 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01597}\mbox{\hyperlink{hex2otf_8c_a326e4fa86eb32bb18e37eab8f495bd2f}{01597}} \mbox{\hyperlink{hex2otf_8c_a326e4fa86eb32bb18e37eab8f495bd2f}{fillTrueType}} (\mbox{\hyperlink{struct_font}{Font}} *font, \textcolor{keyword}{enum} \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}{LocaFormat}} *format,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01598}01598     uint\_fast16\_t *maxPoints, uint\_fast16\_t *maxContours)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01599}01599 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01600}01600     \mbox{\hyperlink{struct_buffer}{Buffer}} *glyf = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (65536);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01601}01601     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}glyf"{}}, glyf);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01602}01602     \mbox{\hyperlink{struct_buffer}{Buffer}} *loca = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (4 * (font-\/>glyphCount + 1));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01603}01603     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}loca"{}}, loca);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01604}01604     *format = \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaad5e47b5a6bbf31be31e9b1328e7beef8}{LOCA\_OFFSET32}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01605}01605     \mbox{\hyperlink{struct_buffer}{Buffer}} *endPoints = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (256);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01606}01606     \mbox{\hyperlink{struct_buffer}{Buffer}} *flags = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (256);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01607}01607     \mbox{\hyperlink{struct_buffer}{Buffer}} *xs = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (256);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01608}01608     \mbox{\hyperlink{struct_buffer}{Buffer}} *ys = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (256);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01609}01609     \mbox{\hyperlink{struct_buffer}{Buffer}} *outline = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (1024);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01610}01610     \mbox{\hyperlink{struct_glyph}{Glyph}} *\textcolor{keyword}{const} glyphs = getBufferHead (font-\/>glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01611}01611     \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *\textcolor{keyword}{const} glyphsEnd = getBufferTail (font-\/>glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01612}01612     \textcolor{keywordflow}{for} (\mbox{\hyperlink{struct_glyph}{Glyph}} *glyph = glyphs; glyph < glyphsEnd; glyph++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01613}01613     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01614}01614         \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (loca, countBufferedBytes (glyf));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01615}01615         \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} rx = -\/glyph-\/>pos;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01616}01616         \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} ry = \mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01617}01617         \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} xMin = \mbox{\hyperlink{hex2otf_8c_a688a4772d61221e9378e5003da51265a}{GLYPH\_MAX\_WIDTH}}, xMax = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01618}01618         \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} yMin = \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}}, yMax = -\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01619}01619         resetBuffer (endPoints);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01620}01620         resetBuffer (flags);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01621}01621         resetBuffer (xs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01622}01622         resetBuffer (ys);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01623}01623         resetBuffer (outline);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01624}01624         \mbox{\hyperlink{hex2otf_8c_a5af7c9bcfd40e5b11f9d12c40966bb65}{buildOutline}} (outline, glyph-\/>bitmap, glyph-\/>byteCount, \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8ca0bbdc63e5d0938274b80230bc55d03b8}{FILL\_RIGHT}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01625}01625         uint\_fast32\_t pointCount = 0, contourCount = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01626}01626         \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} *p = getBufferHead (outline),}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01627}01627              *\textcolor{keyword}{const} end = getBufferTail (outline); p < end;)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01628}01628         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01629}01629             \textcolor{keyword}{const} \textcolor{keyword}{enum} \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38}{ContourOp}} op = *p++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01630}01630             \textcolor{keywordflow}{if} (op == \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}{OP\_CLOSE}})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01631}01631             \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01632}01632                 contourCount++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01633}01633                 assert (contourCount <= \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01634}01634                 \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (endPoints, pointCount -\/ 1);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01635}01635                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01636}01636             \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01637}01637             assert (op == \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a01f5371958d06ab1411c46f72f049f45}{OP\_POINT}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01638}01638             pointCount++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01639}01639             assert (pointCount <= \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01640}01640             \textcolor{keyword}{const} \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} x = *p++, y = *p++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01641}01641             uint\_fast8\_t pointFlags =}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01642}01642                 + \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}} (0) \textcolor{comment}{// point is on curve}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01643}01643                 + \mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}} (1, x != rx) \textcolor{comment}{// x coordinate is 1 byte instead of 2}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01644}01644                 + \mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}} (2, y != ry) \textcolor{comment}{// y coordinate is 1 byte instead of 2}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01645}01645                 + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (3) \textcolor{comment}{// repeat}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01646}01646                 + \mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}} (4, x >= rx) \textcolor{comment}{// when x is 1 byte: x is positive;}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01647}01647                                   \textcolor{comment}{// when x is 2 bytes: x unchanged and omitted}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01648}01648                 + \mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}} (5, y >= ry) \textcolor{comment}{// when y is 1 byte: y is positive;}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01649}01649                                   \textcolor{comment}{// when y is 2 bytes: y unchanged and omitted}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01650}01650                 + \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}} (6) \textcolor{comment}{// contours may overlap}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01651}01651                 + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (7) \textcolor{comment}{// reserved}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01652}01652             ;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01653}01653             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (flags, pointFlags);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01654}01654             \textcolor{keywordflow}{if} (x != rx)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01655}01655                 \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (xs, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (x > rx ? x -\/ rx : rx -\/ x));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01656}01656             \textcolor{keywordflow}{if} (y != ry)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01657}01657                 \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (ys, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (y > ry ? y -\/ ry : ry -\/ y));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01658}01658             \textcolor{keywordflow}{if} (x < xMin) xMin = x;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01659}01659             \textcolor{keywordflow}{if} (y < yMin) yMin = y;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01660}01660             \textcolor{keywordflow}{if} (x > xMax) xMax = x;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01661}01661             \textcolor{keywordflow}{if} (y > yMax) yMax = y;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01662}01662             rx = x;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01663}01663             ry = y;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01664}01664         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01665}01665         \textcolor{keywordflow}{if} (contourCount == 0)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01666}01666             \textcolor{keywordflow}{continue}; \textcolor{comment}{// blank glyph is indicated by the 'loca' table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01667}01667         glyph-\/>lsb = glyph-\/>pos + xMin;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01668}01668         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (glyf, contourCount); \textcolor{comment}{// numberOfContours}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01669}01669         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (glyf, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (glyph-\/>pos + xMin)); \textcolor{comment}{// xMin}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01670}01670         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (glyf, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (yMin)); \textcolor{comment}{// yMin}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01671}01671         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (glyf, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (glyph-\/>pos + xMax)); \textcolor{comment}{// xMax}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01672}01672         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (glyf, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (yMax)); \textcolor{comment}{// yMax}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01673}01673         \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}} (glyf, endPoints); \textcolor{comment}{// endPtsOfContours[]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01674}01674         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (glyf, 0); \textcolor{comment}{// instructionLength}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01675}01675         \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}} (glyf, flags); \textcolor{comment}{// flags[]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01676}01676         \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}} (glyf, xs); \textcolor{comment}{// xCoordinates[]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01677}01677         \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}} (glyf, ys); \textcolor{comment}{// yCoordinates[]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01678}01678         \textcolor{keywordflow}{if} (pointCount > *maxPoints)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01679}01679             *maxPoints = pointCount;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01680}01680         \textcolor{keywordflow}{if} (contourCount > *maxContours)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01681}01681             *maxContours = contourCount;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01682}01682     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01683}01683     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (loca, countBufferedBytes (glyf));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01684}01684     \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (endPoints);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01685}01685     \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (flags);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01686}01686     \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (xs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01687}01687     \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (ys);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01688}01688     \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (outline);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01689}01689 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01690}01690 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01691}01691 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01692}01692 \textcolor{comment}{    @brief Create a dummy blank outline in a font table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01693}01693 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01694}01694 \textcolor{comment}{    @param[in,out] font Pointer to a Font struct to insert a blank outline.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01695}01695 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01696}01696 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01697}\mbox{\hyperlink{hex2otf_8c_ab37b4f7111692f8d1163bafd2aab831e}{01697}} \mbox{\hyperlink{hex2otf_8c_ab37b4f7111692f8d1163bafd2aab831e}{fillBlankOutline}} (\mbox{\hyperlink{struct_font}{Font}} *font)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01698}01698 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01699}01699     \mbox{\hyperlink{struct_buffer}{Buffer}} *glyf = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (12);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01700}01700     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}glyf"{}}, glyf);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01701}01701     \textcolor{comment}{// Empty table is not allowed, but an empty outline for glyph 0 suffices.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01702}01702     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (glyf, 0); \textcolor{comment}{// numberOfContours}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01703}01703     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (glyf, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (0)); \textcolor{comment}{// xMin}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01704}01704     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (glyf, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (0)); \textcolor{comment}{// yMin}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01705}01705     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (glyf, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (0)); \textcolor{comment}{// xMax}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01706}01706     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (glyf, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (0)); \textcolor{comment}{// yMax}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01707}01707     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (glyf, 0); \textcolor{comment}{// instructionLength}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01708}01708     \mbox{\hyperlink{struct_buffer}{Buffer}} *loca = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (2 * (font-\/>glyphCount + 1));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01709}01709     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}loca"{}}, loca);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01710}01710     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (loca, 0); \textcolor{comment}{// offsets[0]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01711}01711     assert (countBufferedBytes (glyf) \% 2 == 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01712}01712     \textcolor{keywordflow}{for} (uint\_fast32\_t i = 1; i <= font-\/>glyphCount; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01713}01713         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (loca, countBufferedBytes (glyf) / 2); \textcolor{comment}{// offsets[i]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01714}01714 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01715}01715 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01716}01716 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01717}01717 \textcolor{comment}{    @brief Fill OpenType bitmap data and location tables.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01718}01718 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01719}01719 \textcolor{comment}{    This function fills an Embedded Bitmap Data (EBDT) Table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01720}01720 \textcolor{comment}{    and an Embedded Bitmap Location (EBLC) Table with glyph}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01721}01721 \textcolor{comment}{    bitmap information.  These tables enable embedding bitmaps}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01722}01722 \textcolor{comment}{    in OpenType fonts.  No Embedded Bitmap Scaling (EBSC) table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01723}01723 \textcolor{comment}{    is used for the bitmap glyphs, only EBDT and EBLC.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01724}01724 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01725}01725 \textcolor{comment}{    @param[in,out] font Pointer to a Font struct in which to add bitmaps.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01726}01726 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01727}01727 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01728}\mbox{\hyperlink{hex2otf_8c_afd499a24ff34cb5c19b52df795422c12}{01728}} \mbox{\hyperlink{hex2otf_8c_afd499a24ff34cb5c19b52df795422c12}{fillBitmap}} (\mbox{\hyperlink{struct_font}{Font}} *font)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01729}01729 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01730}01730     \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *\textcolor{keyword}{const} glyphs = getBufferHead (font-\/>glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01731}01731     \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *\textcolor{keyword}{const} glyphsEnd = getBufferTail (font-\/>glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01732}01732     \textcolor{keywordtype}{size\_t} bitmapsSize = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01733}01733     \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *glyph = glyphs; glyph < glyphsEnd; glyph++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01734}01734         bitmapsSize += glyph-\/>byteCount;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01735}01735     \mbox{\hyperlink{struct_buffer}{Buffer}} *ebdt = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (4 + bitmapsSize);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01736}01736     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}EBDT"{}}, ebdt);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01737}01737     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (ebdt, 2); \textcolor{comment}{// majorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01738}01738     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (ebdt, 0); \textcolor{comment}{// minorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01739}01739     uint\_fast8\_t byteCount = 0; \textcolor{comment}{// unequal to any glyph}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01740}01740     \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} pos = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01741}01741     \textcolor{keywordtype}{bool} combining = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01742}01742     \mbox{\hyperlink{struct_buffer}{Buffer}} *rangeHeads = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (32);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01743}01743     \mbox{\hyperlink{struct_buffer}{Buffer}} *offsets = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (64);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01744}01744     \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *glyph = glyphs; glyph < glyphsEnd; glyph++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01745}01745     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01746}01746         \textcolor{keywordflow}{if} (glyph-\/>byteCount != byteCount || glyph-\/>pos != pos ||}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01747}01747             glyph-\/>combining != combining)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01748}01748         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01749}01749             storeU16 (rangeHeads, glyph -\/ glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01750}01750             storeU32 (offsets, countBufferedBytes (ebdt));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01751}01751             byteCount = glyph-\/>byteCount;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01752}01752             pos = glyph-\/>pos;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01753}01753             combining = glyph-\/>combining;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01754}01754         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01755}01755         \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (ebdt, glyph-\/>bitmap, byteCount);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01756}01756     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01757}01757     \textcolor{keyword}{const} uint\_least16\_t *ranges = getBufferHead (rangeHeads);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01758}01758     \textcolor{keyword}{const} uint\_least16\_t *rangesEnd = getBufferTail (rangeHeads);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01759}01759     uint\_fast32\_t rangeCount = rangesEnd -\/ ranges;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01760}01760     storeU16 (rangeHeads, font-\/>glyphCount);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01761}01761     \mbox{\hyperlink{struct_buffer}{Buffer}} *eblc = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (4096);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01762}01762     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}EBLC"{}}, eblc);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01763}01763     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (eblc, 2); \textcolor{comment}{// majorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01764}01764     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (eblc, 0); \textcolor{comment}{// minorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01765}01765     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (eblc, 1); \textcolor{comment}{// numSizes}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01766}01766     \{ \textcolor{comment}{// bitmapSizes[0]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01767}01767         \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (eblc, 56); \textcolor{comment}{// indexSubTableArrayOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01768}01768         \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (eblc, (8 + 20) * rangeCount); \textcolor{comment}{// indexTablesSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01769}01769         \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (eblc, rangeCount); \textcolor{comment}{// numberOfIndexSubTables}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01770}01770         \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (eblc, 0); \textcolor{comment}{// colorRef}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01771}01771         \{ \textcolor{comment}{// hori}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01772}01772             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}}); \textcolor{comment}{// ascender}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01773}01773             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, -\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}}); \textcolor{comment}{// descender}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01774}01774             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, font-\/>maxWidth); \textcolor{comment}{// widthMax}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01775}01775             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 1); \textcolor{comment}{// caretSlopeNumerator}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01776}01776             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// caretSlopeDenominator}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01777}01777             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// caretOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01778}01778             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// minOriginSB}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01779}01779             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// minAdvanceSB}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01780}01780             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}}); \textcolor{comment}{// maxBeforeBL}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01781}01781             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, -\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}}); \textcolor{comment}{// minAfterBL}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01782}01782             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// pad1}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01783}01783             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// pad2}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01784}01784         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01785}01785         \{ \textcolor{comment}{// vert}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01786}01786             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}}); \textcolor{comment}{// ascender}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01787}01787             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, -\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}}); \textcolor{comment}{// descender}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01788}01788             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, font-\/>maxWidth); \textcolor{comment}{// widthMax}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01789}01789             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 1); \textcolor{comment}{// caretSlopeNumerator}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01790}01790             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// caretSlopeDenominator}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01791}01791             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// caretOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01792}01792             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// minOriginSB}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01793}01793             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// minAdvanceSB}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01794}01794             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}}); \textcolor{comment}{// maxBeforeBL}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01795}01795             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, -\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}}); \textcolor{comment}{// minAfterBL}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01796}01796             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// pad1}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01797}01797             \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// pad2}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01798}01798         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01799}01799         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (eblc, 0); \textcolor{comment}{// startGlyphIndex}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01800}01800         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (eblc, font-\/>glyphCount -\/ 1); \textcolor{comment}{// endGlyphIndex}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01801}01801         \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 16); \textcolor{comment}{// ppemX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01802}01802         \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 16); \textcolor{comment}{// ppemY}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01803}01803         \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 1); \textcolor{comment}{// bitDepth}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01804}01804         \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 1); \textcolor{comment}{// flags = Horizontal}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01805}01805     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01806}01806     \{ \textcolor{comment}{// IndexSubTableArray}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01807}01807         uint\_fast32\_t offset = rangeCount * 8;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01808}01808         \textcolor{keywordflow}{for} (\textcolor{keyword}{const} uint\_least16\_t *p = ranges; p < rangesEnd; p++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01809}01809         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01810}01810             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (eblc, *p); \textcolor{comment}{// firstGlyphIndex}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01811}01811             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (eblc, p[1] -\/ 1); \textcolor{comment}{// lastGlyphIndex}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01812}01812             \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (eblc, offset); \textcolor{comment}{// additionalOffsetToIndexSubtable}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01813}01813             offset += 20;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01814}01814         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01815}01815     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01816}01816     \{ \textcolor{comment}{// IndexSubTables}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01817}01817         \textcolor{keyword}{const} uint\_least32\_t *offset = getBufferHead (offsets);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01818}01818         \textcolor{keywordflow}{for} (\textcolor{keyword}{const} uint\_least16\_t *p = ranges; p < rangesEnd; p++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01819}01819         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01820}01820             \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *glyph = \&glyphs[*p];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01821}01821             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (eblc, 2); \textcolor{comment}{// indexFormat}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01822}01822             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (eblc, 5); \textcolor{comment}{// imageFormat}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01823}01823             \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (eblc, *offset++); \textcolor{comment}{// imageDataOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01824}01824             \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (eblc, glyph-\/>\mbox{\hyperlink{struct_glyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}}); \textcolor{comment}{// imageSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01825}01825             \{ \textcolor{comment}{// bigMetrics}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01826}01826                 \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}}); \textcolor{comment}{// height}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01827}01827                 \textcolor{keyword}{const} uint\_fast8\_t width = \mbox{\hyperlink{hex2otf_8c_a79e768c38f3b21419f01d2d1347523be}{PW}} (glyph-\/>\mbox{\hyperlink{struct_glyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01828}01828                 \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, width); \textcolor{comment}{// width}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01829}01829                 \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, glyph-\/>\mbox{\hyperlink{struct_glyph_ac113da35f4193641855eaf51547f9b43}{pos}}); \textcolor{comment}{// horiBearingX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01830}01830                 \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}}); \textcolor{comment}{// horiBearingY}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01831}01831                 \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, glyph-\/>\mbox{\hyperlink{struct_glyph_ada6b8b4b9419096c413b5a29dbc54aac}{combining}} ? 0 : width); \textcolor{comment}{// horiAdvance}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01832}01832                 \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// vertBearingX}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01833}01833                 \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, 0); \textcolor{comment}{// vertBearingY}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01834}01834                 \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}} (eblc, \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}}); \textcolor{comment}{// vertAdvance}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01835}01835             \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01836}01836         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01837}01837     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01838}01838     \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (rangeHeads);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01839}01839     \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (offsets);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01840}01840 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01841}01841 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01842}01842 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01843}01843 \textcolor{comment}{    @brief Fill a "{}head"{} font table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01844}01844 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01845}01845 \textcolor{comment}{    The "{}head"{} table contains font header information common to the}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01846}01846 \textcolor{comment}{    whole font.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01847}01847 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01848}01848 \textcolor{comment}{    @param[in,out] font The Font struct to which to add the table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01849}01849 \textcolor{comment}{    @param[in] locaFormat The "{}loca"{} offset index location table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01850}01850 \textcolor{comment}{    @param[in] xMin The minimum x-\/coordinate for a glyph.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01851}01851 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01852}01852 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01853}\mbox{\hyperlink{hex2otf_8c_a4ac0c02117b703a71bee3dd34e2eb306}{01853}} \mbox{\hyperlink{hex2otf_8c_a4ac0c02117b703a71bee3dd34e2eb306}{fillHeadTable}} (\mbox{\hyperlink{struct_font}{Font}} *font, \textcolor{keyword}{enum} \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}{LocaFormat}} locaFormat, \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} xMin)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01854}01854 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01855}01855     \mbox{\hyperlink{struct_buffer}{Buffer}} *head = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (56);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01856}01856     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}head"{}}, head);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01857}01857     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, 1); \textcolor{comment}{// majorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01858}01858     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, 0); \textcolor{comment}{// minorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01859}01859     \mbox{\hyperlink{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}{cacheZeros}} (head, 4); \textcolor{comment}{// fontRevision (unused)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01860}01860     \textcolor{comment}{// The 'checksumAdjustment' field is a checksum of the entire file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01861}01861     \textcolor{comment}{// It is later calculated and written directly in the 'writeFont' function.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01862}01862     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (head, 0); \textcolor{comment}{// checksumAdjustment (placeholder)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01863}01863     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (head, 0x5f0f3cf5); \textcolor{comment}{// magicNumber}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01864}01864     \textcolor{keyword}{const} uint\_fast16\_t flags =}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01865}01865         + \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}} ( 0) \textcolor{comment}{// baseline at y=0}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01866}01866         + \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}} ( 1) \textcolor{comment}{// LSB at x=0 (doubtful; probably should be LSB=xMin)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01867}01867         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} ( 2) \textcolor{comment}{// instructions may depend on point size}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01868}01868         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} ( 3) \textcolor{comment}{// force internal ppem to integers}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01869}01869         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} ( 4) \textcolor{comment}{// instructions may alter advance width}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01870}01870         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} ( 5) \textcolor{comment}{// not used in OpenType}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01871}01871         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} ( 6) \textcolor{comment}{// not used in OpenType}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01872}01872         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} ( 7) \textcolor{comment}{// not used in OpenType}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01873}01873         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} ( 8) \textcolor{comment}{// not used in OpenType}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01874}01874         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} ( 9) \textcolor{comment}{// not used in OpenType}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01875}01875         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (10) \textcolor{comment}{// not used in OpenType}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01876}01876         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (11) \textcolor{comment}{// font transformed}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01877}01877         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (12) \textcolor{comment}{// font converted}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01878}01878         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (13) \textcolor{comment}{// font optimized for ClearType}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01879}01879         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (14) \textcolor{comment}{// last resort font}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01880}01880         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (15) \textcolor{comment}{// reserved}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01881}01881     ;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01882}01882     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, flags); \textcolor{comment}{// flags}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01883}01883     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, \mbox{\hyperlink{hex2otf_8c_a652fd701381105d0d34ca4084cca413c}{FUPEM}}); \textcolor{comment}{// unitsPerEm}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01884}01884     \mbox{\hyperlink{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}{cacheZeros}} (head, 8); \textcolor{comment}{// created (unused)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01885}01885     \mbox{\hyperlink{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}{cacheZeros}} (head, 8); \textcolor{comment}{// modified (unused)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01886}01886     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (xMin)); \textcolor{comment}{// xMin}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01887}01887     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (-\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}})); \textcolor{comment}{// yMin}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01888}01888     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (font-\/>maxWidth)); \textcolor{comment}{// xMax}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01889}01889     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (\mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}})); \textcolor{comment}{// yMax}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01890}01890     \textcolor{comment}{// macStyle (must agree with 'fsSelection' in 'OS/2' table)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01891}01891     \textcolor{keyword}{const} uint\_fast16\_t macStyle =}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01892}01892         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (0) \textcolor{comment}{// bold}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01893}01893         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (1) \textcolor{comment}{// italic}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01894}01894         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (2) \textcolor{comment}{// underline}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01895}01895         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (3) \textcolor{comment}{// outline}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01896}01896         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (4) \textcolor{comment}{// shadow}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01897}01897         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (5) \textcolor{comment}{// condensed}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01898}01898         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (6) \textcolor{comment}{// extended}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01899}01899         \textcolor{comment}{//    7-\/15  reserved}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01900}01900     ;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01901}01901     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, macStyle);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01902}01902     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}}); \textcolor{comment}{// lowestRecPPEM}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01903}01903     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, 2); \textcolor{comment}{// fontDirectionHint}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01904}01904     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, locaFormat); \textcolor{comment}{// indexToLocFormat}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01905}01905     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (head, 0); \textcolor{comment}{// glyphDataFormat}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01906}01906 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01907}01907 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01908}01908 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01909}01909 \textcolor{comment}{    @brief Fill a "{}hhea"{} font table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01910}01910 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01911}01911 \textcolor{comment}{    The "{}hhea"{} table contains horizontal header information,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01912}01912 \textcolor{comment}{    for example left and right side bearings.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01913}01913 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01914}01914 \textcolor{comment}{    @param[in,out] font The Font struct to which to add the table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01915}01915 \textcolor{comment}{    @param[in] xMin The minimum x-\/coordinate for a glyph.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01916}01916 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01917}01917 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01918}\mbox{\hyperlink{hex2otf_8c_a28e889c3a36007c2e5d50a498046a6c6}{01918}} \mbox{\hyperlink{hex2otf_8c_a28e889c3a36007c2e5d50a498046a6c6}{fillHheaTable}} (\mbox{\hyperlink{struct_font}{Font}} *font, \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} xMin)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01919}01919 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01920}01920     \mbox{\hyperlink{struct_buffer}{Buffer}} *hhea = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (36);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01921}01921     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}hhea"{}}, hhea);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01922}01922     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, 1); \textcolor{comment}{// majorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01923}01923     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, 0); \textcolor{comment}{// minorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01924}01924     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (\mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}})); \textcolor{comment}{// ascender}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01925}01925     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (-\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}})); \textcolor{comment}{// descender}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01926}01926     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (0)); \textcolor{comment}{// lineGap}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01927}01927     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (font-\/>maxWidth)); \textcolor{comment}{// advanceWidthMax}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01928}01928     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (xMin)); \textcolor{comment}{// minLeftSideBearing}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01929}01929     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (0)); \textcolor{comment}{// minRightSideBearing (unused)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01930}01930     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (font-\/>maxWidth)); \textcolor{comment}{// xMaxExtent}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01931}01931     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, 1); \textcolor{comment}{// caretSlopeRise}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01932}01932     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, 0); \textcolor{comment}{// caretSlopeRun}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01933}01933     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, 0); \textcolor{comment}{// caretOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01934}01934     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, 0); \textcolor{comment}{// reserved}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01935}01935     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, 0); \textcolor{comment}{// reserved}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01936}01936     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, 0); \textcolor{comment}{// reserved}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01937}01937     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, 0); \textcolor{comment}{// reserved}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01938}01938     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, 0); \textcolor{comment}{// metricDataFormat}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01939}01939     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hhea, font-\/>glyphCount); \textcolor{comment}{// numberOfHMetrics}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01940}01940 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01941}01941 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01942}01942 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01943}01943 \textcolor{comment}{    @brief Fill a "{}maxp"{} font table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01944}01944 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01945}01945 \textcolor{comment}{    The "{}maxp"{} table contains maximum profile information,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01946}01946 \textcolor{comment}{    such as the memory required to contain the font.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01947}01947 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01948}01948 \textcolor{comment}{    @param[in,out] font The Font struct to which to add the table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01949}01949 \textcolor{comment}{    @param[in] isCFF true if a CFF font is included, false otherwise.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01950}01950 \textcolor{comment}{    @param[in] maxPoints Maximum points in a non-\/composite glyph.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01951}01951 \textcolor{comment}{    @param[in] maxContours Maximum contours in a non-\/composite glyph.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01952}01952 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01953}01953 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01954}\mbox{\hyperlink{hex2otf_8c_aff4f28ce178c84c7365245ec10034433}{01954}} \mbox{\hyperlink{hex2otf_8c_aff4f28ce178c84c7365245ec10034433}{fillMaxpTable}} (\mbox{\hyperlink{struct_font}{Font}} *font, \textcolor{keywordtype}{bool} isCFF, uint\_fast16\_t maxPoints,}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01955}01955     uint\_fast16\_t maxContours)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01956}01956 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01957}01957     \mbox{\hyperlink{struct_buffer}{Buffer}} *maxp = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (32);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01958}01958     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}maxp"{}}, maxp);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01959}01959     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (maxp, isCFF ? 0x00005000 : 0x00010000); \textcolor{comment}{// version}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01960}01960     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, font-\/>glyphCount); \textcolor{comment}{// numGlyphs}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01961}01961     \textcolor{keywordflow}{if} (isCFF)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01962}01962         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01963}01963     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, maxPoints); \textcolor{comment}{// maxPoints}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01964}01964     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, maxContours); \textcolor{comment}{// maxContours}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01965}01965     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, 0); \textcolor{comment}{// maxCompositePoints}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01966}01966     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, 0); \textcolor{comment}{// maxCompositeContours}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01967}01967     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, 0); \textcolor{comment}{// maxZones}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01968}01968     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, 0); \textcolor{comment}{// maxTwilightPoints}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01969}01969     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, 0); \textcolor{comment}{// maxStorage}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01970}01970     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, 0); \textcolor{comment}{// maxFunctionDefs}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01971}01971     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, 0); \textcolor{comment}{// maxInstructionDefs}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01972}01972     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, 0); \textcolor{comment}{// maxStackElements}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01973}01973     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, 0); \textcolor{comment}{// maxSizeOfInstructions}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01974}01974     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, 0); \textcolor{comment}{// maxComponentElements}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01975}01975     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (maxp, 0); \textcolor{comment}{// maxComponentDepth}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01976}01976 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01977}01977 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01978}01978 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01979}01979 \textcolor{comment}{    @brief Fill an "{}OS/2"{} font table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01980}01980 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01981}01981 \textcolor{comment}{    The "{}OS/2"{} table contains OS/2 and Windows font metrics information.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01982}01982 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01983}01983 \textcolor{comment}{    @param[in,out] font The Font struct to which to add the table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01984}01984 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01985}01985 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01986}\mbox{\hyperlink{hex2otf_8c_ab6e3bb110dc3e55193c344cb7b56e328}{01986}} \mbox{\hyperlink{hex2otf_8c_ab6e3bb110dc3e55193c344cb7b56e328}{fillOS2Table}} (\mbox{\hyperlink{struct_font}{Font}} *font)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01987}01987 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01988}01988     \mbox{\hyperlink{struct_buffer}{Buffer}} *os2 = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (100);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01989}01989     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}OS/2"{}}, os2);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01990}01990     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, 5); \textcolor{comment}{// version}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01991}01991     \textcolor{comment}{// HACK: Average glyph width is not actually calculated.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01992}01992     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (font-\/>maxWidth)); \textcolor{comment}{// xAvgCharWidth}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01993}01993     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, 400); \textcolor{comment}{// usWeightClass = Normal}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01994}01994     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, 5); \textcolor{comment}{// usWidthClass = Medium}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01995}01995     \textcolor{keyword}{const} uint\_fast16\_t typeFlags =}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01996}01996         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (0) \textcolor{comment}{// reserved}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01997}01997         \textcolor{comment}{// usage permissions, one of:}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01998}01998             \textcolor{comment}{// Default: Installable embedding}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l01999}01999             + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (1) \textcolor{comment}{// Restricted License embedding}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02000}02000             + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (2) \textcolor{comment}{// Preview \& Print embedding}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02001}02001             + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (3) \textcolor{comment}{// Editable embedding}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02002}02002         \textcolor{comment}{//    4-\/7   reserved}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02003}02003         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (8) \textcolor{comment}{// no subsetting}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02004}02004         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (9) \textcolor{comment}{// bitmap embedding only}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02005}02005         \textcolor{comment}{//    10-\/15 reserved}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02006}02006     ;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02007}02007     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, typeFlags); \textcolor{comment}{// fsType}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02008}02008     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (5)); \textcolor{comment}{// ySubscriptXSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02009}02009     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (7)); \textcolor{comment}{// ySubscriptYSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02010}02010     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (0)); \textcolor{comment}{// ySubscriptXOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02011}02011     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (1)); \textcolor{comment}{// ySubscriptYOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02012}02012     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (5)); \textcolor{comment}{// ySuperscriptXSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02013}02013     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (7)); \textcolor{comment}{// ySuperscriptYSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02014}02014     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (0)); \textcolor{comment}{// ySuperscriptXOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02015}02015     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (4)); \textcolor{comment}{// ySuperscriptYOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02016}02016     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (1)); \textcolor{comment}{// yStrikeoutSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02017}02017     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (5)); \textcolor{comment}{// yStrikeoutPosition}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02018}02018     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, 0x080a); \textcolor{comment}{// sFamilyClass = Sans Serif, Matrix}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02019}02019     \textcolor{keyword}{const} \textcolor{keywordtype}{byte} panose[] =}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02020}02020     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02021}02021         2, \textcolor{comment}{// Family Kind = Latin Text}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02022}02022         11, \textcolor{comment}{// Serif Style = Normal Sans}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02023}02023         4, \textcolor{comment}{// Weight = Thin}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02024}02024         \textcolor{comment}{// Windows would render all glyphs to the same width,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02025}02025         \textcolor{comment}{// if 'Proportion' is set to 'Monospaced' (as Unifont should be).}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02026}02026         \textcolor{comment}{// 'Condensed' is the best alternative according to metrics.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02027}02027         6, \textcolor{comment}{// Proportion = Condensed}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02028}02028         2, \textcolor{comment}{// Contrast = None}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02029}02029         2, \textcolor{comment}{// Stroke = No Variation}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02030}02030         2, \textcolor{comment}{// Arm Style = Straight Arms}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02031}02031         8, \textcolor{comment}{// Letterform = Normal/Square}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02032}02032         2, \textcolor{comment}{// Midline = Standard/Trimmed}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02033}02033         4, \textcolor{comment}{// X-\/height = Constant/Large}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02034}02034     \};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02035}02035     \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (os2, panose, \textcolor{keyword}{sizeof} panose); \textcolor{comment}{// panose}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02036}02036     \textcolor{comment}{// HACK: All defined Unicode ranges are marked functional for convenience.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02037}02037     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (os2, 0xffffffff); \textcolor{comment}{// ulUnicodeRange1}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02038}02038     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (os2, 0xffffffff); \textcolor{comment}{// ulUnicodeRange2}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02039}02039     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (os2, 0xffffffff); \textcolor{comment}{// ulUnicodeRange3}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02040}02040     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (os2, 0x0effffff); \textcolor{comment}{// ulUnicodeRange4}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02041}02041     \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (os2, \textcolor{stringliteral}{"{}GNU "{}}, 4); \textcolor{comment}{// achVendID}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02042}02042     \textcolor{comment}{// fsSelection (must agree with 'macStyle' in 'head' table)}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02043}02043     \textcolor{keyword}{const} uint\_fast16\_t selection =}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02044}02044         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (0) \textcolor{comment}{// italic}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02045}02045         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (1) \textcolor{comment}{// underscored}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02046}02046         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (2) \textcolor{comment}{// negative}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02047}02047         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (3) \textcolor{comment}{// outlined}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02048}02048         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (4) \textcolor{comment}{// strikeout}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02049}02049         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (5) \textcolor{comment}{// bold}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02050}02050         + \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}} (6) \textcolor{comment}{// regular}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02051}02051         + \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}} (7) \textcolor{comment}{// use sTypo* metrics in this table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02052}02052         + \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}} (8) \textcolor{comment}{// font name conforms to WWS model}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02053}02053         + \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}} (9) \textcolor{comment}{// oblique}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02054}02054         \textcolor{comment}{//    10-\/15 reserved}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02055}02055     ;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02056}02056     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, selection);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02057}02057     \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *glyphs = getBufferHead (font-\/>glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02058}02058     uint\_fast32\_t first = glyphs[1].\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02059}02059     uint\_fast32\_t last = glyphs[font-\/>glyphCount -\/ 1].\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02060}02060     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, first < \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}} ? first : \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}}); \textcolor{comment}{// usFirstCharIndex}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02061}02061     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, last  < \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}} ? last  : \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}}); \textcolor{comment}{// usLastCharIndex}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02062}02062     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (\mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}})); \textcolor{comment}{// sTypoAscender}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02063}02063     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (-\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}})); \textcolor{comment}{// sTypoDescender}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02064}02064     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (0)); \textcolor{comment}{// sTypoLineGap}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02065}02065     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (\mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}})); \textcolor{comment}{// usWinAscent}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02066}02066     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}})); \textcolor{comment}{// usWinDescent}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02067}02067     \textcolor{comment}{// HACK: All reasonable code pages are marked functional for convenience.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02068}02068     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (os2, 0x603f01ff); \textcolor{comment}{// ulCodePageRange1}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02069}02069     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (os2, 0xffff0000); \textcolor{comment}{// ulCodePageRange2}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02070}02070     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (8)); \textcolor{comment}{// sxHeight}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02071}02071     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (10)); \textcolor{comment}{// sCapHeight}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02072}02072     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, 0); \textcolor{comment}{// usDefaultChar}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02073}02073     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, 0x20); \textcolor{comment}{// usBreakChar}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02074}02074     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, 0); \textcolor{comment}{// usMaxContext}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02075}02075     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, 0); \textcolor{comment}{// usLowerOpticalPointSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02076}02076     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (os2, 0xffff); \textcolor{comment}{// usUpperOpticalPointSize}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02077}02077 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02078}02078 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02079}02079 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02080}02080 \textcolor{comment}{    @brief Fill an "{}hmtx"{} font table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02081}02081 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02082}02082 \textcolor{comment}{    The "{}hmtx"{} table contains horizontal metrics information.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02083}02083 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02084}02084 \textcolor{comment}{    @param[in,out] font The Font struct to which to add the table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02085}02085 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02086}02086 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02087}\mbox{\hyperlink{hex2otf_8c_a97c9b2ae58f5989d68e639715c3f9df9}{02087}} \mbox{\hyperlink{hex2otf_8c_a97c9b2ae58f5989d68e639715c3f9df9}{fillHmtxTable}} (\mbox{\hyperlink{struct_font}{Font}} *font)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02088}02088 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02089}02089     \mbox{\hyperlink{struct_buffer}{Buffer}} *hmtx = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (4 * font-\/>glyphCount);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02090}02090     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}hmtx"{}}, hmtx);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02091}02091     \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *\textcolor{keyword}{const} glyphs = getBufferHead (font-\/>glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02092}02092     \textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *\textcolor{keyword}{const} glyphsEnd = getBufferTail (font-\/>glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02093}02093     \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{struct_glyph}{Glyph}} *glyph = glyphs; glyph < glyphsEnd; glyph++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02094}02094     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02095}02095         int\_fast16\_t aw = glyph-\/>combining ? 0 : \mbox{\hyperlink{hex2otf_8c_a79e768c38f3b21419f01d2d1347523be}{PW}} (glyph-\/>byteCount);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02096}02096         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hmtx, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (aw)); \textcolor{comment}{// advanceWidth}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02097}02097         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (hmtx, \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}} (glyph-\/>lsb)); \textcolor{comment}{// lsb}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02098}02098     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02099}02099 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02100}02100 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02101}02101 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02102}02102 \textcolor{comment}{    @brief Fill a "{}cmap"{} font table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02103}02103 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02104}02104 \textcolor{comment}{    The "{}cmap"{} table contains character to glyph index mapping information.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02105}02105 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02106}02106 \textcolor{comment}{    @param[in,out] font The Font struct to which to add the table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02107}02107 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02108}02108 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02109}\mbox{\hyperlink{hex2otf_8c_a6362601eb41d051a103a1d9edcd4f284}{02109}} \mbox{\hyperlink{hex2otf_8c_a6362601eb41d051a103a1d9edcd4f284}{fillCmapTable}} (\mbox{\hyperlink{struct_font}{Font}} *font)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02110}02110 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02111}02111     \mbox{\hyperlink{struct_glyph}{Glyph}} *\textcolor{keyword}{const} glyphs = getBufferHead (font-\/>glyphs);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02112}02112     \mbox{\hyperlink{struct_buffer}{Buffer}} *rangeHeads = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (16);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02113}02113     uint\_fast32\_t rangeCount = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02114}02114     uint\_fast32\_t bmpRangeCount = 1; \textcolor{comment}{// 1 for the last 0xffff-\/0xffff range}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02115}02115     glyphs[0].\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}} = glyphs[1].\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}}; \textcolor{comment}{// to start a range at glyph 1}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02116}02116     \textcolor{keywordflow}{for} (uint\_fast16\_t i = 1; i < font-\/>glyphCount; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02117}02117     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02118}02118         \textcolor{keywordflow}{if} (glyphs[i].codePoint != glyphs[i -\/ 1].codePoint + 1)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02119}02119         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02120}02120             storeU16 (rangeHeads, i);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02121}02121             rangeCount++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02122}02122             bmpRangeCount += glyphs[i].\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}} < 0xffff;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02123}02123         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02124}02124     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02125}02125     \mbox{\hyperlink{struct_buffer}{Buffer}} *cmap = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (256);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02126}02126     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}cmap"{}}, cmap);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02127}02127     \textcolor{comment}{// Format 4 table is always generated for compatibility.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02128}02128     \textcolor{keywordtype}{bool} hasFormat12 = glyphs[font-\/>glyphCount -\/ 1].\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}} > 0xffff;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02129}02129     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 0); \textcolor{comment}{// version}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02130}02130     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 1 + hasFormat12); \textcolor{comment}{// numTables}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02131}02131     \{ \textcolor{comment}{// encodingRecords[0]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02132}02132         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 3); \textcolor{comment}{// platformID}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02133}02133         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 1); \textcolor{comment}{// encodingID}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02134}02134         \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (cmap, 12 + 8 * hasFormat12); \textcolor{comment}{// subtableOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02135}02135     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02136}02136     \textcolor{keywordflow}{if} (hasFormat12) \textcolor{comment}{// encodingRecords[1]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02137}02137     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02138}02138         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 3); \textcolor{comment}{// platformID}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02139}02139         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 10); \textcolor{comment}{// encodingID}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02140}02140         \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (cmap, 36 + 8 * bmpRangeCount); \textcolor{comment}{// subtableOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02141}02141     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02142}02142     \textcolor{keyword}{const} uint\_least16\_t *ranges = getBufferHead (rangeHeads);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02143}02143     \textcolor{keyword}{const} uint\_least16\_t *\textcolor{keyword}{const} rangesEnd = getBufferTail (rangeHeads);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02144}02144     storeU16 (rangeHeads, font-\/>glyphCount);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02145}02145     \{ \textcolor{comment}{// format 4 table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02146}02146         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 4); \textcolor{comment}{// format}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02147}02147         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 16 + 8 * bmpRangeCount); \textcolor{comment}{// length}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02148}02148         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 0); \textcolor{comment}{// language}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02149}02149         \textcolor{keywordflow}{if} (bmpRangeCount * 2 > \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02150}02150             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Too many ranges in 'cmap' table."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02151}02151         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, bmpRangeCount * 2); \textcolor{comment}{// segCountX2}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02152}02152         uint\_fast16\_t searchRange = 1, entrySelector = -\/1;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02153}02153         \textcolor{keywordflow}{while} (searchRange <= bmpRangeCount)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02154}02154         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02155}02155             searchRange <<= 1;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02156}02156             entrySelector++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02157}02157         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02158}02158         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, searchRange); \textcolor{comment}{// searchRange}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02159}02159         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, entrySelector); \textcolor{comment}{// entrySelector}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02160}02160         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, bmpRangeCount * 2 -\/ searchRange); \textcolor{comment}{// rangeShift}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02161}02161         \{ \textcolor{comment}{// endCode[]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02162}02162             \textcolor{keyword}{const} uint\_least16\_t *p = ranges;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02163}02163             \textcolor{keywordflow}{for} (p++; p < rangesEnd \&\& glyphs[*p].\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}} < 0xffff; p++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02164}02164                 \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, glyphs[*p -\/ 1].codePoint);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02165}02165             uint\_fast32\_t cp = glyphs[*p -\/ 1].\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02166}02166             \textcolor{keywordflow}{if} (cp > 0xfffe)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02167}02167                 cp = 0xfffe;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02168}02168             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, cp);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02169}02169             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 0xffff);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02170}02170         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02171}02171         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 0); \textcolor{comment}{// reservedPad}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02172}02172         \{ \textcolor{comment}{// startCode[]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02173}02173             \textcolor{keywordflow}{for} (uint\_fast32\_t i = 0; i < bmpRangeCount -\/ 1; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02174}02174                 \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, glyphs[ranges[i]].codePoint);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02175}02175             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 0xffff);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02176}02176         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02177}02177         \{ \textcolor{comment}{// idDelta[]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02178}02178             \textcolor{keyword}{const} uint\_least16\_t *p = ranges;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02179}02179             \textcolor{keywordflow}{for} (; p < rangesEnd \&\& glyphs[*p].\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}} < 0xffff; p++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02180}02180                 \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, *p -\/ glyphs[*p].codePoint);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02181}02181             uint\_fast16\_t delta = 1;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02182}02182             \textcolor{keywordflow}{if} (p < rangesEnd \&\& *p == 0xffff)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02183}02183                 delta = *p -\/ glyphs[*p].\mbox{\hyperlink{struct_glyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02184}02184             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, delta);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02185}02185         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02186}02186         \{ \textcolor{comment}{// idRangeOffsets[]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02187}02187             \textcolor{keywordflow}{for} (uint\_least16\_t i = 0; i < bmpRangeCount; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02188}02188                 \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 0);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02189}02189         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02190}02190     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02191}02191     \textcolor{keywordflow}{if} (hasFormat12) \textcolor{comment}{// format 12 table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02192}02192     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02193}02193         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 12); \textcolor{comment}{// format}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02194}02194         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (cmap, 0); \textcolor{comment}{// reserved}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02195}02195         \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (cmap, 16 + 12 * rangeCount); \textcolor{comment}{// length}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02196}02196         \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (cmap, 0); \textcolor{comment}{// language}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02197}02197         \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (cmap, rangeCount); \textcolor{comment}{// numGroups}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02198}02198 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02199}02199         \textcolor{comment}{// groups[]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02200}02200         \textcolor{keywordflow}{for} (\textcolor{keyword}{const} uint\_least16\_t *p = ranges; p < rangesEnd; p++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02201}02201         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02202}02202             \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (cmap, glyphs[*p].codePoint); \textcolor{comment}{// startCharCode}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02203}02203             \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (cmap, glyphs[p[1] -\/ 1].codePoint); \textcolor{comment}{// endCharCode}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02204}02204             \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (cmap, *p); \textcolor{comment}{// startGlyphID}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02205}02205         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02206}02206     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02207}02207     \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (rangeHeads);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02208}02208 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02209}02209 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02210}02210 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02211}02211 \textcolor{comment}{    @brief Fill a "{}post"{} font table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02212}02212 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02213}02213 \textcolor{comment}{    The "{}post"{} table contains information for PostScript printers.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02214}02214 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02215}02215 \textcolor{comment}{    @param[in,out] font The Font struct to which to add the table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02216}02216 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02217}02217 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02218}\mbox{\hyperlink{hex2otf_8c_a0ddc03905c4918e04aa1e54a7c1716b1}{02218}} \mbox{\hyperlink{hex2otf_8c_a0ddc03905c4918e04aa1e54a7c1716b1}{fillPostTable}} (\mbox{\hyperlink{struct_font}{Font}} *font)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02219}02219 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02220}02220     \mbox{\hyperlink{struct_buffer}{Buffer}} *post = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (32);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02221}02221     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}post"{}}, post);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02222}02222     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (post, 0x00030000); \textcolor{comment}{// version = 3.0}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02223}02223     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (post, 0); \textcolor{comment}{// italicAngle}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02224}02224     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (post, 0); \textcolor{comment}{// underlinePosition}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02225}02225     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (post, 1); \textcolor{comment}{// underlineThickness}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02226}02226     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (post, 1); \textcolor{comment}{// isFixedPitch}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02227}02227     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (post, 0); \textcolor{comment}{// minMemType42}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02228}02228     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (post, 0); \textcolor{comment}{// maxMemType42}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02229}02229     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (post, 0); \textcolor{comment}{// minMemType1}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02230}02230     \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}} (post, 0); \textcolor{comment}{// maxMemType1}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02231}02231 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02232}02232 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02233}02233 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02234}02234 \textcolor{comment}{    @brief Fill a "{}GPOS"{} font table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02235}02235 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02236}02236 \textcolor{comment}{    The "{}GPOS"{} table contains information for glyph positioning.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02237}02237 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02238}02238 \textcolor{comment}{    @param[in,out] font The Font struct to which to add the table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02239}02239 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02240}02240 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02241}\mbox{\hyperlink{hex2otf_8c_a6c1e982fdc6c51b9f84051daa2e71936}{02241}} \mbox{\hyperlink{hex2otf_8c_a6c1e982fdc6c51b9f84051daa2e71936}{fillGposTable}} (\mbox{\hyperlink{struct_font}{Font}} *font)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02242}02242 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02243}02243     \mbox{\hyperlink{struct_buffer}{Buffer}} *gpos = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (16);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02244}02244     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}GPOS"{}}, gpos);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02245}02245     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gpos, 1); \textcolor{comment}{// majorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02246}02246     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gpos, 0); \textcolor{comment}{// minorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02247}02247     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gpos, 10); \textcolor{comment}{// scriptListOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02248}02248     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gpos, 12); \textcolor{comment}{// featureListOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02249}02249     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gpos, 14); \textcolor{comment}{// lookupListOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02250}02250     \{ \textcolor{comment}{// ScriptList table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02251}02251         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gpos, 0); \textcolor{comment}{// scriptCount}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02252}02252     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02253}02253     \{ \textcolor{comment}{// Feature List table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02254}02254         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gpos, 0); \textcolor{comment}{// featureCount}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02255}02255     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02256}02256     \{ \textcolor{comment}{// Lookup List Table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02257}02257         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gpos, 0); \textcolor{comment}{// lookupCount}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02258}02258     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02259}02259 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02260}02260 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02261}02261 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02262}02262 \textcolor{comment}{    @brief Fill a "{}GSUB"{} font table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02263}02263 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02264}02264 \textcolor{comment}{    The "{}GSUB"{} table contains information for glyph substitution.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02265}02265 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02266}02266 \textcolor{comment}{    @param[in,out] font The Font struct to which to add the table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02267}02267 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02268}02268 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02269}\mbox{\hyperlink{hex2otf_8c_a06b8121dea15c8117b7c951ffb22fb7e}{02269}} \mbox{\hyperlink{hex2otf_8c_a06b8121dea15c8117b7c951ffb22fb7e}{fillGsubTable}} (\mbox{\hyperlink{struct_font}{Font}} *font)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02270}02270 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02271}02271     \mbox{\hyperlink{struct_buffer}{Buffer}} *gsub = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (38);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02272}02272     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}GSUB"{}}, gsub);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02273}02273     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 1); \textcolor{comment}{// majorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02274}02274     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 0); \textcolor{comment}{// minorVersion}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02275}02275     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 10); \textcolor{comment}{// scriptListOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02276}02276     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 34); \textcolor{comment}{// featureListOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02277}02277     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 36); \textcolor{comment}{// lookupListOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02278}02278     \{ \textcolor{comment}{// ScriptList table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02279}02279         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 2); \textcolor{comment}{// scriptCount}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02280}02280         \{ \textcolor{comment}{// scriptRecords[0]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02281}02281             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (gsub, \textcolor{stringliteral}{"{}DFLT"{}}, 4); \textcolor{comment}{// scriptTag}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02282}02282             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 14); \textcolor{comment}{// scriptOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02283}02283         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02284}02284         \{ \textcolor{comment}{// scriptRecords[1]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02285}02285             \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}} (gsub, \textcolor{stringliteral}{"{}thai"{}}, 4); \textcolor{comment}{// scriptTag}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02286}02286             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 14); \textcolor{comment}{// scriptOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02287}02287         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02288}02288         \{ \textcolor{comment}{// Script table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02289}02289             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 4); \textcolor{comment}{// defaultLangSysOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02290}02290             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 0); \textcolor{comment}{// langSysCount}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02291}02291             \{ \textcolor{comment}{// Default Language System table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02292}02292                 \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 0); \textcolor{comment}{// lookupOrderOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02293}02293                 \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 0); \textcolor{comment}{// requiredFeatureIndex}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02294}02294                 \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 0); \textcolor{comment}{// featureIndexCount}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02295}02295             \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02296}02296         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02297}02297     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02298}02298     \{ \textcolor{comment}{// Feature List table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02299}02299         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 0); \textcolor{comment}{// featureCount}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02300}02300     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02301}02301     \{ \textcolor{comment}{// Lookup List Table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02302}02302         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (gsub, 0); \textcolor{comment}{// lookupCount}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02303}02303     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02304}02304 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02305}02305 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02306}02306 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02307}02307 \textcolor{comment}{    @brief Cache a string as a big-\/ending UTF-\/16 surrogate pair.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02308}02308 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02309}02309 \textcolor{comment}{    This function encodes a UTF-\/8 string as a big-\/endian UTF-\/16}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02310}02310 \textcolor{comment}{    surrogate pair.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02311}02311 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02312}02312 \textcolor{comment}{    @param[in,out] buf Pointer to a Buffer struct to update.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02313}02313 \textcolor{comment}{    @param[in] str The character array to encode.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02314}02314 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02315}02315 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02316}\mbox{\hyperlink{hex2otf_8c_a199befd98ef9ec0ee659d82609abded4}{02316}} \mbox{\hyperlink{hex2otf_8c_a199befd98ef9ec0ee659d82609abded4}{cacheStringAsUTF16BE}} (\mbox{\hyperlink{struct_buffer}{Buffer}} *buf, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *str)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02317}02317 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02318}02318     \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \textcolor{keywordtype}{char} *p = str; *p; p++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02319}02319     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02320}02320         \textcolor{keywordtype}{byte} c = *p;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02321}02321         \textcolor{keywordflow}{if} (c < 0x80)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02322}02322         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02323}02323             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (buf, c);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02324}02324             \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02325}02325         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02326}02326         \textcolor{keywordtype}{int} length = 1;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02327}02327         \textcolor{keywordtype}{byte} mask = 0x40;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02328}02328         \textcolor{keywordflow}{for} (; c \& mask; mask >>= 1)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02329}02329             length++;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02330}02330         \textcolor{keywordflow}{if} (length == 1 || length > 4)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02331}02331             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Ill-\/formed UTF-\/8 sequence."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02332}02332         uint\_fast32\_t codePoint = c \& (mask -\/ 1);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02333}02333         \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = 1; i < length; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02334}02334         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02335}02335             c = *++p;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02336}02336             \textcolor{keywordflow}{if} ((c \& 0xc0) != 0x80) \textcolor{comment}{// NUL checked here}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02337}02337                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Ill-\/formed UTF-\/8 sequence."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02338}02338             codePoint = (codePoint << 6) | (c \& 0x3f);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02339}02339         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02340}02340         \textcolor{keyword}{const} \textcolor{keywordtype}{int} lowerBits = length==2 ? 7 : length==3 ? 11 : 16;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02341}02341         \textcolor{keywordflow}{if} (codePoint >> lowerBits == 0)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02342}02342             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Ill-\/formed UTF-\/8 sequence."{}}); \textcolor{comment}{// sequence should be shorter}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02343}02343         \textcolor{keywordflow}{if} (codePoint >= 0xd800 \&\& codePoint <= 0xdfff)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02344}02344             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Ill-\/formed UTF-\/8 sequence."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02345}02345         \textcolor{keywordflow}{if} (codePoint > 0x10ffff)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02346}02346             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Ill-\/formed UTF-\/8 sequence."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02347}02347         \textcolor{keywordflow}{if} (codePoint > 0xffff)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02348}02348         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02349}02349             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (buf, 0xd800 | (codePoint -\/ 0x10000) >> 10);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02350}02350             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (buf, 0xdc00 | (codePoint \& 0x3ff));}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02351}02351         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02352}02352         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02353}02353             \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (buf, codePoint);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02354}02354     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02355}02355 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02356}02356 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02357}02357 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02358}02358 \textcolor{comment}{    @brief Fill a "{}name"{} font table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02359}02359 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02360}02360 \textcolor{comment}{    The "{}name"{} table contains name information, for example for Name IDs.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02361}02361 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02362}02362 \textcolor{comment}{    @param[in,out] font The Font struct to which to add the table.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02363}02363 \textcolor{comment}{    @param[in] names List of NameStrings.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02364}02364 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02365}02365 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02366}\mbox{\hyperlink{hex2otf_8c_a79d8a322be9d9131b684a9ea67abe05e}{02366}} \mbox{\hyperlink{hex2otf_8c_a79d8a322be9d9131b684a9ea67abe05e}{fillNameTable}} (\mbox{\hyperlink{struct_font}{Font}} *font, \mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{NameStrings}} nameStrings)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02367}02367 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02368}02368     \mbox{\hyperlink{struct_buffer}{Buffer}} *name = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (2048);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02369}02369     \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}} (font, \textcolor{stringliteral}{"{}name"{}}, name);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02370}02370     \textcolor{keywordtype}{size\_t} nameStringCount = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02371}02371     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{size\_t} i = 0; i < \mbox{\hyperlink{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}{MAX\_NAME\_IDS}}; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02372}02372         nameStringCount += !!nameStrings[i];}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02373}02373     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (name, 0); \textcolor{comment}{// version}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02374}02374     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (name, nameStringCount); \textcolor{comment}{// count}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02375}02375     \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (name, 2 * 3 + 12 * nameStringCount); \textcolor{comment}{// storageOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02376}02376     \mbox{\hyperlink{struct_buffer}{Buffer}} *stringData = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (1024);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02377}02377     \textcolor{comment}{// nameRecord[]}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02378}02378     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{size\_t} i = 0; i < \mbox{\hyperlink{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}{MAX\_NAME\_IDS}}; i++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02379}02379     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02380}02380         \textcolor{keywordflow}{if} (!nameStrings[i])}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02381}02381             \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02382}02382         \textcolor{keywordtype}{size\_t} offset = countBufferedBytes (stringData);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02383}02383         \mbox{\hyperlink{hex2otf_8c_a199befd98ef9ec0ee659d82609abded4}{cacheStringAsUTF16BE}} (stringData, nameStrings[i]);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02384}02384         \textcolor{keywordtype}{size\_t} length = countBufferedBytes (stringData) -\/ offset;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02385}02385         \textcolor{keywordflow}{if} (offset > \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}} || length > \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02386}02386             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Name strings are too long."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02387}02387         \textcolor{comment}{// Platform ID 0 (Unicode) is not well supported.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02388}02388         \textcolor{comment}{// ID 3 (Windows) seems to be the best for compatibility.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02389}02389         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (name, 3); \textcolor{comment}{// platformID = Windows}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02390}02390         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (name, 1); \textcolor{comment}{// encodingID = Unicode BMP}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02391}02391         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (name, 0x0409); \textcolor{comment}{// languageID = en-\/US}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02392}02392         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (name, i); \textcolor{comment}{// nameID}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02393}02393         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (name, length); \textcolor{comment}{// length}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02394}02394         \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}} (name, offset); \textcolor{comment}{// stringOffset}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02395}02395     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02396}02396     \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}} (name, stringData);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02397}02397     \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}} (stringData);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02398}02398 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02399}02399 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02400}02400 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02401}02401 \textcolor{comment}{    @brief Print program version string on stdout.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02402}02402 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02403}02403 \textcolor{comment}{    Print program version if invoked with the "{}-\/-\/version"{} option,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02404}02404 \textcolor{comment}{    and then exit successfully.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02405}02405 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02406}02406 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02407}\mbox{\hyperlink{hex2otf_8c_a9c4b081f1e1ad60def15811c71a936f2}{02407}} \mbox{\hyperlink{hex2otf_8c_a9c4b081f1e1ad60def15811c71a936f2}{printVersion}} () \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02408}02408     printf (\textcolor{stringliteral}{"{}hex2otf (GNU Unifont) \%s\(\backslash\)n"{}}, \mbox{\hyperlink{hex2otf_8c_a1c6d5de492ac61ad29aec7aa9a436bbf}{VERSION}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02409}02409     printf (\textcolor{stringliteral}{"{}Copyright \(\backslash\)u00A9 2022 \(\backslash\)u4F55\(\backslash\)u5FD7\(\backslash\)u7FD4 (He Zhixiang)\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02410}02410     printf (\textcolor{stringliteral}{"{}License GPLv2+: GNU GPL version 2 or later\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02411}02411     printf (\textcolor{stringliteral}{"{}<https://gnu.org/licenses/gpl.html>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02412}02412     printf (\textcolor{stringliteral}{"{}This is free software: you are free to change and\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02413}02413     printf (\textcolor{stringliteral}{"{}redistribute it.  There is NO WARRANTY, to the extent\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02414}02414     printf (\textcolor{stringliteral}{"{}permitted by law.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02415}02415 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02416}02416     exit (EXIT\_SUCCESS);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02417}02417 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02418}02418 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02419}02419 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02420}02420 \textcolor{comment}{    @brief Print help message to stdout and then exit.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02421}02421 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02422}02422 \textcolor{comment}{    Print help message if invoked with the "{}-\/-\/help"{} option,}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02423}02423 \textcolor{comment}{    and then exit successfully.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02424}02424 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02425}02425 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02426}\mbox{\hyperlink{hex2otf_8c_a0d20b69b0ad703df78459e1033d5c1d4}{02426}} \mbox{\hyperlink{hex2otf_8c_a0d20b69b0ad703df78459e1033d5c1d4}{printHelp}} () \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02427}02427     printf (\textcolor{stringliteral}{"{}Synopsis: hex2otf <options>:\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02428}02428     printf (\textcolor{stringliteral}{"{}    hex=<filename>        Specify Unifont .hex input file.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02429}02429     printf (\textcolor{stringliteral}{"{}    pos=<filename>        Specify combining file. (Optional)\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02430}02430     printf (\textcolor{stringliteral}{"{}    out=<filename>        Specify output font file.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02431}02431     printf (\textcolor{stringliteral}{"{}    format=<f1>,<f2>,...  Specify font format(s); values:\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02432}02432     printf (\textcolor{stringliteral}{"{}                             cff\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02433}02433     printf (\textcolor{stringliteral}{"{}                             cff2\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02434}02434     printf (\textcolor{stringliteral}{"{}                             truetype\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02435}02435     printf (\textcolor{stringliteral}{"{}                             blank\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02436}02436     printf (\textcolor{stringliteral}{"{}                             bitmap\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02437}02437     printf (\textcolor{stringliteral}{"{}                             gpos\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02438}02438     printf (\textcolor{stringliteral}{"{}                             gsub\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02439}02439     printf (\textcolor{stringliteral}{"{}\(\backslash\)nExample:\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02440}02440     printf (\textcolor{stringliteral}{"{}    hex2otf hex=Myfont.hex out=Myfont.otf format=cff\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02441}02441     printf (\textcolor{stringliteral}{"{}For more information, consult the hex2otf(1) man page.\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02442}02442 }
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02443}02443     exit (EXIT\_SUCCESS);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02444}02444 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02445}02445 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02446}02446 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02447}02447 \textcolor{comment}{   @brief Data structure to hold options for OpenType font output.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02448}02448 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02449}02449 \textcolor{comment}{   This data structure holds the status of options that can be}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02450}02450 \textcolor{comment}{   specified as command line arguments for creating the output}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02451}02451 \textcolor{comment}{   OpenType font file.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02452}02452 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02453}\mbox{\hyperlink{struct_options}{02453}} \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\mbox{\hyperlink{struct_options}{Options}}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02454}02454 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02455}02455     \textcolor{keywordtype}{bool} truetype, blankOutline, bitmap, gpos, gsub;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02456}02456     \textcolor{keywordtype}{int} cff; \textcolor{comment}{// 0 = no CFF outline; 1 = use 'CFF' table; 2 = use 'CFF2' table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02457}02457     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *hex, *pos, *out; \textcolor{comment}{// file names}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02458}02458     \mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{NameStrings}} nameStrings; \textcolor{comment}{// indexed directly by Name IDs}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02459}\mbox{\hyperlink{hex2otf_8c_a97fbabab590ac85657edb01474da7d50}{02459}} \} \mbox{\hyperlink{hex2otf_8c_a97fbabab590ac85657edb01474da7d50}{Options}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02460}02460 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02461}02461 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02462}02462 \textcolor{comment}{    @brief Match a command line option with its key for enabling.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02463}02463 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02464}02464 \textcolor{comment}{    @param[in] operand A pointer to the specified operand.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02465}02465 \textcolor{comment}{    @param[in] key Pointer to the option structure.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02466}02466 \textcolor{comment}{    @param[in] delimeter The delimiter to end searching.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02467}02467 \textcolor{comment}{    @return Pointer to the first character of the desired option.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02468}02468 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02469}02469 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02470}\mbox{\hyperlink{hex2otf_8c_af1d113ec0d790035476f2743cbf2696f}{02470}} \mbox{\hyperlink{hex2otf_8c_af1d113ec0d790035476f2743cbf2696f}{matchToken}} (\textcolor{keyword}{const} \textcolor{keywordtype}{char} *operand, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *key, \textcolor{keywordtype}{char} delimiter)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02471}02471 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02472}02472     \textcolor{keywordflow}{while} (*key)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02473}02473         \textcolor{keywordflow}{if} (*operand++ != *key++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02474}02474             \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02475}02475     \textcolor{keywordflow}{if} (!*operand || *operand++ == delimiter)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02476}02476         \textcolor{keywordflow}{return} operand;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02477}02477     \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02478}02478 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02479}02479 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02480}02480 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02481}02481 \textcolor{comment}{    @brief Parse command line options.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02482}02482 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02483}02483 \textcolor{comment}{        Option         Data Type      Description}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02484}02484 \textcolor{comment}{        -\/-\/-\/-\/-\/-\/         -\/-\/-\/-\/-\/-\/-\/-\/-\/      -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02485}02485 \textcolor{comment}{        truetype       bool           Generate TrueType outlines}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02486}02486 \textcolor{comment}{        blankOutline   bool           Generate blank outlines}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02487}02487 \textcolor{comment}{        bitmap         bool           Generate embedded bitmap}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02488}02488 \textcolor{comment}{        gpos           bool           Generate a dummy GPOS table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02489}02489 \textcolor{comment}{        gsub           bool           Generate a dummy GSUB table}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02490}02490 \textcolor{comment}{        cff            int            Generate CFF 1 or CFF 2 outlines}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02491}02491 \textcolor{comment}{        hex            const char *   Name of Unifont .hex file}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02492}02492 \textcolor{comment}{        pos            const char *   Name of Unifont combining data file}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02493}02493 \textcolor{comment}{        out            const char *   Name of output font file}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02494}02494 \textcolor{comment}{        nameStrings    NameStrings    Array of TrueType font Name IDs}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02495}02495 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02496}02496 \textcolor{comment}{    @param[in] argv Pointer to array of command line options.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02497}02497 \textcolor{comment}{    @return Data structure to hold requested command line options.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02498}02498 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02499}02499 \mbox{\hyperlink{struct_options}{Options}}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02500}\mbox{\hyperlink{hex2otf_8c_ac2eec01939cae967aa9882b2517288a1}{02500}} \mbox{\hyperlink{hex2otf_8c_ac2eec01939cae967aa9882b2517288a1}{parseOptions}} (\textcolor{keywordtype}{char} *\textcolor{keyword}{const} argv[\textcolor{keyword}{const}])}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02501}02501 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02502}02502     \mbox{\hyperlink{struct_options}{Options}} opt = \{0\}; \textcolor{comment}{// all options default to 0, false and NULL}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02503}02503     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *format = NULL;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02504}02504     \textcolor{keyword}{struct }StringArg}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02505}02505     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02506}02506         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\textcolor{keyword}{const} key;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02507}02507         \textcolor{keyword}{const} \textcolor{keywordtype}{char} **\textcolor{keyword}{const} value;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02508}02508     \} strArgs[] =}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02509}02509     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02510}02510         \{\textcolor{stringliteral}{"{}hex"{}}, \&opt.hex\},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02511}02511         \{\textcolor{stringliteral}{"{}pos"{}}, \&opt.pos\},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02512}02512         \{\textcolor{stringliteral}{"{}out"{}}, \&opt.out\},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02513}02513         \{\textcolor{stringliteral}{"{}format"{}}, \&format\},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02514}02514         \{NULL, NULL\} \textcolor{comment}{// sentinel}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02515}02515     \};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02516}02516     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{char} *\textcolor{keyword}{const} *argp = argv + 1; *argp; argp++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02517}02517     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02518}02518         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\textcolor{keyword}{const} arg = *argp;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02519}02519         \textcolor{keyword}{struct }StringArg *p;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02520}02520         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *value = NULL;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02521}02521         \textcolor{keywordflow}{if} (strcmp (arg, \textcolor{stringliteral}{"{}-\/-\/help"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02522}02522             \mbox{\hyperlink{hex2otf_8c_a0d20b69b0ad703df78459e1033d5c1d4}{printHelp}} ();}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02523}02523         \textcolor{keywordflow}{if} (strcmp (arg, \textcolor{stringliteral}{"{}-\/-\/version"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02524}02524             \mbox{\hyperlink{hex2otf_8c_a9c4b081f1e1ad60def15811c71a936f2}{printVersion}} ();}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02525}02525         \textcolor{keywordflow}{for} (p = strArgs; p-\/>key; p++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02526}02526             \textcolor{keywordflow}{if} ((value = \mbox{\hyperlink{hex2otf_8c_af1d113ec0d790035476f2743cbf2696f}{matchToken}} (arg, p-\/>key, \textcolor{charliteral}{'='})))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02527}02527                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02528}02528         \textcolor{keywordflow}{if} (p-\/>key)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02529}02529         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02530}02530             \textcolor{keywordflow}{if} (!*value)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02531}02531                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Empty argument: '\%s'."{}}, p-\/>key);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02532}02532             \textcolor{keywordflow}{if} (*p-\/>value)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02533}02533                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Duplicate argument: '\%s'."{}}, p-\/>key);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02534}02534             *p-\/>value = value;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02535}02535         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02536}02536         \textcolor{keywordflow}{else} \textcolor{comment}{// shall be a name string}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02537}02537         \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02538}02538             \textcolor{keywordtype}{char} *endptr;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02539}02539             \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \textcolor{keywordtype}{id} = strtoul (arg, \&endptr, 10);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02540}02540             \textcolor{keywordflow}{if} (endptr == arg || \textcolor{keywordtype}{id} >= \mbox{\hyperlink{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}{MAX\_NAME\_IDS}} || *endptr != \textcolor{charliteral}{'='})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02541}02541                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Invalid argument: '\%s'."{}}, arg);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02542}02542             endptr++; \textcolor{comment}{// skip '='}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02543}02543             \textcolor{keywordflow}{if} (opt.nameStrings[\textcolor{keywordtype}{id}])}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02544}02544                 \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Duplicate name ID: \%lu."{}}, \textcolor{keywordtype}{id});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02545}02545             opt.nameStrings[id] = endptr;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02546}02546         \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02547}02547     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02548}02548     \textcolor{keywordflow}{if} (!opt.hex)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02549}02549         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Hex file is not specified."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02550}02550     \textcolor{keywordflow}{if} (opt.pos \&\& opt.pos[0] == \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02551}02551         opt.pos = NULL; \textcolor{comment}{// Position file is optional. Empty path means none.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02552}02552     \textcolor{keywordflow}{if} (!opt.out)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02553}02553         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Output file is not specified."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02554}02554     \textcolor{keywordflow}{if} (!format)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02555}02555         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Format is not specified."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02556}02556     \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{struct_name_pair}{NamePair}} *p = \mbox{\hyperlink{hex2otf_8h_a7932112a8cd522740aa941c15b79bd16}{defaultNames}}; p-\/>str; p++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02557}02557         \textcolor{keywordflow}{if} (!opt.nameStrings[p-\/>id])}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02558}02558             opt.nameStrings[p-\/>id] = p-\/>str;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02559}02559     \textcolor{keywordtype}{bool} cff = \textcolor{keyword}{false}, cff2 = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02560}02560     \textcolor{keyword}{struct }Symbol}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02561}02561     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02562}02562         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\textcolor{keyword}{const} key;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02563}02563         \textcolor{keywordtype}{bool} *\textcolor{keyword}{const} found;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02564}02564     \} symbols[] =}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02565}02565     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02566}02566         \{\textcolor{stringliteral}{"{}cff"{}}, \&cff\},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02567}02567         \{\textcolor{stringliteral}{"{}cff2"{}}, \&cff2\},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02568}02568         \{\textcolor{stringliteral}{"{}truetype"{}}, \&opt.truetype\},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02569}02569         \{\textcolor{stringliteral}{"{}blank"{}}, \&opt.blankOutline\},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02570}02570         \{\textcolor{stringliteral}{"{}bitmap"{}}, \&opt.bitmap\},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02571}02571         \{\textcolor{stringliteral}{"{}gpos"{}}, \&opt.gpos\},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02572}02572         \{\textcolor{stringliteral}{"{}gsub"{}}, \&opt.gsub\},}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02573}02573         \{NULL, NULL\} \textcolor{comment}{// sentinel}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02574}02574     \};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02575}02575     \textcolor{keywordflow}{while} (*format)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02576}02576     \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02577}02577         \textcolor{keyword}{const} \textcolor{keyword}{struct }Symbol *p;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02578}02578         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *next = NULL;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02579}02579         \textcolor{keywordflow}{for} (p = symbols; p-\/>key; p++)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02580}02580             \textcolor{keywordflow}{if} ((next = \mbox{\hyperlink{hex2otf_8c_af1d113ec0d790035476f2743cbf2696f}{matchToken}} (format, p-\/>key, \textcolor{charliteral}{','})))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02581}02581                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02582}02582         \textcolor{keywordflow}{if} (!p-\/>key)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02583}02583             \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Invalid format."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02584}02584         *p-\/>found = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02585}02585         format = next;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02586}02586     \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02587}02587     \textcolor{keywordflow}{if} (cff + cff2 + opt.truetype + opt.blankOutline > 1)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02588}02588         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}At most one outline format can be accepted."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02589}02589     \textcolor{keywordflow}{if} (!(cff || cff2 || opt.truetype || opt.bitmap))}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02590}02590         \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (\textcolor{stringliteral}{"{}Invalid format."{}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02591}02591     opt.cff = cff + cff2 * 2;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02592}02592     \textcolor{keywordflow}{return} opt;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02593}02593 \}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02594}02594 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02595}02595 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02596}02596 \textcolor{comment}{   @brief The main function.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02597}02597 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02598}02598 \textcolor{comment}{   @param[in] argc The number of command-\/line arguments.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02599}02599 \textcolor{comment}{   @param[in] argv The array of command-\/line arguments.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02600}02600 \textcolor{comment}{   @return EXIT\_FAILURE upon fatal error, EXIT\_SUCCESS otherwise.}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02601}02601 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02602}02602 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02603}\mbox{\hyperlink{hex2otf_8c_a0ddf1224851353fc92bfbff6f499fa97}{02603}} \mbox{\hyperlink{hex2otf_8c_a0ddf1224851353fc92bfbff6f499fa97}{main}} (\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} *argv[])}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02604}02604 \{}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02605}02605     \mbox{\hyperlink{hex2otf_8c_a4cebe6a72365812b5f392f4db9dc5db5}{initBuffers}} (16);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02606}02606     atexit (\mbox{\hyperlink{hex2otf_8c_ac947cbe076da5fbab8f5e4c1c821b7a6}{cleanBuffers}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02607}02607     \mbox{\hyperlink{struct_options}{Options}} opt = \mbox{\hyperlink{hex2otf_8c_ac2eec01939cae967aa9882b2517288a1}{parseOptions}} (argv);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02608}02608     \mbox{\hyperlink{struct_font}{Font}} font;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02609}02609     font.tables = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (\textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct_table}{Table}}) * 16);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02610}02610     font.glyphs = \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}} (\textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct_glyph}{Glyph}}) * \mbox{\hyperlink{hex2otf_8c_a1a1d1da8a5f6da54d749399b173c9bfc}{MAX\_GLYPHS}});}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02611}02611     \mbox{\hyperlink{hex2otf_8c_ad77c441582f862d494a734eb9855dd41}{readGlyphs}} (\&font, opt.hex);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02612}02612     \mbox{\hyperlink{hex2otf_8c_a77ff68152c5cb38605010bc7621b0722}{sortGlyphs}} (\&font);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02613}02613     \textcolor{keyword}{enum} \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}{LocaFormat}} loca = \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaa9c5871c30feb10df049d99bd703dfda4}{LOCA\_OFFSET16}};}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02614}02614     uint\_fast16\_t maxPoints = 0, maxContours = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02615}02615     \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}} xMin = 0;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02616}02616     \textcolor{keywordflow}{if} (opt.pos)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02617}02617         \mbox{\hyperlink{hex2otf_8c_af3ba1ba33ebe63ba0340842b7f83021c}{positionGlyphs}} (\&font, opt.pos, \&xMin);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02618}02618     \textcolor{keywordflow}{if} (opt.gpos)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02619}02619         \mbox{\hyperlink{hex2otf_8c_a6c1e982fdc6c51b9f84051daa2e71936}{fillGposTable}} (\&font);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02620}02620     \textcolor{keywordflow}{if} (opt.gsub)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02621}02621         \mbox{\hyperlink{hex2otf_8c_a06b8121dea15c8117b7c951ffb22fb7e}{fillGsubTable}} (\&font);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02622}02622     \textcolor{keywordflow}{if} (opt.cff)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02623}02623         \mbox{\hyperlink{hex2otf_8c_a3d62aa29f94c3fa78ca4438739d64a62}{fillCFF}} (\&font, opt.cff, opt.nameStrings);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02624}02624     \textcolor{keywordflow}{if} (opt.truetype)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02625}02625         \mbox{\hyperlink{hex2otf_8c_a326e4fa86eb32bb18e37eab8f495bd2f}{fillTrueType}} (\&font, \&loca, \&maxPoints, \&maxContours);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02626}02626     \textcolor{keywordflow}{if} (opt.blankOutline)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02627}02627         \mbox{\hyperlink{hex2otf_8c_ab37b4f7111692f8d1163bafd2aab831e}{fillBlankOutline}} (\&font);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02628}02628     \textcolor{keywordflow}{if} (opt.bitmap)}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02629}02629         \mbox{\hyperlink{hex2otf_8c_afd499a24ff34cb5c19b52df795422c12}{fillBitmap}} (\&font);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02630}02630     \mbox{\hyperlink{hex2otf_8c_a4ac0c02117b703a71bee3dd34e2eb306}{fillHeadTable}} (\&font, loca, xMin);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02631}02631     \mbox{\hyperlink{hex2otf_8c_a28e889c3a36007c2e5d50a498046a6c6}{fillHheaTable}} (\&font, xMin);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02632}02632     \mbox{\hyperlink{hex2otf_8c_aff4f28ce178c84c7365245ec10034433}{fillMaxpTable}} (\&font, opt.cff, maxPoints, maxContours);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02633}02633     \mbox{\hyperlink{hex2otf_8c_ab6e3bb110dc3e55193c344cb7b56e328}{fillOS2Table}} (\&font);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02634}02634     \mbox{\hyperlink{hex2otf_8c_a79d8a322be9d9131b684a9ea67abe05e}{fillNameTable}} (\&font, opt.nameStrings);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02635}02635     \mbox{\hyperlink{hex2otf_8c_a97c9b2ae58f5989d68e639715c3f9df9}{fillHmtxTable}} (\&font);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02636}02636     \mbox{\hyperlink{hex2otf_8c_a6362601eb41d051a103a1d9edcd4f284}{fillCmapTable}} (\&font);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02637}02637     \mbox{\hyperlink{hex2otf_8c_a0ddc03905c4918e04aa1e54a7c1716b1}{fillPostTable}} (\&font);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02638}02638     \mbox{\hyperlink{hex2otf_8c_a049e485562f7f4dfe978c4146ad225b8}{organizeTables}} (\&font, opt.cff);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02639}02639     \mbox{\hyperlink{hex2otf_8c_a074562f0527ff6db8b1b956b9356a315}{writeFont}} (\&font, opt.cff, opt.out);}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02640}02640     \textcolor{keywordflow}{return} EXIT\_SUCCESS;}
\DoxyCodeLine{\Hypertarget{hex2otf_8c_source_l02641}02641 \}}

\end{DoxyCode}
