\hypertarget{hex2otf_8c}{}\doxysection{src/hex2otf.c File Reference}
\label{hex2otf_8c}\index{src/hex2otf.c@{src/hex2otf.c}}


hex2otf -\/ Convert GNU Unifont .hex file to Open\+Type font  


{\ttfamily \#include $<$assert.\+h$>$}\newline
{\ttfamily \#include $<$ctype.\+h$>$}\newline
{\ttfamily \#include $<$inttypes.\+h$>$}\newline
{\ttfamily \#include $<$stdarg.\+h$>$}\newline
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$stddef.\+h$>$}\newline
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include \char`\"{}hex2otf.\+h\char`\"{}}\newline
Include dependency graph for hex2otf.\+c\+:
% FIG 0
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structBuffer}{Buffer}}
\begin{DoxyCompactList}\small\item\em Generic data structure for a linked list of buffer elements. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structGlyph}{Glyph}}
\begin{DoxyCompactList}\small\item\em Data structure to hold data for one bitmap glyph. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structFont}{Font}}
\begin{DoxyCompactList}\small\item\em Data structure to hold information for one font. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structTable}{Table}}
\begin{DoxyCompactList}\small\item\em Data structure for an Open\+Type table. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structTableRecord}{Table\+Record}}
\begin{DoxyCompactList}\small\item\em Data structure for data associated with one Open\+Type table. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structOptions}{Options}}
\begin{DoxyCompactList}\small\item\em Data structure to hold options for Open\+Type font output. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{hex2otf_8c_a1c6d5de492ac61ad29aec7aa9a436bbf}{VERSION}}~\char`\"{}1.\+0.\+1\char`\"{}
\begin{DoxyCompactList}\small\item\em Program version, for \char`\"{}-\/-\/version\char`\"{} option. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16\+MAX}}~0xffff
\begin{DoxyCompactList}\small\item\em Maximum UTF-\/16 code point value. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a7ccab01e56208030185cefdca13e0ac8}{U32\+MAX}}~0xffffffff
\begin{DoxyCompactList}\small\item\em Maximum UTF-\/32 code point value. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_af25acbe53b9070c1400a04c9231691bb}{PRI\+\_\+\+CP}}~\char`\"{}U+\%.\+4\char`\"{}PRIXFAST32
\begin{DoxyCompactList}\small\item\em Format string to print Unicode code point. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_abce67139ad0bc979ef080a694e60fb36}{static\+\_\+assert}}(a,  b)~(assert(a))
\begin{DoxyCompactList}\small\item\em If \char`\"{}a\char`\"{} is true, return string \char`\"{}b\char`\"{}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}}(shift,  x)~((uintmax\+\_\+t)(!!(x)) $<$$<$ (shift))
\begin{DoxyCompactList}\small\item\em Truncate \& shift word. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}(shift)~\mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}}((shift), 0)
\begin{DoxyCompactList}\small\item\em Clear a given bit in a word. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}}(shift)~\mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}}((shift), 1)
\begin{DoxyCompactList}\small\item\em Set a given bit in a word. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a688a4772d61221e9378e5003da51265a}{GLYPH\+\_\+\+MAX\+\_\+\+WIDTH}}~16
\begin{DoxyCompactList}\small\item\em Maximum glyph width, in pixels. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\+\_\+\+HEIGHT}}~16
\begin{DoxyCompactList}\small\item\em Maximum glyph height, in pixels. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_ad0f95bf4a3a4a28b173b971e246b8745}{GLYPH\+\_\+\+MAX\+\_\+\+BYTE\+\_\+\+COUNT}}~(\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\+\_\+\+HEIGHT}} $\ast$ \mbox{\hyperlink{hex2otf_8c_a688a4772d61221e9378e5003da51265a}{GLYPH\+\_\+\+MAX\+\_\+\+WIDTH}} / 8)
\begin{DoxyCompactList}\small\item\em Number of bytes to represent one bitmap glyph as a binary array. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}}~2
\begin{DoxyCompactList}\small\item\em Count of pixels below baseline. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}}~(\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\+\_\+\+HEIGHT}} -\/ \mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}})
\begin{DoxyCompactList}\small\item\em Count of pixels above baseline. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a652fd701381105d0d34ca4084cca413c}{FUPEM}}~64
\begin{DoxyCompactList}\small\item\em \mbox{\hyperlink{structFont}{Font}} units per em. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a1a1d1da8a5f6da54d749399b173c9bfc}{MAX\+\_\+\+GLYPHS}}~65536
\begin{DoxyCompactList}\small\item\em An Open\+Type font has at most 65536 glyphs. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}{MAX\+\_\+\+NAME\+\_\+\+IDS}}~256
\begin{DoxyCompactList}\small\item\em Name IDs 0-\/255 are used for standard names. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}(x)~((x) $\ast$ \mbox{\hyperlink{hex2otf_8c_a652fd701381105d0d34ca4084cca413c}{FUPEM}} / \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\+\_\+\+HEIGHT}})
\begin{DoxyCompactList}\small\item\em Convert pixels to font units. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a79e768c38f3b21419f01d2d1347523be}{PW}}(x)~((x) / (\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\+\_\+\+HEIGHT}} / 8))
\begin{DoxyCompactList}\small\item\em Convert glyph byte count to pixel width. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a0e5f5e7d04aec261ae28e2fca801194c}{define\+Store}}(name,  type)
\begin{DoxyCompactList}\small\item\em Temporary define to look up an element in an array of given type. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{hex2otf_8c_a23781d23f31cfbcaf33e86e10d7cce50}{add\+Byte}}(shift)
\item 
\mbox{\Hypertarget{hex2otf_8c_a557b26ae24c6df65878422040be2e922}\label{hex2otf_8c_a557b26ae24c6df65878422040be2e922}} 
\#define {\bfseries get\+Row\+Bit}(rows,  x,  y)~((rows)\mbox{[}(y)\mbox{]} \&  x0 $>$$>$ (x))
\item 
\mbox{\Hypertarget{hex2otf_8c_aa51bea432733981a06404c5f029108f7}\label{hex2otf_8c_aa51bea432733981a06404c5f029108f7}} 
\#define {\bfseries flip\+Row\+Bit}(rows,  x,  y)~((rows)\mbox{[}(y)\mbox{]} $^\wedge$= x0 $>$$>$ (x))
\item 
\mbox{\Hypertarget{hex2otf_8c_a13f8122753a7298916b3dddc2acb389a}\label{hex2otf_8c_a13f8122753a7298916b3dddc2acb389a}} 
\#define {\bfseries string\+Count}~(sizeof strings / sizeof $\ast$strings)
\item 
\mbox{\Hypertarget{hex2otf_8c_a3aa464534b439904ec3a91db5fd313a0}\label{hex2otf_8c_a3aa464534b439904ec3a91db5fd313a0}} 
\#define {\bfseries cache\+CFF32}(buf,  x)~(\mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cache\+U8}} ((buf), 29), \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cache\+U32}} ((buf), (x)))
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef unsigned char \mbox{\hyperlink{hex2otf_8c_a0c8186d9b9b7880309c27230bbb5e69d}{byte}}
\begin{DoxyCompactList}\small\item\em Definition of \char`\"{}byte\char`\"{} type as an unsigned char. \end{DoxyCompactList}\item 
typedef int\+\_\+least8\+\_\+t \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\+\_\+t}}
\begin{DoxyCompactList}\small\item\em This type must be able to represent max(\+GLYPH\+\_\+\+MAX\+\_\+\+WIDTH, GLYPH\+\_\+\+HEIGHT). \end{DoxyCompactList}\item 
typedef struct \mbox{\hyperlink{structBuffer}{Buffer}} \mbox{\hyperlink{hex2otf_8c_a7feadaf37f40473cfc76921f8754c0f7}{Buffer}}
\begin{DoxyCompactList}\small\item\em Generic data structure for a linked list of buffer elements. \end{DoxyCompactList}\item 
typedef const char $\ast$ \mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{Name\+Strings}}\mbox{[}\mbox{\hyperlink{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}{MAX\+\_\+\+NAME\+\_\+\+IDS}}\mbox{]}
\begin{DoxyCompactList}\small\item\em Array of Open\+Type names indexed directly by Name IDs. \end{DoxyCompactList}\item 
typedef struct \mbox{\hyperlink{structGlyph}{Glyph}} \mbox{\hyperlink{hex2otf_8c_a8ac383e879c9d7d9af6005444970c837}{Glyph}}
\begin{DoxyCompactList}\small\item\em Data structure to hold data for one bitmap glyph. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{hex2otf_8c_a6793c760667fe6bf1481f61567954c12}\label{hex2otf_8c_a6793c760667fe6bf1481f61567954c12}} 
typedef struct \mbox{\hyperlink{structFont}{Font}} {\bfseries Font}
\begin{DoxyCompactList}\small\item\em Data structure to hold information for one font. \end{DoxyCompactList}\item 
typedef struct \mbox{\hyperlink{structTable}{Table}} \mbox{\hyperlink{hex2otf_8c_aaa5713bb2ecdf81c430009179b806232}{Table}}
\begin{DoxyCompactList}\small\item\em Data structure for an Open\+Type table. \end{DoxyCompactList}\item 
typedef struct \mbox{\hyperlink{structOptions}{Options}} \mbox{\hyperlink{hex2otf_8c_a97fbabab590ac85657edb01474da7d50}{Options}}
\begin{DoxyCompactList}\small\item\em Data structure to hold options for Open\+Type font output. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}{Loca\+Format}} \{ \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaa9c5871c30feb10df049d99bd703dfda4}{LOCA\+\_\+\+OFFSET16}} = 0
, \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaad5e47b5a6bbf31be31e9b1328e7beef8}{LOCA\+\_\+\+OFFSET32}} = 1
 \}
\begin{DoxyCompactList}\small\item\em Index to Location (\char`\"{}loca\char`\"{}) offset information. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38}{Contour\+Op}} \{ \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}{OP\+\_\+\+CLOSE}}
, \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a01f5371958d06ab1411c46f72f049f45}{OP\+\_\+\+POINT}}
 \}
\begin{DoxyCompactList}\small\item\em Specify the current contour drawing operation. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8c}{Fill\+Side}} \{ \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8caf18243d8ef6a7f601ae03a6cffbabadd}{FILL\+\_\+\+LEFT}}
, \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8ca0bbdc63e5d0938274b80230bc55d03b8}{FILL\+\_\+\+RIGHT}}
 \}
\begin{DoxyCompactList}\small\item\em Fill to the left side (CFF) or right side (True\+Type) of a contour. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}} (const char $\ast$reason,...)
\begin{DoxyCompactList}\small\item\em Print an error message on stderr, then exit. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a4cebe6a72365812b5f392f4db9dc5db5}{init\+Buffers}} (size\+\_\+t count)
\begin{DoxyCompactList}\small\item\em Initialize an array of buffer pointers to all zeroes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_ac947cbe076da5fbab8f5e4c1c821b7a6}{clean\+Buffers}} ()
\begin{DoxyCompactList}\small\item\em Free all allocated buffer pointers. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{new\+Buffer}} (size\+\_\+t initial\+Capacity)
\begin{DoxyCompactList}\small\item\em Create a new buffer. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}{ensure\+Buffer}} (\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$buf, size\+\_\+t needed)
\begin{DoxyCompactList}\small\item\em Ensure that the buffer has at least the specified minimum size. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{free\+Buffer}} (\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$buf)
\begin{DoxyCompactList}\small\item\em Free the memory previously allocated for a buffer. \end{DoxyCompactList}\item 
\mbox{\hyperlink{hex2otf_8c_a4580a6e8cc566504bc2b852272c9434e}{define\+Store}} (store\+U8, uint\+\_\+least8\+\_\+t)
\item 
void \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cache\+U8}} (\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$buf, uint\+\_\+fast8\+\_\+t value)
\begin{DoxyCompactList}\small\item\em Append one unsigned byte to the end of a byte array. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cache\+U16}} (\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$buf, uint\+\_\+fast16\+\_\+t value)
\begin{DoxyCompactList}\small\item\em Append two unsigned bytes to the end of a byte array. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cache\+U32}} (\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$buf, uint\+\_\+fast32\+\_\+t value)
\begin{DoxyCompactList}\small\item\em Append four unsigned bytes to the end of a byte array. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cache\+CFFOperand}} (\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$buf, int\+\_\+fast32\+\_\+t value)
\begin{DoxyCompactList}\small\item\em Cache charstring number encoding in a CFF buffer. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}{cache\+Zeros}} (\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$buf, size\+\_\+t count)
\begin{DoxyCompactList}\small\item\em Append 1 to 4 bytes of zeroes to a buffer, for padding. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cache\+Bytes}} (\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$restrict buf, const void $\ast$restrict src, size\+\_\+t count)
\begin{DoxyCompactList}\small\item\em Append a string of bytes to a buffer. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cache\+Buffer}} (\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$restrict buf\+Dest, const \mbox{\hyperlink{structBuffer}{Buffer}} $\ast$restrict buf\+Src)
\begin{DoxyCompactList}\small\item\em Append bytes of a table to a byte buffer. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}{write\+Bytes}} (const \mbox{\hyperlink{hex2otf_8c_a0c8186d9b9b7880309c27230bbb5e69d}{byte}} bytes\mbox{[}$\,$\mbox{]}, size\+\_\+t count, FILE $\ast$file)
\begin{DoxyCompactList}\small\item\em Write an array of bytes to an output file. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}{write\+U16}} (uint\+\_\+fast16\+\_\+t value, FILE $\ast$file)
\begin{DoxyCompactList}\small\item\em Write an unsigned 16-\/bit value to an output file. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{write\+U32}} (uint\+\_\+fast32\+\_\+t value, FILE $\ast$file)
\begin{DoxyCompactList}\small\item\em Write an unsigned 32-\/bit value to an output file. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{add\+Table}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font, const char tag\mbox{[}static 4\mbox{]}, \mbox{\hyperlink{structBuffer}{Buffer}} $\ast$content)
\begin{DoxyCompactList}\small\item\em Add a True\+Type or Open\+Type table to the font. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a049e485562f7f4dfe978c4146ad225b8}{organize\+Tables}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font, bool is\+CFF)
\begin{DoxyCompactList}\small\item\em Sort tables according to Open\+Type recommendations. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{hex2otf_8c_af1223f39e8627e0a3b0b7b533e6d0b64}{by\+Table\+Tag}} (const void $\ast$a, const void $\ast$b)
\begin{DoxyCompactList}\small\item\em Compare tables by 4-\/byte unsigned table tag value. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a074562f0527ff6db8b1b956b9356a315}{write\+Font}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font, bool is\+CFF, const char $\ast$file\+Name)
\begin{DoxyCompactList}\small\item\em Write Open\+Type font to output file. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{hex2otf_8c_ae28f2f636e4d3dd3b5784a3bc3f92b58}{read\+Code\+Point}} (uint\+\_\+fast32\+\_\+t $\ast$code\+Point, const char $\ast$file\+Name, FILE $\ast$file)
\begin{DoxyCompactList}\small\item\em Read up to 6 hexadecimal digits and a colon from file. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_ad77c441582f862d494a734eb9855dd41}{read\+Glyphs}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font, const char $\ast$file\+Name)
\begin{DoxyCompactList}\small\item\em Read glyph definitions from a Unifont .hex format file. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{hex2otf_8c_a0d187cc87528ef35478afd7a68309f08}{by\+Code\+Point}} (const void $\ast$a, const void $\ast$b)
\begin{DoxyCompactList}\small\item\em Compare two Unicode code points to determine which is greater. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_af3ba1ba33ebe63ba0340842b7f83021c}{position\+Glyphs}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font, const char $\ast$file\+Name, \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\+\_\+t}} $\ast$x\+Min)
\begin{DoxyCompactList}\small\item\em Position a glyph within a 16-\/by-\/16 pixel bounding box. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a77ff68152c5cb38605010bc7621b0722}{sort\+Glyphs}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font)
\begin{DoxyCompactList}\small\item\em Sort the glyphs in a font by Unicode code point. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a5af7c9bcfd40e5b11f9d12c40966bb65}{build\+Outline}} (\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$result, const \mbox{\hyperlink{hex2otf_8c_a0c8186d9b9b7880309c27230bbb5e69d}{byte}} bitmap\mbox{[}$\,$\mbox{]}, const size\+\_\+t byte\+Count, const enum \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8c}{Fill\+Side}} fill\+Side)
\begin{DoxyCompactList}\small\item\em Build a glyph outline. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a97af00050b8fd6b7e7b81c7027e4c8e6}{prepare\+Offsets}} (size\+\_\+t $\ast$sizes)
\begin{DoxyCompactList}\small\item\em Prepare 32-\/bit glyph offsets in a font table. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$ \mbox{\hyperlink{hex2otf_8c_aa52cd46a50cdc2040a72e5c7ecfa944b}{prepare\+String\+Index}} (const \mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{Name\+Strings}} names)
\begin{DoxyCompactList}\small\item\em Prepare a font name string index. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a3d62aa29f94c3fa78ca4438739d64a62}{fill\+CFF}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font, int version, const \mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{Name\+Strings}} names)
\begin{DoxyCompactList}\small\item\em Add a CFF table to a font. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a326e4fa86eb32bb18e37eab8f495bd2f}{fill\+True\+Type}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font, enum \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}{Loca\+Format}} $\ast$format, uint\+\_\+fast16\+\_\+t $\ast$max\+Points, uint\+\_\+fast16\+\_\+t $\ast$max\+Contours)
\begin{DoxyCompactList}\small\item\em Add a True\+Type table to a font. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_ab37b4f7111692f8d1163bafd2aab831e}{fill\+Blank\+Outline}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font)
\begin{DoxyCompactList}\small\item\em Create a dummy blank outline in a font table. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_afd499a24ff34cb5c19b52df795422c12}{fill\+Bitmap}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font)
\begin{DoxyCompactList}\small\item\em Fill Open\+Type bitmap data and location tables. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a4ac0c02117b703a71bee3dd34e2eb306}{fill\+Head\+Table}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font, enum \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}{Loca\+Format}} loca\+Format, \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\+\_\+t}} x\+Min)
\begin{DoxyCompactList}\small\item\em Fill a \char`\"{}head\char`\"{} font table. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a28e889c3a36007c2e5d50a498046a6c6}{fill\+Hhea\+Table}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font, \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\+\_\+t}} x\+Min)
\begin{DoxyCompactList}\small\item\em Fill a \char`\"{}hhea\char`\"{} font table. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_aff4f28ce178c84c7365245ec10034433}{fill\+Maxp\+Table}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font, bool is\+CFF, uint\+\_\+fast16\+\_\+t max\+Points, uint\+\_\+fast16\+\_\+t max\+Contours)
\begin{DoxyCompactList}\small\item\em Fill a \char`\"{}maxp\char`\"{} font table. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_ab6e3bb110dc3e55193c344cb7b56e328}{fill\+OS2\+Table}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font)
\begin{DoxyCompactList}\small\item\em Fill an \char`\"{}\+OS/2\char`\"{} font table. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a97c9b2ae58f5989d68e639715c3f9df9}{fill\+Hmtx\+Table}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font)
\begin{DoxyCompactList}\small\item\em Fill an \char`\"{}hmtx\char`\"{} font table. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a6362601eb41d051a103a1d9edcd4f284}{fill\+Cmap\+Table}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font)
\begin{DoxyCompactList}\small\item\em Fill a \char`\"{}cmap\char`\"{} font table. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a0ddc03905c4918e04aa1e54a7c1716b1}{fill\+Post\+Table}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font)
\begin{DoxyCompactList}\small\item\em Fill a \char`\"{}post\char`\"{} font table. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a6c1e982fdc6c51b9f84051daa2e71936}{fill\+Gpos\+Table}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font)
\begin{DoxyCompactList}\small\item\em Fill a \char`\"{}\+GPOS\char`\"{} font table. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a06b8121dea15c8117b7c951ffb22fb7e}{fill\+Gsub\+Table}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font)
\begin{DoxyCompactList}\small\item\em Fill a \char`\"{}\+GSUB\char`\"{} font table. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a199befd98ef9ec0ee659d82609abded4}{cache\+String\+As\+UTF16\+BE}} (\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$buf, const char $\ast$str)
\begin{DoxyCompactList}\small\item\em Cache a string as a big-\/ending UTF-\/16 surrogate pair. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a79d8a322be9d9131b684a9ea67abe05e}{fill\+Name\+Table}} (\mbox{\hyperlink{structFont}{Font}} $\ast$font, \mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{Name\+Strings}} name\+Strings)
\begin{DoxyCompactList}\small\item\em Fill a \char`\"{}name\char`\"{} font table. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a9c4b081f1e1ad60def15811c71a936f2}{print\+Version}} ()
\begin{DoxyCompactList}\small\item\em Print program version string on stdout. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{hex2otf_8c_a0d20b69b0ad703df78459e1033d5c1d4}{print\+Help}} ()
\begin{DoxyCompactList}\small\item\em Print help message to stdout and then exit. \end{DoxyCompactList}\item 
const char $\ast$ \mbox{\hyperlink{hex2otf_8c_af1d113ec0d790035476f2743cbf2696f}{match\+Token}} (const char $\ast$operand, const char $\ast$key, char delimiter)
\begin{DoxyCompactList}\small\item\em Match a command line option with its key for enabling. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structOptions}{Options}} \mbox{\hyperlink{hex2otf_8c_ac2eec01939cae967aa9882b2517288a1}{parse\+Options}} (char $\ast$const argv\mbox{[}const\mbox{]})
\begin{DoxyCompactList}\small\item\em Parse command line options. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{hex2otf_8c_a0ddf1224851353fc92bfbff6f499fa97}{main}} (int argc, char $\ast$argv\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em The main function. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$ \mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{all\+Buffers}}
\begin{DoxyCompactList}\small\item\em Initial allocation of empty array of buffer pointers. \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{buffer\+Count}}
\begin{DoxyCompactList}\small\item\em Number of buffers in a \mbox{\hyperlink{structBuffer}{Buffer}} $\ast$ array. \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{next\+Buffer\+Index}}
\begin{DoxyCompactList}\small\item\em Index number to tail element of \mbox{\hyperlink{structBuffer}{Buffer}} $\ast$ array. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
hex2otf -\/ Convert GNU Unifont .hex file to Open\+Type font 

This program reads a Unifont .hex format file and a file containing combining mark offset information, and produces an Open\+Type font file.

\begin{DoxyCopyright}{Copyright}
Copyright © 2022 何志翔 (He Zhixiang)
\end{DoxyCopyright}
\begin{DoxyAuthor}{Author}
何志翔 (He Zhixiang) 
\end{DoxyAuthor}


Definition in file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.



\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{hex2otf_8c_a23781d23f31cfbcaf33e86e10d7cce50}\label{hex2otf_8c_a23781d23f31cfbcaf33e86e10d7cce50}} 
\index{hex2otf.c@{hex2otf.c}!addByte@{addByte}}
\index{addByte@{addByte}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{addByte}{addByte}}
{\footnotesize\ttfamily \#define add\+Byte(\begin{DoxyParamCaption}\item[{}]{shift }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (p\ ==\ end)\ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};\ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ record-\/>checksum\ +=\ (uint\_fast32\_t)*p++\ <<\ (shift);}

\end{DoxyCode}
\mbox{\Hypertarget{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}\label{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}} 
\index{hex2otf.c@{hex2otf.c}!ASCENDER@{ASCENDER}}
\index{ASCENDER@{ASCENDER}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{ASCENDER}{ASCENDER}}
{\footnotesize\ttfamily \#define ASCENDER~(\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\+\_\+\+HEIGHT}} -\/ \mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}})}



Count of pixels above baseline. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00079}{79}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}\label{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}} 
\index{hex2otf.c@{hex2otf.c}!B0@{B0}}
\index{B0@{B0}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{B0}{B0}}
{\footnotesize\ttfamily \#define B0(\begin{DoxyParamCaption}\item[{}]{shift }\end{DoxyParamCaption})~\mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}}((shift), 0)}



Clear a given bit in a word. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00066}{66}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}\label{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}} 
\index{hex2otf.c@{hex2otf.c}!B1@{B1}}
\index{B1@{B1}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{B1}{B1}}
{\footnotesize\ttfamily \#define B1(\begin{DoxyParamCaption}\item[{}]{shift }\end{DoxyParamCaption})~\mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}}((shift), 1)}



Set a given bit in a word. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00067}{67}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}\label{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}} 
\index{hex2otf.c@{hex2otf.c}!BX@{BX}}
\index{BX@{BX}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{BX}{BX}}
{\footnotesize\ttfamily \#define BX(\begin{DoxyParamCaption}\item[{}]{shift,  }\item[{}]{x }\end{DoxyParamCaption})~((uintmax\+\_\+t)(!!(x)) $<$$<$ (shift))}



Truncate \& shift word. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00065}{65}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a0e5f5e7d04aec261ae28e2fca801194c}\label{hex2otf_8c_a0e5f5e7d04aec261ae28e2fca801194c}} 
\index{hex2otf.c@{hex2otf.c}!defineStore@{defineStore}}
\index{defineStore@{defineStore}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{defineStore}{defineStore}}
{\footnotesize\ttfamily \#define define\+Store(\begin{DoxyParamCaption}\item[{}]{name,  }\item[{}]{type }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordtype}{void}\ name\ (\mbox{\hyperlink{structBuffer}{Buffer}}\ *buf,\ type\ value)\ \(\backslash\)}
\DoxyCodeLine{\{\ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ type\ *slot\ =\ getBufferSlot\ (buf,\ \textcolor{keyword}{sizeof}\ value);\ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ *slot\ =\ value;\ \(\backslash\)}
\DoxyCodeLine{\}}

\end{DoxyCode}


Temporary define to look up an element in an array of given type. 

This defintion is used to create lookup functions to return a given element in unsigned arrays of size 8, 16, and 32 bytes, and in an array of pixels. 

Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00350}{350}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}\label{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}} 
\index{hex2otf.c@{hex2otf.c}!DESCENDER@{DESCENDER}}
\index{DESCENDER@{DESCENDER}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{DESCENDER}{DESCENDER}}
{\footnotesize\ttfamily \#define DESCENDER~2}



Count of pixels below baseline. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00076}{76}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}\label{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}} 
\index{hex2otf.c@{hex2otf.c}!FU@{FU}}
\index{FU@{FU}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{FU}{FU}}
{\footnotesize\ttfamily \#define FU(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})~((x) $\ast$ \mbox{\hyperlink{hex2otf_8c_a652fd701381105d0d34ca4084cca413c}{FUPEM}} / \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\+\_\+\+HEIGHT}})}



Convert pixels to font units. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00091}{91}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a652fd701381105d0d34ca4084cca413c}\label{hex2otf_8c_a652fd701381105d0d34ca4084cca413c}} 
\index{hex2otf.c@{hex2otf.c}!FUPEM@{FUPEM}}
\index{FUPEM@{FUPEM}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{FUPEM}{FUPEM}}
{\footnotesize\ttfamily \#define FUPEM~64}



\mbox{\hyperlink{structFont}{Font}} units per em. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00082}{82}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}\label{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}} 
\index{hex2otf.c@{hex2otf.c}!GLYPH\_HEIGHT@{GLYPH\_HEIGHT}}
\index{GLYPH\_HEIGHT@{GLYPH\_HEIGHT}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{GLYPH\_HEIGHT}{GLYPH\_HEIGHT}}
{\footnotesize\ttfamily \#define GLYPH\+\_\+\+HEIGHT~16}



Maximum glyph height, in pixels. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00070}{70}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_ad0f95bf4a3a4a28b173b971e246b8745}\label{hex2otf_8c_ad0f95bf4a3a4a28b173b971e246b8745}} 
\index{hex2otf.c@{hex2otf.c}!GLYPH\_MAX\_BYTE\_COUNT@{GLYPH\_MAX\_BYTE\_COUNT}}
\index{GLYPH\_MAX\_BYTE\_COUNT@{GLYPH\_MAX\_BYTE\_COUNT}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{GLYPH\_MAX\_BYTE\_COUNT}{GLYPH\_MAX\_BYTE\_COUNT}}
{\footnotesize\ttfamily \#define GLYPH\+\_\+\+MAX\+\_\+\+BYTE\+\_\+\+COUNT~(\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\+\_\+\+HEIGHT}} $\ast$ \mbox{\hyperlink{hex2otf_8c_a688a4772d61221e9378e5003da51265a}{GLYPH\+\_\+\+MAX\+\_\+\+WIDTH}} / 8)}



Number of bytes to represent one bitmap glyph as a binary array. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00073}{73}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a688a4772d61221e9378e5003da51265a}\label{hex2otf_8c_a688a4772d61221e9378e5003da51265a}} 
\index{hex2otf.c@{hex2otf.c}!GLYPH\_MAX\_WIDTH@{GLYPH\_MAX\_WIDTH}}
\index{GLYPH\_MAX\_WIDTH@{GLYPH\_MAX\_WIDTH}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{GLYPH\_MAX\_WIDTH}{GLYPH\_MAX\_WIDTH}}
{\footnotesize\ttfamily \#define GLYPH\+\_\+\+MAX\+\_\+\+WIDTH~16}



Maximum glyph width, in pixels. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00069}{69}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a1a1d1da8a5f6da54d749399b173c9bfc}\label{hex2otf_8c_a1a1d1da8a5f6da54d749399b173c9bfc}} 
\index{hex2otf.c@{hex2otf.c}!MAX\_GLYPHS@{MAX\_GLYPHS}}
\index{MAX\_GLYPHS@{MAX\_GLYPHS}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{MAX\_GLYPHS}{MAX\_GLYPHS}}
{\footnotesize\ttfamily \#define MAX\+\_\+\+GLYPHS~65536}



An Open\+Type font has at most 65536 glyphs. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00085}{85}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}\label{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}} 
\index{hex2otf.c@{hex2otf.c}!MAX\_NAME\_IDS@{MAX\_NAME\_IDS}}
\index{MAX\_NAME\_IDS@{MAX\_NAME\_IDS}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{MAX\_NAME\_IDS}{MAX\_NAME\_IDS}}
{\footnotesize\ttfamily \#define MAX\+\_\+\+NAME\+\_\+\+IDS~256}



Name IDs 0-\/255 are used for standard names. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00088}{88}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_af25acbe53b9070c1400a04c9231691bb}\label{hex2otf_8c_af25acbe53b9070c1400a04c9231691bb}} 
\index{hex2otf.c@{hex2otf.c}!PRI\_CP@{PRI\_CP}}
\index{PRI\_CP@{PRI\_CP}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{PRI\_CP}{PRI\_CP}}
{\footnotesize\ttfamily \#define PRI\+\_\+\+CP~\char`\"{}U+\%.\+4\char`\"{}PRIXFAST32}



Format string to print Unicode code point. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00058}{58}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a79e768c38f3b21419f01d2d1347523be}\label{hex2otf_8c_a79e768c38f3b21419f01d2d1347523be}} 
\index{hex2otf.c@{hex2otf.c}!PW@{PW}}
\index{PW@{PW}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{PW}{PW}}
{\footnotesize\ttfamily \#define PW(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})~((x) / (\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\+\_\+\+HEIGHT}} / 8))}



Convert glyph byte count to pixel width. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00094}{94}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_abce67139ad0bc979ef080a694e60fb36}\label{hex2otf_8c_abce67139ad0bc979ef080a694e60fb36}} 
\index{hex2otf.c@{hex2otf.c}!static\_assert@{static\_assert}}
\index{static\_assert@{static\_assert}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{static\_assert}{static\_assert}}
{\footnotesize\ttfamily \#define static\+\_\+assert(\begin{DoxyParamCaption}\item[{}]{a,  }\item[{}]{b }\end{DoxyParamCaption})~(assert(a))}



If \char`\"{}a\char`\"{} is true, return string \char`\"{}b\char`\"{}. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00061}{61}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}\label{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}} 
\index{hex2otf.c@{hex2otf.c}!U16MAX@{U16MAX}}
\index{U16MAX@{U16MAX}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{U16MAX}{U16MAX}}
{\footnotesize\ttfamily \#define U16\+MAX~0xffff}



Maximum UTF-\/16 code point value. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00055}{55}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a7ccab01e56208030185cefdca13e0ac8}\label{hex2otf_8c_a7ccab01e56208030185cefdca13e0ac8}} 
\index{hex2otf.c@{hex2otf.c}!U32MAX@{U32MAX}}
\index{U32MAX@{U32MAX}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{U32MAX}{U32MAX}}
{\footnotesize\ttfamily \#define U32\+MAX~0xffffffff}



Maximum UTF-\/32 code point value. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00056}{56}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a1c6d5de492ac61ad29aec7aa9a436bbf}\label{hex2otf_8c_a1c6d5de492ac61ad29aec7aa9a436bbf}} 
\index{hex2otf.c@{hex2otf.c}!VERSION@{VERSION}}
\index{VERSION@{VERSION}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{VERSION}{VERSION}}
{\footnotesize\ttfamily \#define VERSION~\char`\"{}1.\+0.\+1\char`\"{}}



Program version, for \char`\"{}-\/-\/version\char`\"{} option. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00051}{51}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.



\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{hex2otf_8c_a7feadaf37f40473cfc76921f8754c0f7}\label{hex2otf_8c_a7feadaf37f40473cfc76921f8754c0f7}} 
\index{hex2otf.c@{hex2otf.c}!Buffer@{Buffer}}
\index{Buffer@{Buffer}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{Buffer}{Buffer}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{structBuffer}{Buffer}} \mbox{\hyperlink{structBuffer}{Buffer}}}



Generic data structure for a linked list of buffer elements. 

A buffer can act as a vector (when filled with \textquotesingle{}store$\ast$\textquotesingle{} functions), or a temporary output area (when filled with \textquotesingle{}cache$\ast$\textquotesingle{} functions). The \textquotesingle{}store$\ast$\textquotesingle{} functions use native endian. The \textquotesingle{}cache$\ast$\textquotesingle{} functions use big endian or other formats in Open\+Type. Beware of memory alignment. \mbox{\Hypertarget{hex2otf_8c_a0c8186d9b9b7880309c27230bbb5e69d}\label{hex2otf_8c_a0c8186d9b9b7880309c27230bbb5e69d}} 
\index{hex2otf.c@{hex2otf.c}!byte@{byte}}
\index{byte@{byte}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{byte}{byte}}
{\footnotesize\ttfamily typedef unsigned char \mbox{\hyperlink{hex2otf_8c_a0c8186d9b9b7880309c27230bbb5e69d}{byte}}}



Definition of \char`\"{}byte\char`\"{} type as an unsigned char. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00097}{97}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a8ac383e879c9d7d9af6005444970c837}\label{hex2otf_8c_a8ac383e879c9d7d9af6005444970c837}} 
\index{hex2otf.c@{hex2otf.c}!Glyph@{Glyph}}
\index{Glyph@{Glyph}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{Glyph}{Glyph}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{structGlyph}{Glyph}} \mbox{\hyperlink{structGlyph}{Glyph}}}



Data structure to hold data for one bitmap glyph. 

This data structure holds data to represent one Unifont bitmap glyph\+: Unicode code point, number of bytes in its bitmap array, whether or not it is a combining character, and an offset from the glyph origin to the start of the bitmap. \mbox{\Hypertarget{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}\label{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}} 
\index{hex2otf.c@{hex2otf.c}!NameStrings@{NameStrings}}
\index{NameStrings@{NameStrings}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{NameStrings}{NameStrings}}
{\footnotesize\ttfamily typedef const char$\ast$ Name\+Strings\mbox{[}\mbox{\hyperlink{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}{MAX\+\_\+\+NAME\+\_\+\+IDS}}\mbox{]}}



Array of Open\+Type names indexed directly by Name IDs. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00604}{604}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a97fbabab590ac85657edb01474da7d50}\label{hex2otf_8c_a97fbabab590ac85657edb01474da7d50}} 
\index{hex2otf.c@{hex2otf.c}!Options@{Options}}
\index{Options@{Options}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{Options}{Options}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{structOptions}{Options}} \mbox{\hyperlink{structOptions}{Options}}}



Data structure to hold options for Open\+Type font output. 

This data structure holds the status of options that can be specified as command line arguments for creating the output Open\+Type font file. \mbox{\Hypertarget{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}\label{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}} 
\index{hex2otf.c@{hex2otf.c}!pixels\_t@{pixels\_t}}
\index{pixels\_t@{pixels\_t}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{pixels\_t}{pixels\_t}}
{\footnotesize\ttfamily typedef int\+\_\+least8\+\_\+t \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\+\_\+t}}}



This type must be able to represent max(\+GLYPH\+\_\+\+MAX\+\_\+\+WIDTH, GLYPH\+\_\+\+HEIGHT). 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00100}{100}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_aaa5713bb2ecdf81c430009179b806232}\label{hex2otf_8c_aaa5713bb2ecdf81c430009179b806232}} 
\index{hex2otf.c@{hex2otf.c}!Table@{Table}}
\index{Table@{Table}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{Table}{Table}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{structTable}{Table}} \mbox{\hyperlink{structTable}{Table}}}



Data structure for an Open\+Type table. 

This data structure contains a table tag and a pointer to the start of the buffer that holds data for this Open\+Type table.

For information on the Open\+Type tables and their structure, see \href{https://docs.microsoft.com/en-us/typography/opentype/spec/otff\#font-tables}{\texttt{ https\+://docs.\+microsoft.\+com/en-\/us/typography/opentype/spec/otff\#font-\/tables}}. 

\doxysubsection{Enumeration Type Documentation}
\mbox{\Hypertarget{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38}\label{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38}} 
\index{hex2otf.c@{hex2otf.c}!ContourOp@{ContourOp}}
\index{ContourOp@{ContourOp}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{ContourOp}{ContourOp}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38}{Contour\+Op}}}



Specify the current contour drawing operation. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OP\_CLOSE@{OP\_CLOSE}!hex2otf.c@{hex2otf.c}}\index{hex2otf.c@{hex2otf.c}!OP\_CLOSE@{OP\_CLOSE}}}\mbox{\Hypertarget{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}\label{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}} 
OP\+\_\+\+CLOSE&Close the current contour path that was being drawn. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OP\_POINT@{OP\_POINT}!hex2otf.c@{hex2otf.c}}\index{hex2otf.c@{hex2otf.c}!OP\_POINT@{OP\_POINT}}}\mbox{\Hypertarget{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a01f5371958d06ab1411c46f72f049f45}\label{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a01f5371958d06ab1411c46f72f049f45}} 
OP\+\_\+\+POINT&Add one more (x,y) point to the contor being drawn. \\
\hline

\end{DoxyEnumFields}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01136}{1136}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01136\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01137\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}{OP\_CLOSE}},\ \ \ \ \textcolor{comment}{///<\ Close\ the\ current\ contour\ path\ that\ was\ being\ drawn.}}
\DoxyCodeLine{01138\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a01f5371958d06ab1411c46f72f049f45}{OP\_POINT}}\ \ \ \ \ \textcolor{comment}{///<\ Add\ one\ more\ (x,y)\ point\ to\ the\ contor\ being\ drawn.}}
\DoxyCodeLine{01139\ \};}

\end{DoxyCode}
\mbox{\Hypertarget{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8c}\label{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8c}} 
\index{hex2otf.c@{hex2otf.c}!FillSide@{FillSide}}
\index{FillSide@{FillSide}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{FillSide}{FillSide}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8c}{Fill\+Side}}}



Fill to the left side (CFF) or right side (True\+Type) of a contour. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{FILL\_LEFT@{FILL\_LEFT}!hex2otf.c@{hex2otf.c}}\index{hex2otf.c@{hex2otf.c}!FILL\_LEFT@{FILL\_LEFT}}}\mbox{\Hypertarget{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8caf18243d8ef6a7f601ae03a6cffbabadd}\label{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8caf18243d8ef6a7f601ae03a6cffbabadd}} 
FILL\+\_\+\+LEFT&Draw outline counter-\/clockwise (CFF, Post\+Script). \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FILL\_RIGHT@{FILL\_RIGHT}!hex2otf.c@{hex2otf.c}}\index{hex2otf.c@{hex2otf.c}!FILL\_RIGHT@{FILL\_RIGHT}}}\mbox{\Hypertarget{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8ca0bbdc63e5d0938274b80230bc55d03b8}\label{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8ca0bbdc63e5d0938274b80230bc55d03b8}} 
FILL\+\_\+\+RIGHT&Draw outline clockwise (True\+Type). \\
\hline

\end{DoxyEnumFields}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01144}{1144}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01144\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01145\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8caf18243d8ef6a7f601ae03a6cffbabadd}{FILL\_LEFT}},\ \ \ \ \textcolor{comment}{///<\ Draw\ outline\ counter-\/clockwise\ (CFF,\ PostScript).}}
\DoxyCodeLine{01146\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8ca0bbdc63e5d0938274b80230bc55d03b8}{FILL\_RIGHT}}\ \ \ \ \textcolor{comment}{///<\ Draw\ outline\ clockwise\ (TrueType).}}
\DoxyCodeLine{01147\ \};}

\end{DoxyCode}
\mbox{\Hypertarget{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}\label{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}} 
\index{hex2otf.c@{hex2otf.c}!LocaFormat@{LocaFormat}}
\index{LocaFormat@{LocaFormat}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{LocaFormat}{LocaFormat}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}{Loca\+Format}}}



Index to Location (\char`\"{}loca\char`\"{}) offset information. 

This enumerated type encodes the type of offset to locations in a table. It denotes Offset16 (16-\/bit) and Offset32 (32-\/bit) offset types. \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{LOCA\_OFFSET16@{LOCA\_OFFSET16}!hex2otf.c@{hex2otf.c}}\index{hex2otf.c@{hex2otf.c}!LOCA\_OFFSET16@{LOCA\_OFFSET16}}}\mbox{\Hypertarget{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaa9c5871c30feb10df049d99bd703dfda4}\label{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaa9c5871c30feb10df049d99bd703dfda4}} 
LOCA\+\_\+\+OFFSET16&Offset to location is a 16-\/bit Offset16 value. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{LOCA\_OFFSET32@{LOCA\_OFFSET32}!hex2otf.c@{hex2otf.c}}\index{hex2otf.c@{hex2otf.c}!LOCA\_OFFSET32@{LOCA\_OFFSET32}}}\mbox{\Hypertarget{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaad5e47b5a6bbf31be31e9b1328e7beef8}\label{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaad5e47b5a6bbf31be31e9b1328e7beef8}} 
LOCA\+\_\+\+OFFSET32&Offset to location is a 32-\/bit Offset32 value. \\
\hline

\end{DoxyEnumFields}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00658}{658}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00658\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00659\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaa9c5871c30feb10df049d99bd703dfda4}{LOCA\_OFFSET16}}\ =\ 0,\ \ \ \ \textcolor{comment}{///<\ Offset\ to\ location\ is\ a\ 16-\/bit\ Offset16\ value}}
\DoxyCodeLine{00660\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaad5e47b5a6bbf31be31e9b1328e7beef8}{LOCA\_OFFSET32}}\ =\ 1\ \ \ \ \ \textcolor{comment}{///<\ Offset\ to\ location\ is\ a\ 32-\/bit\ Offset32\ value}}
\DoxyCodeLine{00661\ \};}

\end{DoxyCode}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}\label{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}} 
\index{hex2otf.c@{hex2otf.c}!addTable@{addTable}}
\index{addTable@{addTable}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{addTable()}{addTable()}}
{\footnotesize\ttfamily void add\+Table (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font,  }\item[{const char}]{tag\mbox{[}static 4\mbox{]},  }\item[{\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$}]{content }\end{DoxyParamCaption})}



Add a True\+Type or Open\+Type table to the font. 

This function adds a True\+Type or Open\+Type table to a font. The 4-\/byte table tag is passed as an unsigned 32-\/bit integer in big-\/endian format.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The font to which a font table will be added. \\
\hline
\mbox{\texttt{ in}}  & {\em tag} & The 4-\/byte table name. \\
\hline
\mbox{\texttt{ in}}  & {\em content} & The table bytes to add, of type \mbox{\hyperlink{structBuffer}{Buffer}} $\ast$. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00694}{694}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00695\ \{}
\DoxyCodeLine{00696\ \ \ \ \ \mbox{\hyperlink{structTable}{Table}}\ *table\ =\ getBufferSlot\ (font-\/>tables,\ sizeof\ (\mbox{\hyperlink{structTable}{Table}}));}
\DoxyCodeLine{00697\ \ \ \ \ table-\/>tag\ =\ tagAsU32\ (tag);}
\DoxyCodeLine{00698\ \ \ \ \ table-\/>content\ =\ content;}
\DoxyCodeLine{00699\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 1
\mbox{\Hypertarget{hex2otf_8c_a5af7c9bcfd40e5b11f9d12c40966bb65}\label{hex2otf_8c_a5af7c9bcfd40e5b11f9d12c40966bb65}} 
\index{hex2otf.c@{hex2otf.c}!buildOutline@{buildOutline}}
\index{buildOutline@{buildOutline}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{buildOutline()}{buildOutline()}}
{\footnotesize\ttfamily void build\+Outline (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$}]{result,  }\item[{const \mbox{\hyperlink{hex2otf_8c_a0c8186d9b9b7880309c27230bbb5e69d}{byte}}}]{bitmap\mbox{[}$\,$\mbox{]},  }\item[{const size\+\_\+t}]{byte\+Count,  }\item[{const enum \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8c}{Fill\+Side}}}]{fill\+Side }\end{DoxyParamCaption})}



Build a glyph outline. 

This function builds a glyph outline from a Unifont glyph bitmap.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em result} & The resulting glyph outline. \\
\hline
\mbox{\texttt{ in}}  & {\em bitmap} & A bitmap array. \\
\hline
\mbox{\texttt{ in}}  & {\em byte\+Count} & the number of bytes in the input bitmap array. \\
\hline
\mbox{\texttt{ in}}  & {\em fill\+Side} & Enumerated indicator to fill left or right side. \\
\hline
\end{DoxyParams}
Get the value of a given bit that is in a given row.

Invert the value of a given bit that is in a given row.

Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01160}{1160}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01162\ \{}
\DoxyCodeLine{01163\ \ \ \ \ \textcolor{keyword}{enum}\ Direction\ \{RIGHT,\ LEFT,\ DOWN,\ UP\};\ \textcolor{comment}{//\ order\ is\ significant}}
\DoxyCodeLine{01164\ }
\DoxyCodeLine{01165\ \ \ \ \ \textcolor{comment}{//\ respective\ coordinate\ deltas}}
\DoxyCodeLine{01166\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ dx[]\ =\ \{1,\ -\/1,\ 0,\ 0\},\ dy[]\ =\ \{0,\ 0,\ -\/1,\ 1\};}
\DoxyCodeLine{01167\ }
\DoxyCodeLine{01168\ \ \ \ \ assert\ (byteCount\ \%\ \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}}\ ==\ 0);}
\DoxyCodeLine{01169\ \ \ \ \ \textcolor{keyword}{const}\ uint\_fast8\_t\ bytesPerRow\ =\ byteCount\ /\ \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}};}
\DoxyCodeLine{01170\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ glyphWidth\ =\ bytesPerRow\ *\ 8;}
\DoxyCodeLine{01171\ \ \ \ \ assert\ (glyphWidth\ <=\ \mbox{\hyperlink{hex2otf_8c_a688a4772d61221e9378e5003da51265a}{GLYPH\_MAX\_WIDTH}});}
\DoxyCodeLine{01172\ }
\DoxyCodeLine{01173\ \textcolor{preprocessor}{\ \ \ \ \#if\ GLYPH\_MAX\_WIDTH\ <\ 32}}
\DoxyCodeLine{01174\ \ \ \ \ \ \ \ \ \textcolor{keyword}{typedef}\ uint\_fast32\_t\ row\_t;}
\DoxyCodeLine{01175\ \textcolor{preprocessor}{\ \ \ \ \#elif\ GLYPH\_MAX\_WIDTH\ <\ 64}}
\DoxyCodeLine{01176\ \ \ \ \ \ \ \ \ \textcolor{keyword}{typedef}\ uint\_fast64\_t\ row\_t;}
\DoxyCodeLine{01177\ \textcolor{preprocessor}{\ \ \ \ \#else}}
\DoxyCodeLine{01178\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \#error\ GLYPH\_MAX\_WIDTH\ is\ too\ large.}}
\DoxyCodeLine{01179\ \textcolor{preprocessor}{\ \ \ \ \#endif}}
\DoxyCodeLine{01180\ }
\DoxyCodeLine{01181\ \ \ \ \ row\_t\ pixels[\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}}\ +\ 2]\ =\ \{0\};}
\DoxyCodeLine{01182\ \ \ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ row\ =\ \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}};\ row\ >\ 0;\ row-\/-\/)}
\DoxyCodeLine{01183\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ b\ =\ 0;\ b\ <\ bytesPerRow;\ b++)}
\DoxyCodeLine{01184\ \ \ \ \ \ \ \ \ \ \ \ \ pixels[row]\ =\ pixels[row]\ <<\ 8\ |\ *bitmap++;}
\DoxyCodeLine{01185\ \ \ \ \ \textcolor{keyword}{typedef}\ row\_t\ graph\_t[\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}}\ +\ 1];}
\DoxyCodeLine{01186\ \ \ \ \ graph\_t\ vectors[4];}
\DoxyCodeLine{01187\ \ \ \ \ \textcolor{keyword}{const}\ row\_t\ *lower\ =\ pixels,\ *upper\ =\ pixels\ +\ 1;}
\DoxyCodeLine{01188\ \ \ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ row\ =\ 0;\ row\ <=\ \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}};\ row++)}
\DoxyCodeLine{01189\ \ \ \ \ \{}
\DoxyCodeLine{01190\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ row\_t\ m\ =\ (fillSide\ ==\ \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8ca0bbdc63e5d0938274b80230bc55d03b8}{FILL\_RIGHT}})\ -\/\ 1;}
\DoxyCodeLine{01191\ \ \ \ \ \ \ \ \ vectors[RIGHT][row]\ =\ (m\ \string^\ (*lower\ <<\ 1))\ \&\ (\string~m\ \string^\ (*upper\ <<\ 1));}
\DoxyCodeLine{01192\ \ \ \ \ \ \ \ \ vectors[LEFT\ ][row]\ =\ (m\ \string^\ (*upper\ \ \ \ \ ))\ \&\ (\string~m\ \string^\ (*lower\ \ \ \ \ ));}
\DoxyCodeLine{01193\ \ \ \ \ \ \ \ \ vectors[DOWN\ ][row]\ =\ (m\ \string^\ (*lower\ \ \ \ \ ))\ \&\ (\string~m\ \string^\ (*lower\ <<\ 1));}
\DoxyCodeLine{01194\ \ \ \ \ \ \ \ \ vectors[UP\ \ \ ][row]\ =\ (m\ \string^\ (*upper\ <<\ 1))\ \&\ (\string~m\ \string^\ (*upper\ \ \ \ \ ));}
\DoxyCodeLine{01195\ \ \ \ \ \ \ \ \ lower++;}
\DoxyCodeLine{01196\ \ \ \ \ \ \ \ \ upper++;}
\DoxyCodeLine{01197\ \ \ \ \ \}}
\DoxyCodeLine{01198\ \ \ \ \ graph\_t\ selection\ =\ \{0\};}
\DoxyCodeLine{01199\ \ \ \ \ \textcolor{keyword}{const}\ row\_t\ x0\ =\ (row\_t)1\ <<\ glyphWidth;}
\DoxyCodeLine{01200\ \textcolor{comment}{}}
\DoxyCodeLine{01201\ \textcolor{comment}{\ \ \ \ ///\ Get\ the\ value\ of\ a\ given\ bit\ that\ is\ in\ a\ given\ row.}}
\DoxyCodeLine{01202\ \textcolor{comment}{}\textcolor{preprocessor}{\ \ \ \ \#define\ getRowBit(rows,\ x,\ y)\ \ ((rows)[(y)]\ \&\ \ x0\ >>\ (x))}}
\DoxyCodeLine{01203\ \textcolor{comment}{}}
\DoxyCodeLine{01204\ \textcolor{comment}{\ \ \ \ ///\ Invert\ the\ value\ of\ a\ given\ bit\ that\ is\ in\ a\ given\ row.}}
\DoxyCodeLine{01205\ \textcolor{comment}{}\textcolor{preprocessor}{\ \ \ \ \#define\ flipRowBit(rows,\ x,\ y)\ ((rows)[(y)]\ \string^=\ x0\ >>\ (x))}}
\DoxyCodeLine{01206\ }
\DoxyCodeLine{01207\ \ \ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ y\ =\ \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}};\ y\ >=\ 0;\ y-\/-\/)}
\DoxyCodeLine{01208\ \ \ \ \ \{}
\DoxyCodeLine{01209\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ x\ =\ 0;\ x\ <=\ glyphWidth;\ x++)}
\DoxyCodeLine{01210\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01211\ \ \ \ \ \ \ \ \ \ \ \ \ assert\ (!getRowBit\ (vectors[LEFT],\ x,\ y));}
\DoxyCodeLine{01212\ \ \ \ \ \ \ \ \ \ \ \ \ assert\ (!getRowBit\ (vectors[UP],\ x,\ y));}
\DoxyCodeLine{01213\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}\ Direction\ initial;}
\DoxyCodeLine{01214\ }
\DoxyCodeLine{01215\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (getRowBit\ (vectors[RIGHT],\ x,\ y))}
\DoxyCodeLine{01216\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ initial\ =\ RIGHT;}
\DoxyCodeLine{01217\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (getRowBit\ (vectors[DOWN],\ x,\ y))}
\DoxyCodeLine{01218\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ initial\ =\ DOWN;}
\DoxyCodeLine{01219\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{01220\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{01221\ }
\DoxyCodeLine{01222\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{static\_assert}\ ((\mbox{\hyperlink{hex2otf_8c_a688a4772d61221e9378e5003da51265a}{GLYPH\_MAX\_WIDTH}}\ +\ 1)\ *\ (\mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}}\ +\ 1)\ *\ 2\ <=}
\DoxyCodeLine{01223\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}},\ \textcolor{stringliteral}{"{}potential\ overflow"{}});}
\DoxyCodeLine{01224\ }
\DoxyCodeLine{01225\ \ \ \ \ \ \ \ \ \ \ \ \ uint\_fast16\_t\ lastPointCount\ =\ 0;}
\DoxyCodeLine{01226\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{bool}\ converged\ =\ \textcolor{keyword}{false};;)}
\DoxyCodeLine{01227\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01228\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint\_fast16\_t\ pointCount\ =\ 0;}
\DoxyCodeLine{01229\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}\ Direction\ heading\ =\ initial;}
\DoxyCodeLine{01230\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ tx\ =\ x,\ ty\ =\ y;;)}
\DoxyCodeLine{01231\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01232\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (converged)}
\DoxyCodeLine{01233\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01234\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ storePixels\ (result,\ \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a01f5371958d06ab1411c46f72f049f45}{OP\_POINT}});}
\DoxyCodeLine{01235\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ storePixels\ (result,\ tx);}
\DoxyCodeLine{01236\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ storePixels\ (result,\ ty);}
\DoxyCodeLine{01237\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01238\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{do}}
\DoxyCodeLine{01239\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01240\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (converged)}
\DoxyCodeLine{01241\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ flipRowBit\ (vectors[heading],\ tx,\ ty);}
\DoxyCodeLine{01242\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ tx\ +=\ dx[heading];}
\DoxyCodeLine{01243\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ty\ +=\ dy[heading];}
\DoxyCodeLine{01244\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{while}\ (getRowBit\ (vectors[heading],\ tx,\ ty));}
\DoxyCodeLine{01245\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (tx\ ==\ x\ \&\&\ ty\ ==\ y)}
\DoxyCodeLine{01246\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{01247\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{static\_assert}\ ((UP\ \string^\ DOWN)\ ==\ 1\ \&\&\ (LEFT\ \string^\ RIGHT)\ ==\ 1,}
\DoxyCodeLine{01248\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}wrong\ enums"{}});}
\DoxyCodeLine{01249\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ heading\ =\ (heading\ \&\ 2)\ \string^\ 2;}
\DoxyCodeLine{01250\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ heading\ |=\ !!getRowBit\ (selection,\ tx,\ ty);}
\DoxyCodeLine{01251\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ heading\ \string^=\ !getRowBit\ (vectors[heading],\ tx,\ ty);}
\DoxyCodeLine{01252\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ assert\ (getRowBit\ (vectors[heading],\ tx,\ ty));}
\DoxyCodeLine{01253\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ flipRowBit\ (selection,\ tx,\ ty);}
\DoxyCodeLine{01254\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ pointCount++;}
\DoxyCodeLine{01255\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01256\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (converged)}
\DoxyCodeLine{01257\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{01258\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ converged\ =\ pointCount\ ==\ lastPointCount;}
\DoxyCodeLine{01259\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lastPointCount\ =\ pointCount;}
\DoxyCodeLine{01260\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01261\ }
\DoxyCodeLine{01262\ \ \ \ \ \ \ \ \ \ \ \ \ storePixels\ (result,\ \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}{OP\_CLOSE}});}
\DoxyCodeLine{01263\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01264\ \ \ \ \ \}}
\DoxyCodeLine{01265\ \textcolor{preprocessor}{\ \ \ \ \#undef\ getRowBit}}
\DoxyCodeLine{01266\ \textcolor{preprocessor}{\ \ \ \ \#undef\ flipRowBit}}
\DoxyCodeLine{01267\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 2
\mbox{\Hypertarget{hex2otf_8c_a0d187cc87528ef35478afd7a68309f08}\label{hex2otf_8c_a0d187cc87528ef35478afd7a68309f08}} 
\index{hex2otf.c@{hex2otf.c}!byCodePoint@{byCodePoint}}
\index{byCodePoint@{byCodePoint}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{byCodePoint()}{byCodePoint()}}
{\footnotesize\ttfamily int by\+Code\+Point (\begin{DoxyParamCaption}\item[{const void $\ast$}]{a,  }\item[{const void $\ast$}]{b }\end{DoxyParamCaption})}



Compare two Unicode code points to determine which is greater. 

This function compares the Unicode code points contained within two \mbox{\hyperlink{structGlyph}{Glyph}} data structures. The function returns 1 if the first code point is greater, and -\/1 if the second is greater.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a} & A \mbox{\hyperlink{structGlyph}{Glyph}} data structure containing the first code point. \\
\hline
\mbox{\texttt{ in}}  & {\em b} & A \mbox{\hyperlink{structGlyph}{Glyph}} data structure containing the second code point. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 if the code point a is greater, -\/1 if less, 0 if equal. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01040}{1040}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01041\ \{}
\DoxyCodeLine{01042\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *\textcolor{keyword}{const}\ ga\ =\ a,\ *\textcolor{keyword}{const}\ gb\ =\ b;}
\DoxyCodeLine{01043\ \ \ \ \ \textcolor{keywordtype}{int}\ gt\ =\ ga-\/>\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}}\ >\ gb-\/>codePoint;}
\DoxyCodeLine{01044\ \ \ \ \ \textcolor{keywordtype}{int}\ lt\ =\ ga-\/>\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}}\ <\ gb-\/>codePoint;}
\DoxyCodeLine{01045\ \ \ \ \ \textcolor{keywordflow}{return}\ gt\ -\/\ lt;}
\DoxyCodeLine{01046\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 3
\mbox{\Hypertarget{hex2otf_8c_af1223f39e8627e0a3b0b7b533e6d0b64}\label{hex2otf_8c_af1223f39e8627e0a3b0b7b533e6d0b64}} 
\index{hex2otf.c@{hex2otf.c}!byTableTag@{byTableTag}}
\index{byTableTag@{byTableTag}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{byTableTag()}{byTableTag()}}
{\footnotesize\ttfamily int by\+Table\+Tag (\begin{DoxyParamCaption}\item[{const void $\ast$}]{a,  }\item[{const void $\ast$}]{b }\end{DoxyParamCaption})}



Compare tables by 4-\/byte unsigned table tag value. 

This function takes two pointers to a \mbox{\hyperlink{structTableRecord}{Table\+Record}} data structure and extracts the four-\/byte tag structure element for each. The two 32-\/bit numbers are then compared. If the first tag is greater than the first, then gt = 1 and lt = 0, and so 1 -\/ 0 = 1 is returned. If the first is less than the second, then gt = 0 and lt = 1, and so 0 -\/ 1 = -\/1 is returned.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a} & Pointer to the first \mbox{\hyperlink{structTableRecord}{Table\+Record}} structure. \\
\hline
\mbox{\texttt{ in}}  & {\em b} & Pointer to the second \mbox{\hyperlink{structTableRecord}{Table\+Record}} structure. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 if the tag in \char`\"{}a\char`\"{} is greater, -\/1 if less, 0 if equal. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00767}{767}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00768\ \{}
\DoxyCodeLine{00769\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structTableRecord}{TableRecord}}\ *\textcolor{keyword}{const}\ ra\ =\ a,\ *\textcolor{keyword}{const}\ rb\ =\ b;}
\DoxyCodeLine{00770\ \ \ \ \ \textcolor{keywordtype}{int}\ gt\ =\ ra-\/>tag\ >\ rb-\/>tag;}
\DoxyCodeLine{00771\ \ \ \ \ \textcolor{keywordtype}{int}\ lt\ =\ ra-\/>tag\ <\ rb-\/>tag;}
\DoxyCodeLine{00772\ \ \ \ \ \textcolor{keywordflow}{return}\ gt\ -\/\ lt;}
\DoxyCodeLine{00773\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 4
\mbox{\Hypertarget{hex2otf_8c_a560637130747e543118ff304389fd18f}\label{hex2otf_8c_a560637130747e543118ff304389fd18f}} 
\index{hex2otf.c@{hex2otf.c}!cacheBuffer@{cacheBuffer}}
\index{cacheBuffer@{cacheBuffer}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{cacheBuffer()}{cacheBuffer()}}
{\footnotesize\ttfamily void cache\+Buffer (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$restrict}]{buf\+Dest,  }\item[{const \mbox{\hyperlink{structBuffer}{Buffer}} $\ast$restrict}]{buf\+Src }\end{DoxyParamCaption})}



Append bytes of a table to a byte buffer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em buf\+Dest} & The buffer to which the new bytes are appended. \\
\hline
\mbox{\texttt{ in}}  & {\em buf\+Src} & The bytes to append to the buffer array. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00523}{523}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00524\ \{}
\DoxyCodeLine{00525\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ length\ =\ countBufferedBytes\ (bufSrc);}
\DoxyCodeLine{00526\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}{ensureBuffer}}\ (bufDest,\ length);}
\DoxyCodeLine{00527\ \ \ \ \ memcpy\ (bufDest-\/>next,\ bufSrc-\/>begin,\ length);}
\DoxyCodeLine{00528\ \ \ \ \ bufDest-\/>next\ +=\ length;}
\DoxyCodeLine{00529\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 5
Here is the caller graph for this function\+:
% FIG 6
\mbox{\Hypertarget{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}\label{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}} 
\index{hex2otf.c@{hex2otf.c}!cacheBytes@{cacheBytes}}
\index{cacheBytes@{cacheBytes}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{cacheBytes()}{cacheBytes()}}
{\footnotesize\ttfamily void cache\+Bytes (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$restrict}]{buf,  }\item[{const void $\ast$restrict}]{src,  }\item[{size\+\_\+t}]{count }\end{DoxyParamCaption})}



Append a string of bytes to a buffer. 

This function appends an array of 1 to 4 bytes to the end of a buffer.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em buf} & The buffer to which the bytes are appended. \\
\hline
\mbox{\texttt{ in}}  & {\em src} & The array of bytes to append to the buffer. \\
\hline
\mbox{\texttt{ in}}  & {\em count} & The number of bytes containing zeroes to append. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00509}{509}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00510\ \{}
\DoxyCodeLine{00511\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}{ensureBuffer}}\ (buf,\ count);}
\DoxyCodeLine{00512\ \ \ \ \ memcpy\ (buf-\/>next,\ src,\ count);}
\DoxyCodeLine{00513\ \ \ \ \ buf-\/>next\ +=\ count;}
\DoxyCodeLine{00514\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 7
Here is the caller graph for this function\+:
% FIG 8
\mbox{\Hypertarget{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}\label{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}} 
\index{hex2otf.c@{hex2otf.c}!cacheCFFOperand@{cacheCFFOperand}}
\index{cacheCFFOperand@{cacheCFFOperand}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{cacheCFFOperand()}{cacheCFFOperand()}}
{\footnotesize\ttfamily void cache\+CFFOperand (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$}]{buf,  }\item[{int\+\_\+fast32\+\_\+t}]{value }\end{DoxyParamCaption})}



Cache charstring number encoding in a CFF buffer. 

This function caches two\textquotesingle{}s complement 8-\/, 16-\/, and 32-\/bit words as per Adobe\textquotesingle{}s Type 2 Charstring encoding for operands. These operands are used in Compact \mbox{\hyperlink{structFont}{Font}} Format data structures.

Byte values can have offsets, for which this function compensates, optionally followed by additional bytes\+: \begin{DoxyVerb}Byte Range   Offset   Bytes   Adjusted Range
----------   ------   -----   --------------
  0 to 11        0      1     0 to 11 (operators)
    12           0      2     Next byte is 8-bit op code
 13 to 18        0      1     13 to 18 (operators)
 19 to 20        0      2+    hintmask and cntrmask operators
 21 to 27        0      1     21 to 27 (operators)
    28           0      3     16-bit 2's complement number
 29 to 31        0      1     29 to 31 (operators)
 32 to 246    -139      1     -107 to +107
247 to 250    +108      2     +108 to +1131
251 to 254    -108      2     -108 to -1131
   255           0      5     16-bit integer and 16-bit fraction
\end{DoxyVerb}
 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em buf} & The buffer to which the operand value is appended. \\
\hline
\mbox{\texttt{ in}}  & {\em value} & The operand value. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00460}{460}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00461\ \{}
\DoxyCodeLine{00462\ \ \ \ \ \textcolor{keywordflow}{if}\ (-\/107\ <=\ value\ \&\&\ value\ <=\ 107)}
\DoxyCodeLine{00463\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (buf,\ value\ +\ 139);}
\DoxyCodeLine{00464\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (108\ <=\ value\ \&\&\ value\ <=\ 1131)}
\DoxyCodeLine{00465\ \ \ \ \ \{}
\DoxyCodeLine{00466\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (buf,\ (value\ -\/\ 108)\ /\ 256\ +\ 247);}
\DoxyCodeLine{00467\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (buf,\ (value\ -\/\ 108)\ \%\ 256);}
\DoxyCodeLine{00468\ \ \ \ \ \}}
\DoxyCodeLine{00469\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (-\/32768\ <=\ value\ \&\&\ value\ <=\ 32767)}
\DoxyCodeLine{00470\ \ \ \ \ \{}
\DoxyCodeLine{00471\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (buf,\ 28);}
\DoxyCodeLine{00472\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (buf,\ value);}
\DoxyCodeLine{00473\ \ \ \ \ \}}
\DoxyCodeLine{00474\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (-\/2147483647\ <=\ value\ \&\&\ value\ <=\ 2147483647)}
\DoxyCodeLine{00475\ \ \ \ \ \{}
\DoxyCodeLine{00476\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (buf,\ 29);}
\DoxyCodeLine{00477\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (buf,\ value);}
\DoxyCodeLine{00478\ \ \ \ \ \}}
\DoxyCodeLine{00479\ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{00480\ \ \ \ \ \ \ \ \ assert\ (\textcolor{keyword}{false});\ \textcolor{comment}{//\ other\ encodings\ are\ not\ used\ and\ omitted}}
\DoxyCodeLine{00481\ \ \ \ \ \textcolor{keyword}{static\_assert}\ (\mbox{\hyperlink{hex2otf_8c_a688a4772d61221e9378e5003da51265a}{GLYPH\_MAX\_WIDTH}}\ <=\ 107,\ \textcolor{stringliteral}{"{}More\ encodings\ are\ needed."{}});}
\DoxyCodeLine{00482\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 9
Here is the caller graph for this function\+:
% FIG 10
\mbox{\Hypertarget{hex2otf_8c_a199befd98ef9ec0ee659d82609abded4}\label{hex2otf_8c_a199befd98ef9ec0ee659d82609abded4}} 
\index{hex2otf.c@{hex2otf.c}!cacheStringAsUTF16BE@{cacheStringAsUTF16BE}}
\index{cacheStringAsUTF16BE@{cacheStringAsUTF16BE}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{cacheStringAsUTF16BE()}{cacheStringAsUTF16BE()}}
{\footnotesize\ttfamily void cache\+String\+As\+UTF16\+BE (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$}]{buf,  }\item[{const char $\ast$}]{str }\end{DoxyParamCaption})}



Cache a string as a big-\/ending UTF-\/16 surrogate pair. 

This function encodes a UTF-\/8 string as a big-\/endian UTF-\/16 surrogate pair.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em buf} & Pointer to a \mbox{\hyperlink{structBuffer}{Buffer}} struct to update. \\
\hline
\mbox{\texttt{ in}}  & {\em str} & The character array to encode. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l02316}{2316}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{02317\ \{}
\DoxyCodeLine{02318\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *p\ =\ str;\ *p;\ p++)}
\DoxyCodeLine{02319\ \ \ \ \ \{}
\DoxyCodeLine{02320\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{byte}\ c\ =\ *p;}
\DoxyCodeLine{02321\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (c\ <\ 0x80)}
\DoxyCodeLine{02322\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{02323\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (buf,\ c);}
\DoxyCodeLine{02324\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{02325\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02326\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ length\ =\ 1;}
\DoxyCodeLine{02327\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{byte}\ mask\ =\ 0x40;}
\DoxyCodeLine{02328\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (;\ c\ \&\ mask;\ mask\ >>=\ 1)}
\DoxyCodeLine{02329\ \ \ \ \ \ \ \ \ \ \ \ \ length++;}
\DoxyCodeLine{02330\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (length\ ==\ 1\ ||\ length\ >\ 4)}
\DoxyCodeLine{02331\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Ill-\/formed\ UTF-\/8\ sequence."{}});}
\DoxyCodeLine{02332\ \ \ \ \ \ \ \ \ uint\_fast32\_t\ codePoint\ =\ c\ \&\ (mask\ -\/\ 1);}
\DoxyCodeLine{02333\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{int}\ i\ =\ 1;\ i\ <\ length;\ i++)}
\DoxyCodeLine{02334\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{02335\ \ \ \ \ \ \ \ \ \ \ \ \ c\ =\ *++p;}
\DoxyCodeLine{02336\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((c\ \&\ 0xc0)\ !=\ 0x80)\ \textcolor{comment}{//\ NUL\ checked\ here}}
\DoxyCodeLine{02337\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Ill-\/formed\ UTF-\/8\ sequence."{}});}
\DoxyCodeLine{02338\ \ \ \ \ \ \ \ \ \ \ \ \ codePoint\ =\ (codePoint\ <<\ 6)\ |\ (c\ \&\ 0x3f);}
\DoxyCodeLine{02339\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02340\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ lowerBits\ =\ length==2\ ?\ 7\ :\ length==3\ ?\ 11\ :\ 16;}
\DoxyCodeLine{02341\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (codePoint\ >>\ lowerBits\ ==\ 0)}
\DoxyCodeLine{02342\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Ill-\/formed\ UTF-\/8\ sequence."{}});\ \textcolor{comment}{//\ sequence\ should\ be\ shorter}}
\DoxyCodeLine{02343\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (codePoint\ >=\ 0xd800\ \&\&\ codePoint\ <=\ 0xdfff)}
\DoxyCodeLine{02344\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Ill-\/formed\ UTF-\/8\ sequence."{}});}
\DoxyCodeLine{02345\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (codePoint\ >\ 0x10ffff)}
\DoxyCodeLine{02346\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Ill-\/formed\ UTF-\/8\ sequence."{}});}
\DoxyCodeLine{02347\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (codePoint\ >\ 0xffff)}
\DoxyCodeLine{02348\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{02349\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (buf,\ 0xd800\ |\ (codePoint\ -\/\ 0x10000)\ >>\ 10);}
\DoxyCodeLine{02350\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (buf,\ 0xdc00\ |\ (codePoint\ \&\ 0x3ff));}
\DoxyCodeLine{02351\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02352\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{02353\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (buf,\ codePoint);}
\DoxyCodeLine{02354\ \ \ \ \ \}}
\DoxyCodeLine{02355\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 11
Here is the caller graph for this function\+:
% FIG 12
\mbox{\Hypertarget{hex2otf_8c_a07b29528c561e5852a228c98391225f7}\label{hex2otf_8c_a07b29528c561e5852a228c98391225f7}} 
\index{hex2otf.c@{hex2otf.c}!cacheU16@{cacheU16}}
\index{cacheU16@{cacheU16}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{cacheU16()}{cacheU16()}}
{\footnotesize\ttfamily void cache\+U16 (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$}]{buf,  }\item[{uint\+\_\+fast16\+\_\+t}]{value }\end{DoxyParamCaption})}



Append two unsigned bytes to the end of a byte array. 

This function adds two bytes to the end of a byte array. The buffer is updated to account for the newly-\/added bytes.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em buf} & The array of bytes to which to append two new bytes. \\
\hline
\mbox{\texttt{ in}}  & {\em value} & The 16-\/bit unsigned value to append to the buf array. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00412}{412}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00413\ \{}
\DoxyCodeLine{00414\ \ \ \ \ cacheU\ (buf,\ value,\ 2);}
\DoxyCodeLine{00415\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 13
\mbox{\Hypertarget{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}\label{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}} 
\index{hex2otf.c@{hex2otf.c}!cacheU32@{cacheU32}}
\index{cacheU32@{cacheU32}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{cacheU32()}{cacheU32()}}
{\footnotesize\ttfamily void cache\+U32 (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$}]{buf,  }\item[{uint\+\_\+fast32\+\_\+t}]{value }\end{DoxyParamCaption})}



Append four unsigned bytes to the end of a byte array. 

This function adds four bytes to the end of a byte array. The buffer is updated to account for the newly-\/added bytes.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em buf} & The array of bytes to which to append four new bytes. \\
\hline
\mbox{\texttt{ in}}  & {\em value} & The 32-\/bit unsigned value to append to the buf array. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00427}{427}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00428\ \{}
\DoxyCodeLine{00429\ \ \ \ \ cacheU\ (buf,\ value,\ 4);}
\DoxyCodeLine{00430\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 14
\mbox{\Hypertarget{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}\label{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}} 
\index{hex2otf.c@{hex2otf.c}!cacheU8@{cacheU8}}
\index{cacheU8@{cacheU8}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{cacheU8()}{cacheU8()}}
{\footnotesize\ttfamily void cache\+U8 (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$}]{buf,  }\item[{uint\+\_\+fast8\+\_\+t}]{value }\end{DoxyParamCaption})}



Append one unsigned byte to the end of a byte array. 

This function adds one byte to the end of a byte array. The buffer is updated to account for the newly-\/added byte.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em buf} & The array of bytes to which to append a new byte. \\
\hline
\mbox{\texttt{ in}}  & {\em value} & The 8-\/bit unsigned value to append to the buf array. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00397}{397}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00398\ \{}
\DoxyCodeLine{00399\ \ \ \ \ storeU8\ (buf,\ value\ \&\ 0xff);}
\DoxyCodeLine{00400\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 15
\mbox{\Hypertarget{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}\label{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}} 
\index{hex2otf.c@{hex2otf.c}!cacheZeros@{cacheZeros}}
\index{cacheZeros@{cacheZeros}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{cacheZeros()}{cacheZeros()}}
{\footnotesize\ttfamily void cache\+Zeros (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$}]{buf,  }\item[{size\+\_\+t}]{count }\end{DoxyParamCaption})}



Append 1 to 4 bytes of zeroes to a buffer, for padding. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em buf} & The buffer to which the operand value is appended. \\
\hline
\mbox{\texttt{ in}}  & {\em count} & The number of bytes containing zeroes to append. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00491}{491}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00492\ \{}
\DoxyCodeLine{00493\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}{ensureBuffer}}\ (buf,\ count);}
\DoxyCodeLine{00494\ \ \ \ \ memset\ (buf-\/>next,\ 0,\ count);}
\DoxyCodeLine{00495\ \ \ \ \ buf-\/>next\ +=\ count;}
\DoxyCodeLine{00496\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 16
Here is the caller graph for this function\+:
% FIG 17
\mbox{\Hypertarget{hex2otf_8c_ac947cbe076da5fbab8f5e4c1c821b7a6}\label{hex2otf_8c_ac947cbe076da5fbab8f5e4c1c821b7a6}} 
\index{hex2otf.c@{hex2otf.c}!cleanBuffers@{cleanBuffers}}
\index{cleanBuffers@{cleanBuffers}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{cleanBuffers()}{cleanBuffers()}}
{\footnotesize\ttfamily void clean\+Buffers (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Free all allocated buffer pointers. 

This function frees all buffer pointers previously allocated in the init\+Buffers function. 

Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00170}{170}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00171\ \{}
\DoxyCodeLine{00172\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}};\ i++)}
\DoxyCodeLine{00173\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}[i].capacity)}
\DoxyCodeLine{00174\ \ \ \ \ \ \ \ \ \ \ \ \ free\ (\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}[i].begin);}
\DoxyCodeLine{00175\ \ \ \ \ free\ (\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}});}
\DoxyCodeLine{00176\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}}\ =\ 0;}
\DoxyCodeLine{00177\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 18
\mbox{\Hypertarget{hex2otf_8c_a4580a6e8cc566504bc2b852272c9434e}\label{hex2otf_8c_a4580a6e8cc566504bc2b852272c9434e}} 
\index{hex2otf.c@{hex2otf.c}!defineStore@{defineStore}}
\index{defineStore@{defineStore}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{defineStore()}{defineStore()}}
{\footnotesize\ttfamily define\+Store (\begin{DoxyParamCaption}\item[{store\+U8}]{,  }\item[{uint\+\_\+least8\+\_\+t}]{ }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00356}{356}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00375\ \{}
\DoxyCodeLine{00376\ \ \ \ \ assert\ (1\ <=\ bytes\ \&\&\ bytes\ <=\ 4);}
\DoxyCodeLine{00377\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}{ensureBuffer}}\ (buf,\ bytes);}
\DoxyCodeLine{00378\ \ \ \ \ \textcolor{keywordflow}{switch}\ (bytes)}
\DoxyCodeLine{00379\ \ \ \ \ \{}
\DoxyCodeLine{00380\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ 4:\ *buf-\/>next++\ =\ value\ >>\ 24\ \&\ 0xff;\ \textcolor{comment}{//\ fall\ through}}
\DoxyCodeLine{00381\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ 3:\ *buf-\/>next++\ =\ value\ >>\ 16\ \&\ 0xff;\ \textcolor{comment}{//\ fall\ through}}
\DoxyCodeLine{00382\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ 2:\ *buf-\/>next++\ =\ value\ >>\ 8\ \ \&\ 0xff;\ \textcolor{comment}{//\ fall\ through}}
\DoxyCodeLine{00383\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ 1:\ *buf-\/>next++\ =\ value\ \ \ \ \ \ \ \&\ 0xff;}
\DoxyCodeLine{00384\ \ \ \ \ \}}
\DoxyCodeLine{00385\ \}}

\end{DoxyCode}
\mbox{\Hypertarget{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}\label{hex2otf_8c_ae32c0f82cbb6a4d8ece0559f1c7b74f4}} 
\index{hex2otf.c@{hex2otf.c}!ensureBuffer@{ensureBuffer}}
\index{ensureBuffer@{ensureBuffer}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{ensureBuffer()}{ensureBuffer()}}
{\footnotesize\ttfamily void ensure\+Buffer (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$}]{buf,  }\item[{size\+\_\+t}]{needed }\end{DoxyParamCaption})}



Ensure that the buffer has at least the specified minimum size. 

This function takes a buffer array of type \mbox{\hyperlink{structBuffer}{Buffer}} and the necessary minimum number of elements as inputs, and attempts to increase the size of the buffer if it must be larger.

If the buffer is too small and cannot be resized, the program will terminate with an error message and an exit status of EXIT\+\_\+\+FAILURE.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em buf} & The buffer to check. \\
\hline
\mbox{\texttt{ in}}  & {\em needed} & The required minimum number of elements in the buffer. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00239}{239}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00240\ \{}
\DoxyCodeLine{00241\ \ \ \ \ \textcolor{keywordflow}{if}\ (buf-\/>end\ -\/\ buf-\/>next\ >=\ needed)}
\DoxyCodeLine{00242\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{00243\ \ \ \ \ ptrdiff\_t\ occupied\ =\ buf-\/>next\ -\/\ buf-\/>begin;}
\DoxyCodeLine{00244\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ required\ =\ occupied\ +\ needed;}
\DoxyCodeLine{00245\ \ \ \ \ \textcolor{keywordflow}{if}\ (required\ <\ needed)\ \textcolor{comment}{//\ overflow}}
\DoxyCodeLine{00246\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Cannot\ allocate\ \%zu\ +\ \%zu\ bytes\ of\ memory."{}},\ occupied,\ needed);}
\DoxyCodeLine{00247\ \ \ \ \ \textcolor{keywordflow}{if}\ (required\ >\ SIZE\_MAX\ /\ 2)}
\DoxyCodeLine{00248\ \ \ \ \ \ \ \ \ buf-\/>capacity\ =\ required;}
\DoxyCodeLine{00249\ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{while}\ (buf-\/>capacity\ <\ required)}
\DoxyCodeLine{00250\ \ \ \ \ \ \ \ \ buf-\/>capacity\ *=\ 2;}
\DoxyCodeLine{00251\ \ \ \ \ \textcolor{keywordtype}{void}\ *extended\ =\ realloc\ (buf-\/>begin,\ buf-\/>capacity);}
\DoxyCodeLine{00252\ \ \ \ \ \textcolor{keywordflow}{if}\ (!extended)}
\DoxyCodeLine{00253\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Failed\ to\ allocate\ \%zu\ bytes\ of\ memory."{}},\ buf-\/>capacity);}
\DoxyCodeLine{00254\ \ \ \ \ buf-\/>begin\ =\ extended;}
\DoxyCodeLine{00255\ \ \ \ \ buf-\/>next\ =\ buf-\/>begin\ +\ occupied;}
\DoxyCodeLine{00256\ \ \ \ \ buf-\/>end\ =\ buf-\/>begin\ +\ buf-\/>capacity;}
\DoxyCodeLine{00257\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 19
Here is the caller graph for this function\+:
% FIG 20
\mbox{\Hypertarget{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}\label{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}} 
\index{hex2otf.c@{hex2otf.c}!fail@{fail}}
\index{fail@{fail}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fail()}{fail()}}
{\footnotesize\ttfamily void fail (\begin{DoxyParamCaption}\item[{const char $\ast$}]{reason,  }\item[{}]{... }\end{DoxyParamCaption})}



Print an error message on stderr, then exit. 

This function prints the provided error string and optional following arguments to stderr, and then exits with a status of EXIT\+\_\+\+FAILURE.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em reason} & The output string to describe the error. \\
\hline
\mbox{\texttt{ in}}  & {\em ...} & Optional following arguments to output. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00113}{113}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00114\ \{}
\DoxyCodeLine{00115\ \ \ \ \ fputs\ (\textcolor{stringliteral}{"{}ERROR:\ "{}},\ stderr);}
\DoxyCodeLine{00116\ \ \ \ \ va\_list\ args;}
\DoxyCodeLine{00117\ \ \ \ \ va\_start\ (args,\ reason);}
\DoxyCodeLine{00118\ \ \ \ \ vfprintf\ (stderr,\ reason,\ args);}
\DoxyCodeLine{00119\ \ \ \ \ va\_end\ (args);}
\DoxyCodeLine{00120\ \ \ \ \ putc\ (\textcolor{charliteral}{'\(\backslash\)n'},\ stderr);}
\DoxyCodeLine{00121\ \ \ \ \ exit\ (EXIT\_FAILURE);}
\DoxyCodeLine{00122\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 21
\mbox{\Hypertarget{hex2otf_8c_afd499a24ff34cb5c19b52df795422c12}\label{hex2otf_8c_afd499a24ff34cb5c19b52df795422c12}} 
\index{hex2otf.c@{hex2otf.c}!fillBitmap@{fillBitmap}}
\index{fillBitmap@{fillBitmap}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillBitmap()}{fillBitmap()}}
{\footnotesize\ttfamily void fill\+Bitmap (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font }\end{DoxyParamCaption})}



Fill Open\+Type bitmap data and location tables. 

This function fills an Embedded Bitmap Data (EBDT) \mbox{\hyperlink{structTable}{Table}} and an Embedded Bitmap Location (EBLC) \mbox{\hyperlink{structTable}{Table}} with glyph bitmap information. These tables enable embedding bitmaps in Open\+Type fonts. No Embedded Bitmap Scaling (EBSC) table is used for the bitmap glyphs, only EBDT and EBLC.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & Pointer to a \mbox{\hyperlink{structFont}{Font}} struct in which to add bitmaps. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01728}{1728}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01729\ \{}
\DoxyCodeLine{01730\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *\textcolor{keyword}{const}\ glyphs\ =\ getBufferHead\ (font-\/>glyphs);}
\DoxyCodeLine{01731\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *\textcolor{keyword}{const}\ glyphsEnd\ =\ getBufferTail\ (font-\/>glyphs);}
\DoxyCodeLine{01732\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ bitmapsSize\ =\ 0;}
\DoxyCodeLine{01733\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *glyph\ =\ glyphs;\ glyph\ <\ glyphsEnd;\ glyph++)}
\DoxyCodeLine{01734\ \ \ \ \ \ \ \ \ bitmapsSize\ +=\ glyph-\/>byteCount;}
\DoxyCodeLine{01735\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *ebdt\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (4\ +\ bitmapsSize);}
\DoxyCodeLine{01736\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}EBDT"{}},\ ebdt);}
\DoxyCodeLine{01737\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (ebdt,\ 2);\ \textcolor{comment}{//\ majorVersion}}
\DoxyCodeLine{01738\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (ebdt,\ 0);\ \textcolor{comment}{//\ minorVersion}}
\DoxyCodeLine{01739\ \ \ \ \ uint\_fast8\_t\ byteCount\ =\ 0;\ \textcolor{comment}{//\ unequal\ to\ any\ glyph}}
\DoxyCodeLine{01740\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ pos\ =\ 0;}
\DoxyCodeLine{01741\ \ \ \ \ \textcolor{keywordtype}{bool}\ combining\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{01742\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *rangeHeads\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (32);}
\DoxyCodeLine{01743\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *offsets\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (64);}
\DoxyCodeLine{01744\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *glyph\ =\ glyphs;\ glyph\ <\ glyphsEnd;\ glyph++)}
\DoxyCodeLine{01745\ \ \ \ \ \{}
\DoxyCodeLine{01746\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (glyph-\/>byteCount\ !=\ byteCount\ ||\ glyph-\/>pos\ !=\ pos\ ||}
\DoxyCodeLine{01747\ \ \ \ \ \ \ \ \ \ \ \ \ glyph-\/>combining\ !=\ combining)}
\DoxyCodeLine{01748\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01749\ \ \ \ \ \ \ \ \ \ \ \ \ storeU16\ (rangeHeads,\ glyph\ -\/\ glyphs);}
\DoxyCodeLine{01750\ \ \ \ \ \ \ \ \ \ \ \ \ storeU32\ (offsets,\ countBufferedBytes\ (ebdt));}
\DoxyCodeLine{01751\ \ \ \ \ \ \ \ \ \ \ \ \ byteCount\ =\ glyph-\/>byteCount;}
\DoxyCodeLine{01752\ \ \ \ \ \ \ \ \ \ \ \ \ pos\ =\ glyph-\/>pos;}
\DoxyCodeLine{01753\ \ \ \ \ \ \ \ \ \ \ \ \ combining\ =\ glyph-\/>combining;}
\DoxyCodeLine{01754\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01755\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (ebdt,\ glyph-\/>bitmap,\ byteCount);}
\DoxyCodeLine{01756\ \ \ \ \ \}}
\DoxyCodeLine{01757\ \ \ \ \ \textcolor{keyword}{const}\ uint\_least16\_t\ *ranges\ =\ getBufferHead\ (rangeHeads);}
\DoxyCodeLine{01758\ \ \ \ \ \textcolor{keyword}{const}\ uint\_least16\_t\ *rangesEnd\ =\ getBufferTail\ (rangeHeads);}
\DoxyCodeLine{01759\ \ \ \ \ uint\_fast32\_t\ rangeCount\ =\ rangesEnd\ -\/\ ranges;}
\DoxyCodeLine{01760\ \ \ \ \ storeU16\ (rangeHeads,\ font-\/>glyphCount);}
\DoxyCodeLine{01761\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *eblc\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (4096);}
\DoxyCodeLine{01762\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}EBLC"{}},\ eblc);}
\DoxyCodeLine{01763\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (eblc,\ 2);\ \textcolor{comment}{//\ majorVersion}}
\DoxyCodeLine{01764\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (eblc,\ 0);\ \textcolor{comment}{//\ minorVersion}}
\DoxyCodeLine{01765\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (eblc,\ 1);\ \textcolor{comment}{//\ numSizes}}
\DoxyCodeLine{01766\ \ \ \ \ \{\ \textcolor{comment}{//\ bitmapSizes[0]}}
\DoxyCodeLine{01767\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (eblc,\ 56);\ \textcolor{comment}{//\ indexSubTableArrayOffset}}
\DoxyCodeLine{01768\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (eblc,\ (8\ +\ 20)\ *\ rangeCount);\ \textcolor{comment}{//\ indexTablesSize}}
\DoxyCodeLine{01769\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (eblc,\ rangeCount);\ \textcolor{comment}{//\ numberOfIndexSubTables}}
\DoxyCodeLine{01770\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (eblc,\ 0);\ \textcolor{comment}{//\ colorRef}}
\DoxyCodeLine{01771\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ hori}}
\DoxyCodeLine{01772\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}});\ \textcolor{comment}{//\ ascender}}
\DoxyCodeLine{01773\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ -\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}});\ \textcolor{comment}{//\ descender}}
\DoxyCodeLine{01774\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ font-\/>maxWidth);\ \textcolor{comment}{//\ widthMax}}
\DoxyCodeLine{01775\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 1);\ \textcolor{comment}{//\ caretSlopeNumerator}}
\DoxyCodeLine{01776\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ caretSlopeDenominator}}
\DoxyCodeLine{01777\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ caretOffset}}
\DoxyCodeLine{01778\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ minOriginSB}}
\DoxyCodeLine{01779\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ minAdvanceSB}}
\DoxyCodeLine{01780\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}});\ \textcolor{comment}{//\ maxBeforeBL}}
\DoxyCodeLine{01781\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ -\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}});\ \textcolor{comment}{//\ minAfterBL}}
\DoxyCodeLine{01782\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ pad1}}
\DoxyCodeLine{01783\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ pad2}}
\DoxyCodeLine{01784\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01785\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ vert}}
\DoxyCodeLine{01786\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}});\ \textcolor{comment}{//\ ascender}}
\DoxyCodeLine{01787\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ -\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}});\ \textcolor{comment}{//\ descender}}
\DoxyCodeLine{01788\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ font-\/>maxWidth);\ \textcolor{comment}{//\ widthMax}}
\DoxyCodeLine{01789\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 1);\ \textcolor{comment}{//\ caretSlopeNumerator}}
\DoxyCodeLine{01790\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ caretSlopeDenominator}}
\DoxyCodeLine{01791\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ caretOffset}}
\DoxyCodeLine{01792\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ minOriginSB}}
\DoxyCodeLine{01793\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ minAdvanceSB}}
\DoxyCodeLine{01794\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}});\ \textcolor{comment}{//\ maxBeforeBL}}
\DoxyCodeLine{01795\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ -\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}});\ \textcolor{comment}{//\ minAfterBL}}
\DoxyCodeLine{01796\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ pad1}}
\DoxyCodeLine{01797\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ pad2}}
\DoxyCodeLine{01798\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01799\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (eblc,\ 0);\ \textcolor{comment}{//\ startGlyphIndex}}
\DoxyCodeLine{01800\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (eblc,\ font-\/>glyphCount\ -\/\ 1);\ \textcolor{comment}{//\ endGlyphIndex}}
\DoxyCodeLine{01801\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 16);\ \textcolor{comment}{//\ ppemX}}
\DoxyCodeLine{01802\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 16);\ \textcolor{comment}{//\ ppemY}}
\DoxyCodeLine{01803\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 1);\ \textcolor{comment}{//\ bitDepth}}
\DoxyCodeLine{01804\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 1);\ \textcolor{comment}{//\ flags\ =\ Horizontal}}
\DoxyCodeLine{01805\ \ \ \ \ \}}
\DoxyCodeLine{01806\ \ \ \ \ \{\ \textcolor{comment}{//\ IndexSubTableArray}}
\DoxyCodeLine{01807\ \ \ \ \ \ \ \ \ uint\_fast32\_t\ offset\ =\ rangeCount\ *\ 8;}
\DoxyCodeLine{01808\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ uint\_least16\_t\ *p\ =\ ranges;\ p\ <\ rangesEnd;\ p++)}
\DoxyCodeLine{01809\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01810\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (eblc,\ *p);\ \textcolor{comment}{//\ firstGlyphIndex}}
\DoxyCodeLine{01811\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (eblc,\ p[1]\ -\/\ 1);\ \textcolor{comment}{//\ lastGlyphIndex}}
\DoxyCodeLine{01812\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (eblc,\ offset);\ \textcolor{comment}{//\ additionalOffsetToIndexSubtable}}
\DoxyCodeLine{01813\ \ \ \ \ \ \ \ \ \ \ \ \ offset\ +=\ 20;}
\DoxyCodeLine{01814\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01815\ \ \ \ \ \}}
\DoxyCodeLine{01816\ \ \ \ \ \{\ \textcolor{comment}{//\ IndexSubTables}}
\DoxyCodeLine{01817\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint\_least32\_t\ *offset\ =\ getBufferHead\ (offsets);}
\DoxyCodeLine{01818\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ uint\_least16\_t\ *p\ =\ ranges;\ p\ <\ rangesEnd;\ p++)}
\DoxyCodeLine{01819\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01820\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *glyph\ =\ \&glyphs[*p];}
\DoxyCodeLine{01821\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (eblc,\ 2);\ \textcolor{comment}{//\ indexFormat}}
\DoxyCodeLine{01822\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (eblc,\ 5);\ \textcolor{comment}{//\ imageFormat}}
\DoxyCodeLine{01823\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (eblc,\ *offset++);\ \textcolor{comment}{//\ imageDataOffset}}
\DoxyCodeLine{01824\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (eblc,\ glyph-\/>\mbox{\hyperlink{structGlyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}});\ \textcolor{comment}{//\ imageSize}}
\DoxyCodeLine{01825\ \ \ \ \ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ bigMetrics}}
\DoxyCodeLine{01826\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}});\ \textcolor{comment}{//\ height}}
\DoxyCodeLine{01827\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint\_fast8\_t\ width\ =\ \mbox{\hyperlink{hex2otf_8c_a79e768c38f3b21419f01d2d1347523be}{PW}}\ (glyph-\/>\mbox{\hyperlink{structGlyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}});}
\DoxyCodeLine{01828\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ width);\ \textcolor{comment}{//\ width}}
\DoxyCodeLine{01829\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ glyph-\/>\mbox{\hyperlink{structGlyph_ac113da35f4193641855eaf51547f9b43}{pos}});\ \textcolor{comment}{//\ horiBearingX}}
\DoxyCodeLine{01830\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}});\ \textcolor{comment}{//\ horiBearingY}}
\DoxyCodeLine{01831\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ glyph-\/>\mbox{\hyperlink{structGlyph_ada6b8b4b9419096c413b5a29dbc54aac}{combining}}\ ?\ 0\ :\ width);\ \textcolor{comment}{//\ horiAdvance}}
\DoxyCodeLine{01832\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ vertBearingX}}
\DoxyCodeLine{01833\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ 0);\ \textcolor{comment}{//\ vertBearingY}}
\DoxyCodeLine{01834\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (eblc,\ \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}});\ \textcolor{comment}{//\ vertAdvance}}
\DoxyCodeLine{01835\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01836\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01837\ \ \ \ \ \}}
\DoxyCodeLine{01838\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (rangeHeads);}
\DoxyCodeLine{01839\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (offsets);}
\DoxyCodeLine{01840\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 22
Here is the caller graph for this function\+:
% FIG 23
\mbox{\Hypertarget{hex2otf_8c_ab37b4f7111692f8d1163bafd2aab831e}\label{hex2otf_8c_ab37b4f7111692f8d1163bafd2aab831e}} 
\index{hex2otf.c@{hex2otf.c}!fillBlankOutline@{fillBlankOutline}}
\index{fillBlankOutline@{fillBlankOutline}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillBlankOutline()}{fillBlankOutline()}}
{\footnotesize\ttfamily void fill\+Blank\+Outline (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font }\end{DoxyParamCaption})}



Create a dummy blank outline in a font table. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & Pointer to a \mbox{\hyperlink{structFont}{Font}} struct to insert a blank outline. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01697}{1697}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01698\ \{}
\DoxyCodeLine{01699\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *glyf\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (12);}
\DoxyCodeLine{01700\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}glyf"{}},\ glyf);}
\DoxyCodeLine{01701\ \ \ \ \ \textcolor{comment}{//\ Empty\ table\ is\ not\ allowed,\ but\ an\ empty\ outline\ for\ glyph\ 0\ suffices.}}
\DoxyCodeLine{01702\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (glyf,\ 0);\ \textcolor{comment}{//\ numberOfContours}}
\DoxyCodeLine{01703\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (glyf,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (0));\ \textcolor{comment}{//\ xMin}}
\DoxyCodeLine{01704\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (glyf,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (0));\ \textcolor{comment}{//\ yMin}}
\DoxyCodeLine{01705\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (glyf,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (0));\ \textcolor{comment}{//\ xMax}}
\DoxyCodeLine{01706\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (glyf,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (0));\ \textcolor{comment}{//\ yMax}}
\DoxyCodeLine{01707\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (glyf,\ 0);\ \textcolor{comment}{//\ instructionLength}}
\DoxyCodeLine{01708\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *loca\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (2\ *\ (font-\/>glyphCount\ +\ 1));}
\DoxyCodeLine{01709\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}loca"{}},\ loca);}
\DoxyCodeLine{01710\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (loca,\ 0);\ \textcolor{comment}{//\ offsets[0]}}
\DoxyCodeLine{01711\ \ \ \ \ assert\ (countBufferedBytes\ (glyf)\ \%\ 2\ ==\ 0);}
\DoxyCodeLine{01712\ \ \ \ \ \textcolor{keywordflow}{for}\ (uint\_fast32\_t\ i\ =\ 1;\ i\ <=\ font-\/>glyphCount;\ i++)}
\DoxyCodeLine{01713\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (loca,\ countBufferedBytes\ (glyf)\ /\ 2);\ \textcolor{comment}{//\ offsets[i]}}
\DoxyCodeLine{01714\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 24
Here is the caller graph for this function\+:
% FIG 25
\mbox{\Hypertarget{hex2otf_8c_a3d62aa29f94c3fa78ca4438739d64a62}\label{hex2otf_8c_a3d62aa29f94c3fa78ca4438739d64a62}} 
\index{hex2otf.c@{hex2otf.c}!fillCFF@{fillCFF}}
\index{fillCFF@{fillCFF}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillCFF()}{fillCFF()}}
{\footnotesize\ttfamily void fill\+CFF (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font,  }\item[{int}]{version,  }\item[{const \mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{Name\+Strings}}}]{names }\end{DoxyParamCaption})}



Add a CFF table to a font. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & Pointer to a \mbox{\hyperlink{structFont}{Font}} struct to contain the CFF table. \\
\hline
\mbox{\texttt{ in}}  & {\em version} & Version of CFF table, with value 1 or 2. \\
\hline
\mbox{\texttt{ in}}  & {\em names} & List of Name\+Strings. \\
\hline
\end{DoxyParams}
Use fixed width integer for variables to simplify offset calculation.

Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01329}{1329}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01330\ \{}
\DoxyCodeLine{01331\ \ \ \ \ \textcolor{comment}{//\ HACK:\ For\ convenience,\ CFF\ data\ structures\ are\ hard\ coded.}}
\DoxyCodeLine{01332\ \ \ \ \ assert\ (0\ <\ version\ \&\&\ version\ <=\ 2);}
\DoxyCodeLine{01333\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *cff\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (65536);}
\DoxyCodeLine{01334\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ version\ ==\ 1\ ?\ \textcolor{stringliteral}{"{}CFF\ "{}}\ :\ \textcolor{stringliteral}{"{}CFF2"{}},\ cff);}
\DoxyCodeLine{01335\ \textcolor{comment}{}}
\DoxyCodeLine{01336\ \textcolor{comment}{\ \ \ \ ///\ Use\ fixed\ width\ integer\ for\ variables\ to\ simplify\ offset\ calculation.}}
\DoxyCodeLine{01337\ \textcolor{comment}{}\textcolor{preprocessor}{\ \ \ \ \#define\ cacheCFF32(buf,\ x)\ (cacheU8\ ((buf),\ 29),\ cacheU32\ ((buf),\ (x)))}}
\DoxyCodeLine{01338\ }
\DoxyCodeLine{01339\ \ \ \ \ \textcolor{comment}{//\ In\ Unifont,\ 16px\ glyphs\ are\ more\ common.\ This\ is\ used\ by\ CFF1\ only.}}
\DoxyCodeLine{01340\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ defaultWidth\ =\ 16,\ nominalWidth\ =\ 8;}
\DoxyCodeLine{01341\ \ \ \ \ \textcolor{keywordflow}{if}\ (version\ ==\ 1)}
\DoxyCodeLine{01342\ \ \ \ \ \{}
\DoxyCodeLine{01343\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *strings\ =\ \mbox{\hyperlink{hex2otf_8c_aa52cd46a50cdc2040a72e5c7ecfa944b}{prepareStringIndex}}\ (names);}
\DoxyCodeLine{01344\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ stringsSize\ =\ countBufferedBytes\ (strings);}
\DoxyCodeLine{01345\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *cffName\ =\ names[6];}
\DoxyCodeLine{01346\ \ \ \ \ \ \ \ \ assert\ (cffName);}
\DoxyCodeLine{01347\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ nameLength\ =\ strlen\ (cffName);}
\DoxyCodeLine{01348\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ namesSize\ =\ nameLength\ +\ 5;}
\DoxyCodeLine{01349\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ These\ sizes\ must\ be\ updated\ together\ with\ the\ data\ below.}}
\DoxyCodeLine{01350\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ offsets[]\ =\ \{4,\ namesSize,\ 45,\ stringsSize,\ 2,\ 5,\ 8,\ 32,\ 4,\ 0\};}
\DoxyCodeLine{01351\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a97af00050b8fd6b7e7b81c7027e4c8e6}{prepareOffsets}}\ (offsets);}
\DoxyCodeLine{01352\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ Header}}
\DoxyCodeLine{01353\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 1);\ \textcolor{comment}{//\ major}}
\DoxyCodeLine{01354\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 0);\ \textcolor{comment}{//\ minor}}
\DoxyCodeLine{01355\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 4);\ \textcolor{comment}{//\ hdrSize}}
\DoxyCodeLine{01356\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 1);\ \textcolor{comment}{//\ offSize}}
\DoxyCodeLine{01357\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01358\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[0]);}
\DoxyCodeLine{01359\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ Name\ INDEX\ (should\ not\ be\ used\ by\ OpenType\ readers)}}
\DoxyCodeLine{01360\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cff,\ 1);\ \textcolor{comment}{//\ count}}
\DoxyCodeLine{01361\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 1);\ \textcolor{comment}{//\ offSize}}
\DoxyCodeLine{01362\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 1);\ \textcolor{comment}{//\ offset[0]}}
\DoxyCodeLine{01363\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (nameLength\ +\ 1\ >\ 255)\ \textcolor{comment}{//\ must\ be\ too\ long;\ spec\ limit\ is\ 63}}
\DoxyCodeLine{01364\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}PostScript\ name\ is\ too\ long."{}});}
\DoxyCodeLine{01365\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ nameLength\ +\ 1);\ \textcolor{comment}{//\ offset[1]}}
\DoxyCodeLine{01366\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ cffName,\ nameLength);}
\DoxyCodeLine{01367\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01368\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[1]);}
\DoxyCodeLine{01369\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ Top\ DICT\ INDEX}}
\DoxyCodeLine{01370\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cff,\ 1);\ \textcolor{comment}{//\ count}}
\DoxyCodeLine{01371\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 1);\ \textcolor{comment}{//\ offSize}}
\DoxyCodeLine{01372\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 1);\ \textcolor{comment}{//\ offset[0]}}
\DoxyCodeLine{01373\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 41);\ \textcolor{comment}{//\ offset[1]}}
\DoxyCodeLine{01374\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 391);\ \textcolor{comment}{//\ "{}Adobe"{}}}
\DoxyCodeLine{01375\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 392);\ \textcolor{comment}{//\ "{}Identity"{}}}
\DoxyCodeLine{01376\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 0);}
\DoxyCodeLine{01377\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ (\textcolor{keywordtype}{byte}[])\{12,\ 30\},\ 2);\ \textcolor{comment}{//\ ROS}}
\DoxyCodeLine{01378\ \ \ \ \ \ \ \ \ \ \ \ \ cacheCFF32\ (cff,\ font-\/>glyphCount);}
\DoxyCodeLine{01379\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ (\textcolor{keywordtype}{byte}[])\{12,\ 34\},\ 2);\ \textcolor{comment}{//\ CIDCount}}
\DoxyCodeLine{01380\ \ \ \ \ \ \ \ \ \ \ \ \ cacheCFF32\ (cff,\ offsets[6]);}
\DoxyCodeLine{01381\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ (\textcolor{keywordtype}{byte}[])\{12,\ 36\},\ 2);\ \textcolor{comment}{//\ FDArray}}
\DoxyCodeLine{01382\ \ \ \ \ \ \ \ \ \ \ \ \ cacheCFF32\ (cff,\ offsets[5]);}
\DoxyCodeLine{01383\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ (\textcolor{keywordtype}{byte}[])\{12,\ 37\},\ 2);\ \textcolor{comment}{//\ FDSelect}}
\DoxyCodeLine{01384\ \ \ \ \ \ \ \ \ \ \ \ \ cacheCFF32\ (cff,\ offsets[4]);}
\DoxyCodeLine{01385\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 15);\ \textcolor{comment}{//\ charset}}
\DoxyCodeLine{01386\ \ \ \ \ \ \ \ \ \ \ \ \ cacheCFF32\ (cff,\ offsets[8]);}
\DoxyCodeLine{01387\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 17);\ \textcolor{comment}{//\ CharStrings}}
\DoxyCodeLine{01388\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01389\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[2]);}
\DoxyCodeLine{01390\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ String\ INDEX}}
\DoxyCodeLine{01391\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}}\ (cff,\ strings);}
\DoxyCodeLine{01392\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (strings);}
\DoxyCodeLine{01393\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01394\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[3]);}
\DoxyCodeLine{01395\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cff,\ 0);\ \textcolor{comment}{//\ Global\ Subr\ INDEX}}
\DoxyCodeLine{01396\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[4]);}
\DoxyCodeLine{01397\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ Charsets}}
\DoxyCodeLine{01398\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 2);\ \textcolor{comment}{//\ format}}
\DoxyCodeLine{01399\ \ \ \ \ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ Range2[0]}}
\DoxyCodeLine{01400\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cff,\ 1);\ \textcolor{comment}{//\ first}}
\DoxyCodeLine{01401\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cff,\ font-\/>glyphCount\ -\/\ 2);\ \textcolor{comment}{//\ nLeft}}
\DoxyCodeLine{01402\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01403\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01404\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[5]);}
\DoxyCodeLine{01405\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ FDSelect}}
\DoxyCodeLine{01406\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 3);\ \textcolor{comment}{//\ format}}
\DoxyCodeLine{01407\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cff,\ 1);\ \textcolor{comment}{//\ nRanges}}
\DoxyCodeLine{01408\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cff,\ 0);\ \textcolor{comment}{//\ first}}
\DoxyCodeLine{01409\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 0);\ \textcolor{comment}{//\ fd}}
\DoxyCodeLine{01410\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cff,\ font-\/>glyphCount);\ \textcolor{comment}{//\ sentinel}}
\DoxyCodeLine{01411\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01412\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[6]);}
\DoxyCodeLine{01413\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ FDArray}}
\DoxyCodeLine{01414\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cff,\ 1);\ \textcolor{comment}{//\ count}}
\DoxyCodeLine{01415\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 1);\ \textcolor{comment}{//\ offSize}}
\DoxyCodeLine{01416\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 1);\ \textcolor{comment}{//\ offset[0]}}
\DoxyCodeLine{01417\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 28);\ \textcolor{comment}{//\ offset[1]}}
\DoxyCodeLine{01418\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 393);}
\DoxyCodeLine{01419\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ (\textcolor{keywordtype}{byte}[])\{12,\ 38\},\ 2);\ \textcolor{comment}{//\ FontName}}
\DoxyCodeLine{01420\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Windows\ requires\ FontMatrix\ in\ Font\ DICT.}}
\DoxyCodeLine{01421\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{byte}\ unit[]\ =\ \{0x1e,0x15,0x62,0x5c,0x6f\};\ \textcolor{comment}{//\ 1/64\ (0.015625)}}
\DoxyCodeLine{01422\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ unit,\ \textcolor{keyword}{sizeof}\ unit);}
\DoxyCodeLine{01423\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 0);}
\DoxyCodeLine{01424\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 0);}
\DoxyCodeLine{01425\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ unit,\ \textcolor{keyword}{sizeof}\ unit);}
\DoxyCodeLine{01426\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 0);}
\DoxyCodeLine{01427\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 0);}
\DoxyCodeLine{01428\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ (\textcolor{keywordtype}{byte}[])\{12,\ 7\},\ 2);\ \textcolor{comment}{//\ FontMatrix}}
\DoxyCodeLine{01429\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ offsets[8]\ -\/\ offsets[7]);\ \textcolor{comment}{//\ size}}
\DoxyCodeLine{01430\ \ \ \ \ \ \ \ \ \ \ \ \ cacheCFF32\ (cff,\ offsets[7]);\ \textcolor{comment}{//\ offset}}
\DoxyCodeLine{01431\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 18);\ \textcolor{comment}{//\ Private}}
\DoxyCodeLine{01432\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01433\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[7]);}
\DoxyCodeLine{01434\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ Private}}
\DoxyCodeLine{01435\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (defaultWidth));}
\DoxyCodeLine{01436\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 20);\ \textcolor{comment}{//\ defaultWidthX}}
\DoxyCodeLine{01437\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (nominalWidth));}
\DoxyCodeLine{01438\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 21);\ \textcolor{comment}{//\ nominalWidthX}}
\DoxyCodeLine{01439\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01440\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[8]);}
\DoxyCodeLine{01441\ \ \ \ \ \}}
\DoxyCodeLine{01442\ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{01443\ \ \ \ \ \{}
\DoxyCodeLine{01444\ \ \ \ \ \ \ \ \ assert\ (version\ ==\ 2);}
\DoxyCodeLine{01445\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ These\ sizes\ must\ be\ updated\ together\ with\ the\ data\ below.}}
\DoxyCodeLine{01446\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ offsets[]\ =\ \{5,\ 21,\ 4,\ 10,\ 0\};}
\DoxyCodeLine{01447\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a97af00050b8fd6b7e7b81c7027e4c8e6}{prepareOffsets}}\ (offsets);}
\DoxyCodeLine{01448\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ Header}}
\DoxyCodeLine{01449\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 2);\ \textcolor{comment}{//\ majorVersion}}
\DoxyCodeLine{01450\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 0);\ \textcolor{comment}{//\ minorVersion}}
\DoxyCodeLine{01451\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 5);\ \textcolor{comment}{//\ headerSize}}
\DoxyCodeLine{01452\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cff,\ offsets[1]\ -\/\ offsets[0]);\ \textcolor{comment}{//\ topDictLength}}
\DoxyCodeLine{01453\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01454\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[0]);}
\DoxyCodeLine{01455\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ Top\ DICT}}
\DoxyCodeLine{01456\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{byte}\ unit[]\ =\ \{0x1e,0x15,0x62,0x5c,0x6f\};\ \textcolor{comment}{//\ 1/64\ (0.015625)}}
\DoxyCodeLine{01457\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ unit,\ \textcolor{keyword}{sizeof}\ unit);}
\DoxyCodeLine{01458\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 0);}
\DoxyCodeLine{01459\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 0);}
\DoxyCodeLine{01460\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ unit,\ \textcolor{keyword}{sizeof}\ unit);}
\DoxyCodeLine{01461\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 0);}
\DoxyCodeLine{01462\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 0);}
\DoxyCodeLine{01463\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ (\textcolor{keywordtype}{byte}[])\{12,\ 7\},\ 2);\ \textcolor{comment}{//\ FontMatrix}}
\DoxyCodeLine{01464\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ offsets[2]);}
\DoxyCodeLine{01465\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (cff,\ (\textcolor{keywordtype}{byte}[])\{12,\ 36\},\ 2);\ \textcolor{comment}{//\ FDArray}}
\DoxyCodeLine{01466\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ offsets[3]);}
\DoxyCodeLine{01467\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 17);\ \textcolor{comment}{//\ CharStrings}}
\DoxyCodeLine{01468\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01469\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[1]);}
\DoxyCodeLine{01470\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (cff,\ 0);\ \textcolor{comment}{//\ Global\ Subr\ INDEX}}
\DoxyCodeLine{01471\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[2]);}
\DoxyCodeLine{01472\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ Font\ DICT\ INDEX}}
\DoxyCodeLine{01473\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (cff,\ 1);\ \textcolor{comment}{//\ count}}
\DoxyCodeLine{01474\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 1);\ \textcolor{comment}{//\ offSize}}
\DoxyCodeLine{01475\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 1);\ \textcolor{comment}{//\ offset[0]}}
\DoxyCodeLine{01476\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 4);\ \textcolor{comment}{//\ offset[1]}}
\DoxyCodeLine{01477\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 0);}
\DoxyCodeLine{01478\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (cff,\ 0);}
\DoxyCodeLine{01479\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ 18);\ \textcolor{comment}{//\ Private}}
\DoxyCodeLine{01480\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01481\ \ \ \ \ \ \ \ \ assert\ (countBufferedBytes\ (cff)\ ==\ offsets[3]);}
\DoxyCodeLine{01482\ \ \ \ \ \}}
\DoxyCodeLine{01483\ \ \ \ \ \{\ \textcolor{comment}{//\ CharStrings\ INDEX}}
\DoxyCodeLine{01484\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *offsets\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (4096);}
\DoxyCodeLine{01485\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *charstrings\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (4096);}
\DoxyCodeLine{01486\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *outline\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (1024);}
\DoxyCodeLine{01487\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *glyph\ =\ getBufferHead\ (font-\/>glyphs);}
\DoxyCodeLine{01488\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *\textcolor{keyword}{const}\ endGlyph\ =\ glyph\ +\ font-\/>glyphCount;}
\DoxyCodeLine{01489\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (;\ glyph\ <\ endGlyph;\ glyph++)}
\DoxyCodeLine{01490\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01491\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ CFF\ offsets\ start\ at\ 1}}
\DoxyCodeLine{01492\ \ \ \ \ \ \ \ \ \ \ \ \ storeU32\ (offsets,\ countBufferedBytes\ (charstrings)\ +\ 1);}
\DoxyCodeLine{01493\ }
\DoxyCodeLine{01494\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ rx\ =\ -\/glyph-\/>\mbox{\hyperlink{structGlyph_ac113da35f4193641855eaf51547f9b43}{pos}};}
\DoxyCodeLine{01495\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ ry\ =\ \mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}};}
\DoxyCodeLine{01496\ \ \ \ \ \ \ \ \ \ \ \ \ resetBuffer\ (outline);}
\DoxyCodeLine{01497\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a5af7c9bcfd40e5b11f9d12c40966bb65}{buildOutline}}\ (outline,\ glyph-\/>\mbox{\hyperlink{structGlyph_abbbc1113c6e10dc0fa986abbb7f7665e}{bitmap}},\ glyph-\/>\mbox{\hyperlink{structGlyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}},\ \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8caf18243d8ef6a7f601ae03a6cffbabadd}{FILL\_LEFT}});}
\DoxyCodeLine{01498\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}\ CFFOp\ \{rmoveto=21,\ hmoveto=22,\ vmoveto=4,\ hlineto=6,}
\DoxyCodeLine{01499\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ vlineto=7,\ endchar=14\};}
\DoxyCodeLine{01500\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}\ CFFOp\ pendingOp\ =\ 0;}
\DoxyCodeLine{01501\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ STACK\_LIMIT\ =\ version\ ==\ 1\ ?\ 48\ :\ 513;}
\DoxyCodeLine{01502\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ stackSize\ =\ 0;}
\DoxyCodeLine{01503\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ isDrawing\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{01504\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ width\ =\ glyph-\/>\mbox{\hyperlink{structGlyph_ada6b8b4b9419096c413b5a29dbc54aac}{combining}}\ ?\ 0\ :\ \mbox{\hyperlink{hex2otf_8c_a79e768c38f3b21419f01d2d1347523be}{PW}}\ (glyph-\/>\mbox{\hyperlink{structGlyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}});}
\DoxyCodeLine{01505\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (version\ ==\ 1\ \&\&\ width\ !=\ defaultWidth)}
\DoxyCodeLine{01506\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01507\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (charstrings,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (width\ -\/\ nominalWidth));}
\DoxyCodeLine{01508\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ stackSize++;}
\DoxyCodeLine{01509\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01510\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ *p\ =\ getBufferHead\ (outline),}
\DoxyCodeLine{01511\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *\textcolor{keyword}{const}\ end\ =\ getBufferTail\ (outline);\ p\ <\ end;)}
\DoxyCodeLine{01512\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01513\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ s\ =\ 0;}
\DoxyCodeLine{01514\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{enum}\ \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38}{ContourOp}}\ op\ =\ *p++;}
\DoxyCodeLine{01515\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (op\ ==\ \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a01f5371958d06ab1411c46f72f049f45}{OP\_POINT}})}
\DoxyCodeLine{01516\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01517\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ x\ =\ *p++,\ y\ =\ *p++;}
\DoxyCodeLine{01518\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (x\ !=\ rx)}
\DoxyCodeLine{01519\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01520\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (charstrings,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (x\ -\/\ rx));}
\DoxyCodeLine{01521\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rx\ =\ x;}
\DoxyCodeLine{01522\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ stackSize++;}
\DoxyCodeLine{01523\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ s\ |=\ 1;}
\DoxyCodeLine{01524\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01525\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (y\ !=\ ry)}
\DoxyCodeLine{01526\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01527\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (charstrings,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (y\ -\/\ ry));}
\DoxyCodeLine{01528\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ry\ =\ y;}
\DoxyCodeLine{01529\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ stackSize++;}
\DoxyCodeLine{01530\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ s\ |=\ 2;}
\DoxyCodeLine{01531\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01532\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ assert\ (!(isDrawing\ \&\&\ s\ ==\ 3));}
\DoxyCodeLine{01533\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01534\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (s)}
\DoxyCodeLine{01535\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01536\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!isDrawing)}
\DoxyCodeLine{01537\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01538\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{enum}\ CFFOp\ moves[]\ =\ \{0,\ hmoveto,\ vmoveto,}
\DoxyCodeLine{01539\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rmoveto\};}
\DoxyCodeLine{01540\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (charstrings,\ moves[s]);}
\DoxyCodeLine{01541\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ stackSize\ =\ 0;}
\DoxyCodeLine{01542\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01543\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (!pendingOp)}
\DoxyCodeLine{01544\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ pendingOp\ =\ (\textcolor{keyword}{enum}\ CFFOp[])\{0,\ hlineto,\ vlineto\}[s];}
\DoxyCodeLine{01545\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01546\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (!isDrawing)}
\DoxyCodeLine{01547\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01548\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ only\ when\ the\ first\ point\ happens\ to\ be\ (0,\ 0)}}
\DoxyCodeLine{01549\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a51be7f69e0f6053772b3ddacf215df84}{cacheCFFOperand}}\ (charstrings,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (0));}
\DoxyCodeLine{01550\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (charstrings,\ hmoveto);}
\DoxyCodeLine{01551\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ stackSize\ =\ 0;}
\DoxyCodeLine{01552\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01553\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (op\ ==\ \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}{OP\_CLOSE}}\ ||\ stackSize\ >=\ STACK\_LIMIT)}
\DoxyCodeLine{01554\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01555\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ assert\ (stackSize\ <=\ STACK\_LIMIT);}
\DoxyCodeLine{01556\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (charstrings,\ pendingOp);}
\DoxyCodeLine{01557\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ pendingOp\ =\ 0;}
\DoxyCodeLine{01558\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ stackSize\ =\ 0;}
\DoxyCodeLine{01559\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01560\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ isDrawing\ =\ op\ !=\ \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}{OP\_CLOSE}};}
\DoxyCodeLine{01561\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01562\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (version\ ==\ 1)}
\DoxyCodeLine{01563\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (charstrings,\ endchar);}
\DoxyCodeLine{01564\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01565\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ lastOffset\ =\ countBufferedBytes\ (charstrings)\ +\ 1;}
\DoxyCodeLine{01566\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \#if\ SIZE\_MAX\ >\ U32MAX}}
\DoxyCodeLine{01567\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (lastOffset\ >\ \mbox{\hyperlink{hex2otf_8c_a7ccab01e56208030185cefdca13e0ac8}{U32MAX}})}
\DoxyCodeLine{01568\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}CFF\ data\ exceeded\ size\ limit."{}});}
\DoxyCodeLine{01569\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \#endif}}
\DoxyCodeLine{01570\ \ \ \ \ \ \ \ \ storeU32\ (offsets,\ lastOffset);}
\DoxyCodeLine{01571\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ offsetSize\ =\ 1\ +\ (lastOffset\ >\ 0xff)}
\DoxyCodeLine{01572\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ (lastOffset\ >\ 0xffff)}
\DoxyCodeLine{01573\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ (lastOffset\ >\ 0xffffff);}
\DoxyCodeLine{01574\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ count\ (must\ match\ 'numGlyphs'\ in\ 'maxp'\ table)}}
\DoxyCodeLine{01575\ \ \ \ \ \ \ \ \ cacheU\ (cff,\ font-\/>glyphCount,\ version\ *\ 2);}
\DoxyCodeLine{01576\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (cff,\ offsetSize);\ \textcolor{comment}{//\ offSize}}
\DoxyCodeLine{01577\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint\_least32\_t\ *p\ =\ getBufferHead\ (offsets);}
\DoxyCodeLine{01578\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint\_least32\_t\ *\textcolor{keyword}{const}\ end\ =\ getBufferTail\ (offsets);}
\DoxyCodeLine{01579\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (;\ p\ <\ end;\ p++)}
\DoxyCodeLine{01580\ \ \ \ \ \ \ \ \ \ \ \ \ cacheU\ (cff,\ *p,\ offsetSize);\ \textcolor{comment}{//\ offsets}}
\DoxyCodeLine{01581\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}}\ (cff,\ charstrings);\ \textcolor{comment}{//\ data}}
\DoxyCodeLine{01582\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (offsets);}
\DoxyCodeLine{01583\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (charstrings);}
\DoxyCodeLine{01584\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (outline);}
\DoxyCodeLine{01585\ \ \ \ \ \}}
\DoxyCodeLine{01586\ \textcolor{preprocessor}{\ \ \ \ \#undef\ cacheCFF32}}
\DoxyCodeLine{01587\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 26
Here is the caller graph for this function\+:
% FIG 27
\mbox{\Hypertarget{hex2otf_8c_a6362601eb41d051a103a1d9edcd4f284}\label{hex2otf_8c_a6362601eb41d051a103a1d9edcd4f284}} 
\index{hex2otf.c@{hex2otf.c}!fillCmapTable@{fillCmapTable}}
\index{fillCmapTable@{fillCmapTable}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillCmapTable()}{fillCmapTable()}}
{\footnotesize\ttfamily void fill\+Cmap\+Table (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font }\end{DoxyParamCaption})}



Fill a \char`\"{}cmap\char`\"{} font table. 

The \char`\"{}cmap\char`\"{} table contains character to glyph index mapping information.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The \mbox{\hyperlink{structFont}{Font}} struct to which to add the table. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l02109}{2109}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{02110\ \{}
\DoxyCodeLine{02111\ \ \ \ \ \mbox{\hyperlink{structGlyph}{Glyph}}\ *\textcolor{keyword}{const}\ glyphs\ =\ getBufferHead\ (font-\/>glyphs);}
\DoxyCodeLine{02112\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *rangeHeads\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (16);}
\DoxyCodeLine{02113\ \ \ \ \ uint\_fast32\_t\ rangeCount\ =\ 0;}
\DoxyCodeLine{02114\ \ \ \ \ uint\_fast32\_t\ bmpRangeCount\ =\ 1;\ \textcolor{comment}{//\ 1\ for\ the\ last\ 0xffff-\/0xffff\ range}}
\DoxyCodeLine{02115\ \ \ \ \ glyphs[0].\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}}\ =\ glyphs[1].\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}};\ \textcolor{comment}{//\ to\ start\ a\ range\ at\ glyph\ 1}}
\DoxyCodeLine{02116\ \ \ \ \ \textcolor{keywordflow}{for}\ (uint\_fast16\_t\ i\ =\ 1;\ i\ <\ font-\/>glyphCount;\ i++)}
\DoxyCodeLine{02117\ \ \ \ \ \{}
\DoxyCodeLine{02118\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (glyphs[i].codePoint\ !=\ glyphs[i\ -\/\ 1].codePoint\ +\ 1)}
\DoxyCodeLine{02119\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{02120\ \ \ \ \ \ \ \ \ \ \ \ \ storeU16\ (rangeHeads,\ i);}
\DoxyCodeLine{02121\ \ \ \ \ \ \ \ \ \ \ \ \ rangeCount++;}
\DoxyCodeLine{02122\ \ \ \ \ \ \ \ \ \ \ \ \ bmpRangeCount\ +=\ glyphs[i].\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}}\ <\ 0xffff;}
\DoxyCodeLine{02123\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02124\ \ \ \ \ \}}
\DoxyCodeLine{02125\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *cmap\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (256);}
\DoxyCodeLine{02126\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}cmap"{}},\ cmap);}
\DoxyCodeLine{02127\ \ \ \ \ \textcolor{comment}{//\ Format\ 4\ table\ is\ always\ generated\ for\ compatibility.}}
\DoxyCodeLine{02128\ \ \ \ \ \textcolor{keywordtype}{bool}\ hasFormat12\ =\ glyphs[font-\/>glyphCount\ -\/\ 1].\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}}\ >\ 0xffff;}
\DoxyCodeLine{02129\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 0);\ \textcolor{comment}{//\ version}}
\DoxyCodeLine{02130\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 1\ +\ hasFormat12);\ \textcolor{comment}{//\ numTables}}
\DoxyCodeLine{02131\ \ \ \ \ \{\ \textcolor{comment}{//\ encodingRecords[0]}}
\DoxyCodeLine{02132\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 3);\ \textcolor{comment}{//\ platformID}}
\DoxyCodeLine{02133\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 1);\ \textcolor{comment}{//\ encodingID}}
\DoxyCodeLine{02134\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (cmap,\ 12\ +\ 8\ *\ hasFormat12);\ \textcolor{comment}{//\ subtableOffset}}
\DoxyCodeLine{02135\ \ \ \ \ \}}
\DoxyCodeLine{02136\ \ \ \ \ \textcolor{keywordflow}{if}\ (hasFormat12)\ \textcolor{comment}{//\ encodingRecords[1]}}
\DoxyCodeLine{02137\ \ \ \ \ \{}
\DoxyCodeLine{02138\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 3);\ \textcolor{comment}{//\ platformID}}
\DoxyCodeLine{02139\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 10);\ \textcolor{comment}{//\ encodingID}}
\DoxyCodeLine{02140\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (cmap,\ 36\ +\ 8\ *\ bmpRangeCount);\ \textcolor{comment}{//\ subtableOffset}}
\DoxyCodeLine{02141\ \ \ \ \ \}}
\DoxyCodeLine{02142\ \ \ \ \ \textcolor{keyword}{const}\ uint\_least16\_t\ *ranges\ =\ getBufferHead\ (rangeHeads);}
\DoxyCodeLine{02143\ \ \ \ \ \textcolor{keyword}{const}\ uint\_least16\_t\ *\textcolor{keyword}{const}\ rangesEnd\ =\ getBufferTail\ (rangeHeads);}
\DoxyCodeLine{02144\ \ \ \ \ storeU16\ (rangeHeads,\ font-\/>glyphCount);}
\DoxyCodeLine{02145\ \ \ \ \ \{\ \textcolor{comment}{//\ format\ 4\ table}}
\DoxyCodeLine{02146\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 4);\ \textcolor{comment}{//\ format}}
\DoxyCodeLine{02147\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 16\ +\ 8\ *\ bmpRangeCount);\ \textcolor{comment}{//\ length}}
\DoxyCodeLine{02148\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 0);\ \textcolor{comment}{//\ language}}
\DoxyCodeLine{02149\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (bmpRangeCount\ *\ 2\ >\ \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}})}
\DoxyCodeLine{02150\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Too\ many\ ranges\ in\ 'cmap'\ table."{}});}
\DoxyCodeLine{02151\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ bmpRangeCount\ *\ 2);\ \textcolor{comment}{//\ segCountX2}}
\DoxyCodeLine{02152\ \ \ \ \ \ \ \ \ uint\_fast16\_t\ searchRange\ =\ 1,\ entrySelector\ =\ -\/1;}
\DoxyCodeLine{02153\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (searchRange\ <=\ bmpRangeCount)}
\DoxyCodeLine{02154\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{02155\ \ \ \ \ \ \ \ \ \ \ \ \ searchRange\ <<=\ 1;}
\DoxyCodeLine{02156\ \ \ \ \ \ \ \ \ \ \ \ \ entrySelector++;}
\DoxyCodeLine{02157\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02158\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ searchRange);\ \textcolor{comment}{//\ searchRange}}
\DoxyCodeLine{02159\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ entrySelector);\ \textcolor{comment}{//\ entrySelector}}
\DoxyCodeLine{02160\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ bmpRangeCount\ *\ 2\ -\/\ searchRange);\ \textcolor{comment}{//\ rangeShift}}
\DoxyCodeLine{02161\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ endCode[]}}
\DoxyCodeLine{02162\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint\_least16\_t\ *p\ =\ ranges;}
\DoxyCodeLine{02163\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (p++;\ p\ <\ rangesEnd\ \&\&\ glyphs[*p].\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}}\ <\ 0xffff;\ p++)}
\DoxyCodeLine{02164\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ glyphs[*p\ -\/\ 1].codePoint);}
\DoxyCodeLine{02165\ \ \ \ \ \ \ \ \ \ \ \ \ uint\_fast32\_t\ cp\ =\ glyphs[*p\ -\/\ 1].\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}};}
\DoxyCodeLine{02166\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (cp\ >\ 0xfffe)}
\DoxyCodeLine{02167\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cp\ =\ 0xfffe;}
\DoxyCodeLine{02168\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ cp);}
\DoxyCodeLine{02169\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 0xffff);}
\DoxyCodeLine{02170\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02171\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 0);\ \textcolor{comment}{//\ reservedPad}}
\DoxyCodeLine{02172\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ startCode[]}}
\DoxyCodeLine{02173\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint\_fast32\_t\ i\ =\ 0;\ i\ <\ bmpRangeCount\ -\/\ 1;\ i++)}
\DoxyCodeLine{02174\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ glyphs[ranges[i]].codePoint);}
\DoxyCodeLine{02175\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 0xffff);}
\DoxyCodeLine{02176\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02177\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ idDelta[]}}
\DoxyCodeLine{02178\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint\_least16\_t\ *p\ =\ ranges;}
\DoxyCodeLine{02179\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (;\ p\ <\ rangesEnd\ \&\&\ glyphs[*p].\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}}\ <\ 0xffff;\ p++)}
\DoxyCodeLine{02180\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ *p\ -\/\ glyphs[*p].codePoint);}
\DoxyCodeLine{02181\ \ \ \ \ \ \ \ \ \ \ \ \ uint\_fast16\_t\ delta\ =\ 1;}
\DoxyCodeLine{02182\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (p\ <\ rangesEnd\ \&\&\ *p\ ==\ 0xffff)}
\DoxyCodeLine{02183\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ delta\ =\ *p\ -\/\ glyphs[*p].\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}};}
\DoxyCodeLine{02184\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ delta);}
\DoxyCodeLine{02185\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02186\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ idRangeOffsets[]}}
\DoxyCodeLine{02187\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (uint\_least16\_t\ i\ =\ 0;\ i\ <\ bmpRangeCount;\ i++)}
\DoxyCodeLine{02188\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 0);}
\DoxyCodeLine{02189\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02190\ \ \ \ \ \}}
\DoxyCodeLine{02191\ \ \ \ \ \textcolor{keywordflow}{if}\ (hasFormat12)\ \textcolor{comment}{//\ format\ 12\ table}}
\DoxyCodeLine{02192\ \ \ \ \ \{}
\DoxyCodeLine{02193\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 12);\ \textcolor{comment}{//\ format}}
\DoxyCodeLine{02194\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (cmap,\ 0);\ \textcolor{comment}{//\ reserved}}
\DoxyCodeLine{02195\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (cmap,\ 16\ +\ 12\ *\ rangeCount);\ \textcolor{comment}{//\ length}}
\DoxyCodeLine{02196\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (cmap,\ 0);\ \textcolor{comment}{//\ language}}
\DoxyCodeLine{02197\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (cmap,\ rangeCount);\ \textcolor{comment}{//\ numGroups}}
\DoxyCodeLine{02198\ }
\DoxyCodeLine{02199\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ groups[]}}
\DoxyCodeLine{02200\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ uint\_least16\_t\ *p\ =\ ranges;\ p\ <\ rangesEnd;\ p++)}
\DoxyCodeLine{02201\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{02202\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (cmap,\ glyphs[*p].codePoint);\ \textcolor{comment}{//\ startCharCode}}
\DoxyCodeLine{02203\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (cmap,\ glyphs[p[1]\ -\/\ 1].codePoint);\ \textcolor{comment}{//\ endCharCode}}
\DoxyCodeLine{02204\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (cmap,\ *p);\ \textcolor{comment}{//\ startGlyphID}}
\DoxyCodeLine{02205\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02206\ \ \ \ \ \}}
\DoxyCodeLine{02207\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (rangeHeads);}
\DoxyCodeLine{02208\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 28
Here is the caller graph for this function\+:
% FIG 29
\mbox{\Hypertarget{hex2otf_8c_a6c1e982fdc6c51b9f84051daa2e71936}\label{hex2otf_8c_a6c1e982fdc6c51b9f84051daa2e71936}} 
\index{hex2otf.c@{hex2otf.c}!fillGposTable@{fillGposTable}}
\index{fillGposTable@{fillGposTable}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillGposTable()}{fillGposTable()}}
{\footnotesize\ttfamily void fill\+Gpos\+Table (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font }\end{DoxyParamCaption})}



Fill a \char`\"{}\+GPOS\char`\"{} font table. 

The \char`\"{}\+GPOS\char`\"{} table contains information for glyph positioning.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The \mbox{\hyperlink{structFont}{Font}} struct to which to add the table. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l02241}{2241}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{02242\ \{}
\DoxyCodeLine{02243\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *gpos\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (16);}
\DoxyCodeLine{02244\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}GPOS"{}},\ gpos);}
\DoxyCodeLine{02245\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gpos,\ 1);\ \textcolor{comment}{//\ majorVersion}}
\DoxyCodeLine{02246\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gpos,\ 0);\ \textcolor{comment}{//\ minorVersion}}
\DoxyCodeLine{02247\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gpos,\ 10);\ \textcolor{comment}{//\ scriptListOffset}}
\DoxyCodeLine{02248\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gpos,\ 12);\ \textcolor{comment}{//\ featureListOffset}}
\DoxyCodeLine{02249\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gpos,\ 14);\ \textcolor{comment}{//\ lookupListOffset}}
\DoxyCodeLine{02250\ \ \ \ \ \{\ \textcolor{comment}{//\ ScriptList\ table}}
\DoxyCodeLine{02251\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gpos,\ 0);\ \textcolor{comment}{//\ scriptCount}}
\DoxyCodeLine{02252\ \ \ \ \ \}}
\DoxyCodeLine{02253\ \ \ \ \ \{\ \textcolor{comment}{//\ Feature\ List\ table}}
\DoxyCodeLine{02254\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gpos,\ 0);\ \textcolor{comment}{//\ featureCount}}
\DoxyCodeLine{02255\ \ \ \ \ \}}
\DoxyCodeLine{02256\ \ \ \ \ \{\ \textcolor{comment}{//\ Lookup\ List\ Table}}
\DoxyCodeLine{02257\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gpos,\ 0);\ \textcolor{comment}{//\ lookupCount}}
\DoxyCodeLine{02258\ \ \ \ \ \}}
\DoxyCodeLine{02259\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 30
Here is the caller graph for this function\+:
% FIG 31
\mbox{\Hypertarget{hex2otf_8c_a06b8121dea15c8117b7c951ffb22fb7e}\label{hex2otf_8c_a06b8121dea15c8117b7c951ffb22fb7e}} 
\index{hex2otf.c@{hex2otf.c}!fillGsubTable@{fillGsubTable}}
\index{fillGsubTable@{fillGsubTable}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillGsubTable()}{fillGsubTable()}}
{\footnotesize\ttfamily void fill\+Gsub\+Table (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font }\end{DoxyParamCaption})}



Fill a \char`\"{}\+GSUB\char`\"{} font table. 

The \char`\"{}\+GSUB\char`\"{} table contains information for glyph substitution.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The \mbox{\hyperlink{structFont}{Font}} struct to which to add the table. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l02269}{2269}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{02270\ \{}
\DoxyCodeLine{02271\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *gsub\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (38);}
\DoxyCodeLine{02272\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}GSUB"{}},\ gsub);}
\DoxyCodeLine{02273\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 1);\ \textcolor{comment}{//\ majorVersion}}
\DoxyCodeLine{02274\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 0);\ \textcolor{comment}{//\ minorVersion}}
\DoxyCodeLine{02275\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 10);\ \textcolor{comment}{//\ scriptListOffset}}
\DoxyCodeLine{02276\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 34);\ \textcolor{comment}{//\ featureListOffset}}
\DoxyCodeLine{02277\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 36);\ \textcolor{comment}{//\ lookupListOffset}}
\DoxyCodeLine{02278\ \ \ \ \ \{\ \textcolor{comment}{//\ ScriptList\ table}}
\DoxyCodeLine{02279\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 2);\ \textcolor{comment}{//\ scriptCount}}
\DoxyCodeLine{02280\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ scriptRecords[0]}}
\DoxyCodeLine{02281\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (gsub,\ \textcolor{stringliteral}{"{}DFLT"{}},\ 4);\ \textcolor{comment}{//\ scriptTag}}
\DoxyCodeLine{02282\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 14);\ \textcolor{comment}{//\ scriptOffset}}
\DoxyCodeLine{02283\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02284\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ scriptRecords[1]}}
\DoxyCodeLine{02285\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (gsub,\ \textcolor{stringliteral}{"{}thai"{}},\ 4);\ \textcolor{comment}{//\ scriptTag}}
\DoxyCodeLine{02286\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 14);\ \textcolor{comment}{//\ scriptOffset}}
\DoxyCodeLine{02287\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02288\ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ Script\ table}}
\DoxyCodeLine{02289\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 4);\ \textcolor{comment}{//\ defaultLangSysOffset}}
\DoxyCodeLine{02290\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 0);\ \textcolor{comment}{//\ langSysCount}}
\DoxyCodeLine{02291\ \ \ \ \ \ \ \ \ \ \ \ \ \{\ \textcolor{comment}{//\ Default\ Language\ System\ table}}
\DoxyCodeLine{02292\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 0);\ \textcolor{comment}{//\ lookupOrderOffset}}
\DoxyCodeLine{02293\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 0);\ \textcolor{comment}{//\ requiredFeatureIndex}}
\DoxyCodeLine{02294\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 0);\ \textcolor{comment}{//\ featureIndexCount}}
\DoxyCodeLine{02295\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02296\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02297\ \ \ \ \ \}}
\DoxyCodeLine{02298\ \ \ \ \ \{\ \textcolor{comment}{//\ Feature\ List\ table}}
\DoxyCodeLine{02299\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 0);\ \textcolor{comment}{//\ featureCount}}
\DoxyCodeLine{02300\ \ \ \ \ \}}
\DoxyCodeLine{02301\ \ \ \ \ \{\ \textcolor{comment}{//\ Lookup\ List\ Table}}
\DoxyCodeLine{02302\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (gsub,\ 0);\ \textcolor{comment}{//\ lookupCount}}
\DoxyCodeLine{02303\ \ \ \ \ \}}
\DoxyCodeLine{02304\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 32
Here is the caller graph for this function\+:
% FIG 33
\mbox{\Hypertarget{hex2otf_8c_a4ac0c02117b703a71bee3dd34e2eb306}\label{hex2otf_8c_a4ac0c02117b703a71bee3dd34e2eb306}} 
\index{hex2otf.c@{hex2otf.c}!fillHeadTable@{fillHeadTable}}
\index{fillHeadTable@{fillHeadTable}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillHeadTable()}{fillHeadTable()}}
{\footnotesize\ttfamily void fill\+Head\+Table (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font,  }\item[{enum \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}{Loca\+Format}}}]{loca\+Format,  }\item[{\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\+\_\+t}}}]{x\+Min }\end{DoxyParamCaption})}



Fill a \char`\"{}head\char`\"{} font table. 

The \char`\"{}head\char`\"{} table contains font header information common to the whole font.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The \mbox{\hyperlink{structFont}{Font}} struct to which to add the table. \\
\hline
\mbox{\texttt{ in}}  & {\em loca\+Format} & The \char`\"{}loca\char`\"{} offset index location table. \\
\hline
\mbox{\texttt{ in}}  & {\em x\+Min} & The minimum x-\/coordinate for a glyph. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01853}{1853}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01854\ \{}
\DoxyCodeLine{01855\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *head\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (56);}
\DoxyCodeLine{01856\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}head"{}},\ head);}
\DoxyCodeLine{01857\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ 1);\ \textcolor{comment}{//\ majorVersion}}
\DoxyCodeLine{01858\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ 0);\ \textcolor{comment}{//\ minorVersion}}
\DoxyCodeLine{01859\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}{cacheZeros}}\ (head,\ 4);\ \textcolor{comment}{//\ fontRevision\ (unused)}}
\DoxyCodeLine{01860\ \ \ \ \ \textcolor{comment}{//\ The\ 'checksumAdjustment'\ field\ is\ a\ checksum\ of\ the\ entire\ file.}}
\DoxyCodeLine{01861\ \ \ \ \ \textcolor{comment}{//\ It\ is\ later\ calculated\ and\ written\ directly\ in\ the\ 'writeFont'\ function.}}
\DoxyCodeLine{01862\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (head,\ 0);\ \textcolor{comment}{//\ checksumAdjustment\ (placeholder)}}
\DoxyCodeLine{01863\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (head,\ 0x5f0f3cf5);\ \textcolor{comment}{//\ magicNumber}}
\DoxyCodeLine{01864\ \ \ \ \ \textcolor{keyword}{const}\ uint\_fast16\_t\ flags\ =}
\DoxyCodeLine{01865\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}}\ (\ 0)\ \textcolor{comment}{//\ baseline\ at\ y=0}}
\DoxyCodeLine{01866\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}}\ (\ 1)\ \textcolor{comment}{//\ LSB\ at\ x=0\ (doubtful;\ probably\ should\ be\ LSB=xMin)}}
\DoxyCodeLine{01867\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (\ 2)\ \textcolor{comment}{//\ instructions\ may\ depend\ on\ point\ size}}
\DoxyCodeLine{01868\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (\ 3)\ \textcolor{comment}{//\ force\ internal\ ppem\ to\ integers}}
\DoxyCodeLine{01869\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (\ 4)\ \textcolor{comment}{//\ instructions\ may\ alter\ advance\ width}}
\DoxyCodeLine{01870\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (\ 5)\ \textcolor{comment}{//\ not\ used\ in\ OpenType}}
\DoxyCodeLine{01871\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (\ 6)\ \textcolor{comment}{//\ not\ used\ in\ OpenType}}
\DoxyCodeLine{01872\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (\ 7)\ \textcolor{comment}{//\ not\ used\ in\ OpenType}}
\DoxyCodeLine{01873\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (\ 8)\ \textcolor{comment}{//\ not\ used\ in\ OpenType}}
\DoxyCodeLine{01874\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (\ 9)\ \textcolor{comment}{//\ not\ used\ in\ OpenType}}
\DoxyCodeLine{01875\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (10)\ \textcolor{comment}{//\ not\ used\ in\ OpenType}}
\DoxyCodeLine{01876\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (11)\ \textcolor{comment}{//\ font\ transformed}}
\DoxyCodeLine{01877\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (12)\ \textcolor{comment}{//\ font\ converted}}
\DoxyCodeLine{01878\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (13)\ \textcolor{comment}{//\ font\ optimized\ for\ ClearType}}
\DoxyCodeLine{01879\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (14)\ \textcolor{comment}{//\ last\ resort\ font}}
\DoxyCodeLine{01880\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (15)\ \textcolor{comment}{//\ reserved}}
\DoxyCodeLine{01881\ \ \ \ \ ;}
\DoxyCodeLine{01882\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ flags);\ \textcolor{comment}{//\ flags}}
\DoxyCodeLine{01883\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ \mbox{\hyperlink{hex2otf_8c_a652fd701381105d0d34ca4084cca413c}{FUPEM}});\ \textcolor{comment}{//\ unitsPerEm}}
\DoxyCodeLine{01884\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}{cacheZeros}}\ (head,\ 8);\ \textcolor{comment}{//\ created\ (unused)}}
\DoxyCodeLine{01885\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}{cacheZeros}}\ (head,\ 8);\ \textcolor{comment}{//\ modified\ (unused)}}
\DoxyCodeLine{01886\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (xMin));\ \textcolor{comment}{//\ xMin}}
\DoxyCodeLine{01887\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (-\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}}));\ \textcolor{comment}{//\ yMin}}
\DoxyCodeLine{01888\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (font-\/>maxWidth));\ \textcolor{comment}{//\ xMax}}
\DoxyCodeLine{01889\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (\mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}}));\ \textcolor{comment}{//\ yMax}}
\DoxyCodeLine{01890\ \ \ \ \ \textcolor{comment}{//\ macStyle\ (must\ agree\ with\ 'fsSelection'\ in\ 'OS/2'\ table)}}
\DoxyCodeLine{01891\ \ \ \ \ \textcolor{keyword}{const}\ uint\_fast16\_t\ macStyle\ =}
\DoxyCodeLine{01892\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (0)\ \textcolor{comment}{//\ bold}}
\DoxyCodeLine{01893\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (1)\ \textcolor{comment}{//\ italic}}
\DoxyCodeLine{01894\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (2)\ \textcolor{comment}{//\ underline}}
\DoxyCodeLine{01895\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (3)\ \textcolor{comment}{//\ outline}}
\DoxyCodeLine{01896\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (4)\ \textcolor{comment}{//\ shadow}}
\DoxyCodeLine{01897\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (5)\ \textcolor{comment}{//\ condensed}}
\DoxyCodeLine{01898\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (6)\ \textcolor{comment}{//\ extended}}
\DoxyCodeLine{01899\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ 7-\/15\ \ reserved}}
\DoxyCodeLine{01900\ \ \ \ \ ;}
\DoxyCodeLine{01901\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ macStyle);}
\DoxyCodeLine{01902\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}});\ \textcolor{comment}{//\ lowestRecPPEM}}
\DoxyCodeLine{01903\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ 2);\ \textcolor{comment}{//\ fontDirectionHint}}
\DoxyCodeLine{01904\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ locaFormat);\ \textcolor{comment}{//\ indexToLocFormat}}
\DoxyCodeLine{01905\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (head,\ 0);\ \textcolor{comment}{//\ glyphDataFormat}}
\DoxyCodeLine{01906\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 34
Here is the caller graph for this function\+:
% FIG 35
\mbox{\Hypertarget{hex2otf_8c_a28e889c3a36007c2e5d50a498046a6c6}\label{hex2otf_8c_a28e889c3a36007c2e5d50a498046a6c6}} 
\index{hex2otf.c@{hex2otf.c}!fillHheaTable@{fillHheaTable}}
\index{fillHheaTable@{fillHheaTable}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillHheaTable()}{fillHheaTable()}}
{\footnotesize\ttfamily void fill\+Hhea\+Table (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font,  }\item[{\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\+\_\+t}}}]{x\+Min }\end{DoxyParamCaption})}



Fill a \char`\"{}hhea\char`\"{} font table. 

The \char`\"{}hhea\char`\"{} table contains horizontal header information, for example left and right side bearings.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The \mbox{\hyperlink{structFont}{Font}} struct to which to add the table. \\
\hline
\mbox{\texttt{ in}}  & {\em x\+Min} & The minimum x-\/coordinate for a glyph. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01918}{1918}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01919\ \{}
\DoxyCodeLine{01920\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *hhea\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (36);}
\DoxyCodeLine{01921\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}hhea"{}},\ hhea);}
\DoxyCodeLine{01922\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ 1);\ \textcolor{comment}{//\ majorVersion}}
\DoxyCodeLine{01923\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ 0);\ \textcolor{comment}{//\ minorVersion}}
\DoxyCodeLine{01924\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (\mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}}));\ \textcolor{comment}{//\ ascender}}
\DoxyCodeLine{01925\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (-\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}}));\ \textcolor{comment}{//\ descender}}
\DoxyCodeLine{01926\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (0));\ \textcolor{comment}{//\ lineGap}}
\DoxyCodeLine{01927\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (font-\/>maxWidth));\ \textcolor{comment}{//\ advanceWidthMax}}
\DoxyCodeLine{01928\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (xMin));\ \textcolor{comment}{//\ minLeftSideBearing}}
\DoxyCodeLine{01929\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (0));\ \textcolor{comment}{//\ minRightSideBearing\ (unused)}}
\DoxyCodeLine{01930\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (font-\/>maxWidth));\ \textcolor{comment}{//\ xMaxExtent}}
\DoxyCodeLine{01931\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ 1);\ \textcolor{comment}{//\ caretSlopeRise}}
\DoxyCodeLine{01932\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ 0);\ \textcolor{comment}{//\ caretSlopeRun}}
\DoxyCodeLine{01933\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ 0);\ \textcolor{comment}{//\ caretOffset}}
\DoxyCodeLine{01934\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ 0);\ \textcolor{comment}{//\ reserved}}
\DoxyCodeLine{01935\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ 0);\ \textcolor{comment}{//\ reserved}}
\DoxyCodeLine{01936\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ 0);\ \textcolor{comment}{//\ reserved}}
\DoxyCodeLine{01937\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ 0);\ \textcolor{comment}{//\ reserved}}
\DoxyCodeLine{01938\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ 0);\ \textcolor{comment}{//\ metricDataFormat}}
\DoxyCodeLine{01939\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hhea,\ font-\/>glyphCount);\ \textcolor{comment}{//\ numberOfHMetrics}}
\DoxyCodeLine{01940\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 36
Here is the caller graph for this function\+:
% FIG 37
\mbox{\Hypertarget{hex2otf_8c_a97c9b2ae58f5989d68e639715c3f9df9}\label{hex2otf_8c_a97c9b2ae58f5989d68e639715c3f9df9}} 
\index{hex2otf.c@{hex2otf.c}!fillHmtxTable@{fillHmtxTable}}
\index{fillHmtxTable@{fillHmtxTable}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillHmtxTable()}{fillHmtxTable()}}
{\footnotesize\ttfamily void fill\+Hmtx\+Table (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font }\end{DoxyParamCaption})}



Fill an \char`\"{}hmtx\char`\"{} font table. 

The \char`\"{}hmtx\char`\"{} table contains horizontal metrics information.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The \mbox{\hyperlink{structFont}{Font}} struct to which to add the table. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l02087}{2087}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{02088\ \{}
\DoxyCodeLine{02089\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *hmtx\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (4\ *\ font-\/>glyphCount);}
\DoxyCodeLine{02090\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}hmtx"{}},\ hmtx);}
\DoxyCodeLine{02091\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *\textcolor{keyword}{const}\ glyphs\ =\ getBufferHead\ (font-\/>glyphs);}
\DoxyCodeLine{02092\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *\textcolor{keyword}{const}\ glyphsEnd\ =\ getBufferTail\ (font-\/>glyphs);}
\DoxyCodeLine{02093\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *glyph\ =\ glyphs;\ glyph\ <\ glyphsEnd;\ glyph++)}
\DoxyCodeLine{02094\ \ \ \ \ \{}
\DoxyCodeLine{02095\ \ \ \ \ \ \ \ \ int\_fast16\_t\ aw\ =\ glyph-\/>combining\ ?\ 0\ :\ \mbox{\hyperlink{hex2otf_8c_a79e768c38f3b21419f01d2d1347523be}{PW}}\ (glyph-\/>byteCount);}
\DoxyCodeLine{02096\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hmtx,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (aw));\ \textcolor{comment}{//\ advanceWidth}}
\DoxyCodeLine{02097\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (hmtx,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (glyph-\/>lsb));\ \textcolor{comment}{//\ lsb}}
\DoxyCodeLine{02098\ \ \ \ \ \}}
\DoxyCodeLine{02099\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 38
Here is the caller graph for this function\+:
% FIG 39
\mbox{\Hypertarget{hex2otf_8c_aff4f28ce178c84c7365245ec10034433}\label{hex2otf_8c_aff4f28ce178c84c7365245ec10034433}} 
\index{hex2otf.c@{hex2otf.c}!fillMaxpTable@{fillMaxpTable}}
\index{fillMaxpTable@{fillMaxpTable}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillMaxpTable()}{fillMaxpTable()}}
{\footnotesize\ttfamily void fill\+Maxp\+Table (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font,  }\item[{bool}]{is\+CFF,  }\item[{uint\+\_\+fast16\+\_\+t}]{max\+Points,  }\item[{uint\+\_\+fast16\+\_\+t}]{max\+Contours }\end{DoxyParamCaption})}



Fill a \char`\"{}maxp\char`\"{} font table. 

The \char`\"{}maxp\char`\"{} table contains maximum profile information, such as the memory required to contain the font.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The \mbox{\hyperlink{structFont}{Font}} struct to which to add the table. \\
\hline
\mbox{\texttt{ in}}  & {\em is\+CFF} & true if a CFF font is included, false otherwise. \\
\hline
\mbox{\texttt{ in}}  & {\em max\+Points} & Maximum points in a non-\/composite glyph. \\
\hline
\mbox{\texttt{ in}}  & {\em max\+Contours} & Maximum contours in a non-\/composite glyph. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01954}{1954}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01956\ \{}
\DoxyCodeLine{01957\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *maxp\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (32);}
\DoxyCodeLine{01958\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}maxp"{}},\ maxp);}
\DoxyCodeLine{01959\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (maxp,\ isCFF\ ?\ 0x00005000\ :\ 0x00010000);\ \textcolor{comment}{//\ version}}
\DoxyCodeLine{01960\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ font-\/>glyphCount);\ \textcolor{comment}{//\ numGlyphs}}
\DoxyCodeLine{01961\ \ \ \ \ \textcolor{keywordflow}{if}\ (isCFF)}
\DoxyCodeLine{01962\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{01963\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ maxPoints);\ \textcolor{comment}{//\ maxPoints}}
\DoxyCodeLine{01964\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ maxContours);\ \textcolor{comment}{//\ maxContours}}
\DoxyCodeLine{01965\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ 0);\ \textcolor{comment}{//\ maxCompositePoints}}
\DoxyCodeLine{01966\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ 0);\ \textcolor{comment}{//\ maxCompositeContours}}
\DoxyCodeLine{01967\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ 0);\ \textcolor{comment}{//\ maxZones}}
\DoxyCodeLine{01968\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ 0);\ \textcolor{comment}{//\ maxTwilightPoints}}
\DoxyCodeLine{01969\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ 0);\ \textcolor{comment}{//\ maxStorage}}
\DoxyCodeLine{01970\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ 0);\ \textcolor{comment}{//\ maxFunctionDefs}}
\DoxyCodeLine{01971\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ 0);\ \textcolor{comment}{//\ maxInstructionDefs}}
\DoxyCodeLine{01972\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ 0);\ \textcolor{comment}{//\ maxStackElements}}
\DoxyCodeLine{01973\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ 0);\ \textcolor{comment}{//\ maxSizeOfInstructions}}
\DoxyCodeLine{01974\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ 0);\ \textcolor{comment}{//\ maxComponentElements}}
\DoxyCodeLine{01975\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (maxp,\ 0);\ \textcolor{comment}{//\ maxComponentDepth}}
\DoxyCodeLine{01976\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 40
Here is the caller graph for this function\+:
% FIG 41
\mbox{\Hypertarget{hex2otf_8c_a79d8a322be9d9131b684a9ea67abe05e}\label{hex2otf_8c_a79d8a322be9d9131b684a9ea67abe05e}} 
\index{hex2otf.c@{hex2otf.c}!fillNameTable@{fillNameTable}}
\index{fillNameTable@{fillNameTable}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillNameTable()}{fillNameTable()}}
{\footnotesize\ttfamily void fill\+Name\+Table (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font,  }\item[{\mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{Name\+Strings}}}]{name\+Strings }\end{DoxyParamCaption})}



Fill a \char`\"{}name\char`\"{} font table. 

The \char`\"{}name\char`\"{} table contains name information, for example for Name IDs.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The \mbox{\hyperlink{structFont}{Font}} struct to which to add the table. \\
\hline
\mbox{\texttt{ in}}  & {\em names} & List of Name\+Strings. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l02366}{2366}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{02367\ \{}
\DoxyCodeLine{02368\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *name\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (2048);}
\DoxyCodeLine{02369\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}name"{}},\ name);}
\DoxyCodeLine{02370\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ nameStringCount\ =\ 0;}
\DoxyCodeLine{02371\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ \mbox{\hyperlink{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}{MAX\_NAME\_IDS}};\ i++)}
\DoxyCodeLine{02372\ \ \ \ \ \ \ \ \ nameStringCount\ +=\ !!nameStrings[i];}
\DoxyCodeLine{02373\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (name,\ 0);\ \textcolor{comment}{//\ version}}
\DoxyCodeLine{02374\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (name,\ nameStringCount);\ \textcolor{comment}{//\ count}}
\DoxyCodeLine{02375\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (name,\ 2\ *\ 3\ +\ 12\ *\ nameStringCount);\ \textcolor{comment}{//\ storageOffset}}
\DoxyCodeLine{02376\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *stringData\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (1024);}
\DoxyCodeLine{02377\ \ \ \ \ \textcolor{comment}{//\ nameRecord[]}}
\DoxyCodeLine{02378\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ \mbox{\hyperlink{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}{MAX\_NAME\_IDS}};\ i++)}
\DoxyCodeLine{02379\ \ \ \ \ \{}
\DoxyCodeLine{02380\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!nameStrings[i])}
\DoxyCodeLine{02381\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{02382\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ offset\ =\ countBufferedBytes\ (stringData);}
\DoxyCodeLine{02383\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a199befd98ef9ec0ee659d82609abded4}{cacheStringAsUTF16BE}}\ (stringData,\ nameStrings[i]);}
\DoxyCodeLine{02384\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ length\ =\ countBufferedBytes\ (stringData)\ -\/\ offset;}
\DoxyCodeLine{02385\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (offset\ >\ \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}}\ ||\ length\ >\ \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}})}
\DoxyCodeLine{02386\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Name\ strings\ are\ too\ long."{}});}
\DoxyCodeLine{02387\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Platform\ ID\ 0\ (Unicode)\ is\ not\ well\ supported.}}
\DoxyCodeLine{02388\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ ID\ 3\ (Windows)\ seems\ to\ be\ the\ best\ for\ compatibility.}}
\DoxyCodeLine{02389\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (name,\ 3);\ \textcolor{comment}{//\ platformID\ =\ Windows}}
\DoxyCodeLine{02390\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (name,\ 1);\ \textcolor{comment}{//\ encodingID\ =\ Unicode\ BMP}}
\DoxyCodeLine{02391\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (name,\ 0x0409);\ \textcolor{comment}{//\ languageID\ =\ en-\/US}}
\DoxyCodeLine{02392\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (name,\ i);\ \textcolor{comment}{//\ nameID}}
\DoxyCodeLine{02393\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (name,\ length);\ \textcolor{comment}{//\ length}}
\DoxyCodeLine{02394\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (name,\ offset);\ \textcolor{comment}{//\ stringOffset}}
\DoxyCodeLine{02395\ \ \ \ \ \}}
\DoxyCodeLine{02396\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}}\ (name,\ stringData);}
\DoxyCodeLine{02397\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (stringData);}
\DoxyCodeLine{02398\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 42
Here is the caller graph for this function\+:
% FIG 43
\mbox{\Hypertarget{hex2otf_8c_ab6e3bb110dc3e55193c344cb7b56e328}\label{hex2otf_8c_ab6e3bb110dc3e55193c344cb7b56e328}} 
\index{hex2otf.c@{hex2otf.c}!fillOS2Table@{fillOS2Table}}
\index{fillOS2Table@{fillOS2Table}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillOS2Table()}{fillOS2Table()}}
{\footnotesize\ttfamily void fill\+OS2\+Table (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font }\end{DoxyParamCaption})}



Fill an \char`\"{}\+OS/2\char`\"{} font table. 

The \char`\"{}\+OS/2\char`\"{} table contains OS/2 and Windows font metrics information.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The \mbox{\hyperlink{structFont}{Font}} struct to which to add the table. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01986}{1986}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01987\ \{}
\DoxyCodeLine{01988\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *os2\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (100);}
\DoxyCodeLine{01989\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}OS/2"{}},\ os2);}
\DoxyCodeLine{01990\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ 5);\ \textcolor{comment}{//\ version}}
\DoxyCodeLine{01991\ \ \ \ \ \textcolor{comment}{//\ HACK:\ Average\ glyph\ width\ is\ not\ actually\ calculated.}}
\DoxyCodeLine{01992\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (font-\/>maxWidth));\ \textcolor{comment}{//\ xAvgCharWidth}}
\DoxyCodeLine{01993\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ 400);\ \textcolor{comment}{//\ usWeightClass\ =\ Normal}}
\DoxyCodeLine{01994\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ 5);\ \textcolor{comment}{//\ usWidthClass\ =\ Medium}}
\DoxyCodeLine{01995\ \ \ \ \ \textcolor{keyword}{const}\ uint\_fast16\_t\ typeFlags\ =}
\DoxyCodeLine{01996\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (0)\ \textcolor{comment}{//\ reserved}}
\DoxyCodeLine{01997\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ usage\ permissions,\ one\ of:}}
\DoxyCodeLine{01998\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Default:\ Installable\ embedding}}
\DoxyCodeLine{01999\ \ \ \ \ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (1)\ \textcolor{comment}{//\ Restricted\ License\ embedding}}
\DoxyCodeLine{02000\ \ \ \ \ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (2)\ \textcolor{comment}{//\ Preview\ \&\ Print\ embedding}}
\DoxyCodeLine{02001\ \ \ \ \ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (3)\ \textcolor{comment}{//\ Editable\ embedding}}
\DoxyCodeLine{02002\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ 4-\/7\ \ \ reserved}}
\DoxyCodeLine{02003\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (8)\ \textcolor{comment}{//\ no\ subsetting}}
\DoxyCodeLine{02004\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (9)\ \textcolor{comment}{//\ bitmap\ embedding\ only}}
\DoxyCodeLine{02005\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ 10-\/15\ reserved}}
\DoxyCodeLine{02006\ \ \ \ \ ;}
\DoxyCodeLine{02007\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ typeFlags);\ \textcolor{comment}{//\ fsType}}
\DoxyCodeLine{02008\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (5));\ \textcolor{comment}{//\ ySubscriptXSize}}
\DoxyCodeLine{02009\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (7));\ \textcolor{comment}{//\ ySubscriptYSize}}
\DoxyCodeLine{02010\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (0));\ \textcolor{comment}{//\ ySubscriptXOffset}}
\DoxyCodeLine{02011\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (1));\ \textcolor{comment}{//\ ySubscriptYOffset}}
\DoxyCodeLine{02012\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (5));\ \textcolor{comment}{//\ ySuperscriptXSize}}
\DoxyCodeLine{02013\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (7));\ \textcolor{comment}{//\ ySuperscriptYSize}}
\DoxyCodeLine{02014\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (0));\ \textcolor{comment}{//\ ySuperscriptXOffset}}
\DoxyCodeLine{02015\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (4));\ \textcolor{comment}{//\ ySuperscriptYOffset}}
\DoxyCodeLine{02016\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (1));\ \textcolor{comment}{//\ yStrikeoutSize}}
\DoxyCodeLine{02017\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (5));\ \textcolor{comment}{//\ yStrikeoutPosition}}
\DoxyCodeLine{02018\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ 0x080a);\ \textcolor{comment}{//\ sFamilyClass\ =\ Sans\ Serif,\ Matrix}}
\DoxyCodeLine{02019\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{byte}\ panose[]\ =}
\DoxyCodeLine{02020\ \ \ \ \ \{}
\DoxyCodeLine{02021\ \ \ \ \ \ \ \ \ 2,\ \textcolor{comment}{//\ Family\ Kind\ =\ Latin\ Text}}
\DoxyCodeLine{02022\ \ \ \ \ \ \ \ \ 11,\ \textcolor{comment}{//\ Serif\ Style\ =\ Normal\ Sans}}
\DoxyCodeLine{02023\ \ \ \ \ \ \ \ \ 4,\ \textcolor{comment}{//\ Weight\ =\ Thin}}
\DoxyCodeLine{02024\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Windows\ would\ render\ all\ glyphs\ to\ the\ same\ width,}}
\DoxyCodeLine{02025\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ if\ 'Proportion'\ is\ set\ to\ 'Monospaced'\ (as\ Unifont\ should\ be).}}
\DoxyCodeLine{02026\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 'Condensed'\ is\ the\ best\ alternative\ according\ to\ metrics.}}
\DoxyCodeLine{02027\ \ \ \ \ \ \ \ \ 6,\ \textcolor{comment}{//\ Proportion\ =\ Condensed}}
\DoxyCodeLine{02028\ \ \ \ \ \ \ \ \ 2,\ \textcolor{comment}{//\ Contrast\ =\ None}}
\DoxyCodeLine{02029\ \ \ \ \ \ \ \ \ 2,\ \textcolor{comment}{//\ Stroke\ =\ No\ Variation}}
\DoxyCodeLine{02030\ \ \ \ \ \ \ \ \ 2,\ \textcolor{comment}{//\ Arm\ Style\ =\ Straight\ Arms}}
\DoxyCodeLine{02031\ \ \ \ \ \ \ \ \ 8,\ \textcolor{comment}{//\ Letterform\ =\ Normal/Square}}
\DoxyCodeLine{02032\ \ \ \ \ \ \ \ \ 2,\ \textcolor{comment}{//\ Midline\ =\ Standard/Trimmed}}
\DoxyCodeLine{02033\ \ \ \ \ \ \ \ \ 4,\ \textcolor{comment}{//\ X-\/height\ =\ Constant/Large}}
\DoxyCodeLine{02034\ \ \ \ \ \};}
\DoxyCodeLine{02035\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (os2,\ panose,\ \textcolor{keyword}{sizeof}\ panose);\ \textcolor{comment}{//\ panose}}
\DoxyCodeLine{02036\ \ \ \ \ \textcolor{comment}{//\ HACK:\ All\ defined\ Unicode\ ranges\ are\ marked\ functional\ for\ convenience.}}
\DoxyCodeLine{02037\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (os2,\ 0xffffffff);\ \textcolor{comment}{//\ ulUnicodeRange1}}
\DoxyCodeLine{02038\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (os2,\ 0xffffffff);\ \textcolor{comment}{//\ ulUnicodeRange2}}
\DoxyCodeLine{02039\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (os2,\ 0xffffffff);\ \textcolor{comment}{//\ ulUnicodeRange3}}
\DoxyCodeLine{02040\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (os2,\ 0x0effffff);\ \textcolor{comment}{//\ ulUnicodeRange4}}
\DoxyCodeLine{02041\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (os2,\ \textcolor{stringliteral}{"{}GNU\ "{}},\ 4);\ \textcolor{comment}{//\ achVendID}}
\DoxyCodeLine{02042\ \ \ \ \ \textcolor{comment}{//\ fsSelection\ (must\ agree\ with\ 'macStyle'\ in\ 'head'\ table)}}
\DoxyCodeLine{02043\ \ \ \ \ \textcolor{keyword}{const}\ uint\_fast16\_t\ selection\ =}
\DoxyCodeLine{02044\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (0)\ \textcolor{comment}{//\ italic}}
\DoxyCodeLine{02045\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (1)\ \textcolor{comment}{//\ underscored}}
\DoxyCodeLine{02046\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (2)\ \textcolor{comment}{//\ negative}}
\DoxyCodeLine{02047\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (3)\ \textcolor{comment}{//\ outlined}}
\DoxyCodeLine{02048\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (4)\ \textcolor{comment}{//\ strikeout}}
\DoxyCodeLine{02049\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (5)\ \textcolor{comment}{//\ bold}}
\DoxyCodeLine{02050\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}}\ (6)\ \textcolor{comment}{//\ regular}}
\DoxyCodeLine{02051\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}}\ (7)\ \textcolor{comment}{//\ use\ sTypo*\ metrics\ in\ this\ table}}
\DoxyCodeLine{02052\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}}\ (8)\ \textcolor{comment}{//\ font\ name\ conforms\ to\ WWS\ model}}
\DoxyCodeLine{02053\ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (9)\ \textcolor{comment}{//\ oblique}}
\DoxyCodeLine{02054\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ 10-\/15\ reserved}}
\DoxyCodeLine{02055\ \ \ \ \ ;}
\DoxyCodeLine{02056\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ selection);}
\DoxyCodeLine{02057\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *glyphs\ =\ getBufferHead\ (font-\/>glyphs);}
\DoxyCodeLine{02058\ \ \ \ \ uint\_fast32\_t\ first\ =\ glyphs[1].\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}};}
\DoxyCodeLine{02059\ \ \ \ \ uint\_fast32\_t\ last\ =\ glyphs[font-\/>glyphCount\ -\/\ 1].\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}};}
\DoxyCodeLine{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{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{02062\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (\mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}}));\ \textcolor{comment}{//\ sTypoAscender}}
\DoxyCodeLine{02063\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (-\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}}));\ \textcolor{comment}{//\ sTypoDescender}}
\DoxyCodeLine{02064\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (0));\ \textcolor{comment}{//\ sTypoLineGap}}
\DoxyCodeLine{02065\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (\mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}}));\ \textcolor{comment}{//\ usWinAscent}}
\DoxyCodeLine{02066\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}}));\ \textcolor{comment}{//\ usWinDescent}}
\DoxyCodeLine{02067\ \ \ \ \ \textcolor{comment}{//\ HACK:\ All\ reasonable\ code\ pages\ are\ marked\ functional\ for\ convenience.}}
\DoxyCodeLine{02068\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (os2,\ 0x603f01ff);\ \textcolor{comment}{//\ ulCodePageRange1}}
\DoxyCodeLine{02069\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (os2,\ 0xffff0000);\ \textcolor{comment}{//\ ulCodePageRange2}}
\DoxyCodeLine{02070\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (8));\ \textcolor{comment}{//\ sxHeight}}
\DoxyCodeLine{02071\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (10));\ \textcolor{comment}{//\ sCapHeight}}
\DoxyCodeLine{02072\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ 0);\ \textcolor{comment}{//\ usDefaultChar}}
\DoxyCodeLine{02073\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ 0x20);\ \textcolor{comment}{//\ usBreakChar}}
\DoxyCodeLine{02074\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ 0);\ \textcolor{comment}{//\ usMaxContext}}
\DoxyCodeLine{02075\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ 0);\ \textcolor{comment}{//\ usLowerOpticalPointSize}}
\DoxyCodeLine{02076\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (os2,\ 0xffff);\ \textcolor{comment}{//\ usUpperOpticalPointSize}}
\DoxyCodeLine{02077\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 44
Here is the caller graph for this function\+:
% FIG 45
\mbox{\Hypertarget{hex2otf_8c_a0ddc03905c4918e04aa1e54a7c1716b1}\label{hex2otf_8c_a0ddc03905c4918e04aa1e54a7c1716b1}} 
\index{hex2otf.c@{hex2otf.c}!fillPostTable@{fillPostTable}}
\index{fillPostTable@{fillPostTable}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillPostTable()}{fillPostTable()}}
{\footnotesize\ttfamily void fill\+Post\+Table (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font }\end{DoxyParamCaption})}



Fill a \char`\"{}post\char`\"{} font table. 

The \char`\"{}post\char`\"{} table contains information for Post\+Script printers.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The \mbox{\hyperlink{structFont}{Font}} struct to which to add the table. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l02218}{2218}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{02219\ \{}
\DoxyCodeLine{02220\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *post\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (32);}
\DoxyCodeLine{02221\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}post"{}},\ post);}
\DoxyCodeLine{02222\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (post,\ 0x00030000);\ \textcolor{comment}{//\ version\ =\ 3.0}}
\DoxyCodeLine{02223\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (post,\ 0);\ \textcolor{comment}{//\ italicAngle}}
\DoxyCodeLine{02224\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (post,\ 0);\ \textcolor{comment}{//\ underlinePosition}}
\DoxyCodeLine{02225\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (post,\ 1);\ \textcolor{comment}{//\ underlineThickness}}
\DoxyCodeLine{02226\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (post,\ 1);\ \textcolor{comment}{//\ isFixedPitch}}
\DoxyCodeLine{02227\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (post,\ 0);\ \textcolor{comment}{//\ minMemType42}}
\DoxyCodeLine{02228\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (post,\ 0);\ \textcolor{comment}{//\ maxMemType42}}
\DoxyCodeLine{02229\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (post,\ 0);\ \textcolor{comment}{//\ minMemType1}}
\DoxyCodeLine{02230\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (post,\ 0);\ \textcolor{comment}{//\ maxMemType1}}
\DoxyCodeLine{02231\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 46
Here is the caller graph for this function\+:
% FIG 47
\mbox{\Hypertarget{hex2otf_8c_a326e4fa86eb32bb18e37eab8f495bd2f}\label{hex2otf_8c_a326e4fa86eb32bb18e37eab8f495bd2f}} 
\index{hex2otf.c@{hex2otf.c}!fillTrueType@{fillTrueType}}
\index{fillTrueType@{fillTrueType}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{fillTrueType()}{fillTrueType()}}
{\footnotesize\ttfamily void fill\+True\+Type (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font,  }\item[{enum \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}{Loca\+Format}} $\ast$}]{format,  }\item[{uint\+\_\+fast16\+\_\+t $\ast$}]{max\+Points,  }\item[{uint\+\_\+fast16\+\_\+t $\ast$}]{max\+Contours }\end{DoxyParamCaption})}



Add a True\+Type table to a font. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & Pointer to a \mbox{\hyperlink{structFont}{Font}} struct to contain the True\+Type table. \\
\hline
\mbox{\texttt{ in}}  & {\em format} & The True\+Type \char`\"{}loca\char`\"{} table format, Offset16 or Offset32. \\
\hline
\mbox{\texttt{ in}}  & {\em names} & List of Name\+Strings. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01597}{1597}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01599\ \{}
\DoxyCodeLine{01600\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *glyf\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (65536);}
\DoxyCodeLine{01601\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}glyf"{}},\ glyf);}
\DoxyCodeLine{01602\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *loca\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (4\ *\ (font-\/>glyphCount\ +\ 1));}
\DoxyCodeLine{01603\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1fab24bb2d2b38b68a38ec871afc3f9c}{addTable}}\ (font,\ \textcolor{stringliteral}{"{}loca"{}},\ loca);}
\DoxyCodeLine{01604\ \ \ \ \ *format\ =\ \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaad5e47b5a6bbf31be31e9b1328e7beef8}{LOCA\_OFFSET32}};}
\DoxyCodeLine{01605\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *endPoints\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (256);}
\DoxyCodeLine{01606\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *flags\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (256);}
\DoxyCodeLine{01607\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *xs\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (256);}
\DoxyCodeLine{01608\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *ys\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (256);}
\DoxyCodeLine{01609\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *outline\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (1024);}
\DoxyCodeLine{01610\ \ \ \ \ \mbox{\hyperlink{structGlyph}{Glyph}}\ *\textcolor{keyword}{const}\ glyphs\ =\ getBufferHead\ (font-\/>glyphs);}
\DoxyCodeLine{01611\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *\textcolor{keyword}{const}\ glyphsEnd\ =\ getBufferTail\ (font-\/>glyphs);}
\DoxyCodeLine{01612\ \ \ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{structGlyph}{Glyph}}\ *glyph\ =\ glyphs;\ glyph\ <\ glyphsEnd;\ glyph++)}
\DoxyCodeLine{01613\ \ \ \ \ \{}
\DoxyCodeLine{01614\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (loca,\ countBufferedBytes\ (glyf));}
\DoxyCodeLine{01615\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ rx\ =\ -\/glyph-\/>pos;}
\DoxyCodeLine{01616\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ ry\ =\ \mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}};}
\DoxyCodeLine{01617\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ xMin\ =\ \mbox{\hyperlink{hex2otf_8c_a688a4772d61221e9378e5003da51265a}{GLYPH\_MAX\_WIDTH}},\ xMax\ =\ 0;}
\DoxyCodeLine{01618\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ yMin\ =\ \mbox{\hyperlink{hex2otf_8c_ad0d9350c8943e5550a14f1cff5580a6c}{ASCENDER}},\ yMax\ =\ -\/\mbox{\hyperlink{hex2otf_8c_a91005fb187034d042b6bad9c9b1ae7c4}{DESCENDER}};}
\DoxyCodeLine{01619\ \ \ \ \ \ \ \ \ resetBuffer\ (endPoints);}
\DoxyCodeLine{01620\ \ \ \ \ \ \ \ \ resetBuffer\ (flags);}
\DoxyCodeLine{01621\ \ \ \ \ \ \ \ \ resetBuffer\ (xs);}
\DoxyCodeLine{01622\ \ \ \ \ \ \ \ \ resetBuffer\ (ys);}
\DoxyCodeLine{01623\ \ \ \ \ \ \ \ \ resetBuffer\ (outline);}
\DoxyCodeLine{01624\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a5af7c9bcfd40e5b11f9d12c40966bb65}{buildOutline}}\ (outline,\ glyph-\/>bitmap,\ glyph-\/>byteCount,\ \mbox{\hyperlink{hex2otf_8c_a6a06835afab662d1c9fd91960654bb8ca0bbdc63e5d0938274b80230bc55d03b8}{FILL\_RIGHT}});}
\DoxyCodeLine{01625\ \ \ \ \ \ \ \ \ uint\_fast32\_t\ pointCount\ =\ 0,\ contourCount\ =\ 0;}
\DoxyCodeLine{01626\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ *p\ =\ getBufferHead\ (outline),}
\DoxyCodeLine{01627\ \ \ \ \ \ \ \ \ \ \ \ \ \ *\textcolor{keyword}{const}\ end\ =\ getBufferTail\ (outline);\ p\ <\ end;)}
\DoxyCodeLine{01628\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01629\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{enum}\ \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38}{ContourOp}}\ op\ =\ *p++;}
\DoxyCodeLine{01630\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (op\ ==\ \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a9e771dc35104ec1246adba881d27e372}{OP\_CLOSE}})}
\DoxyCodeLine{01631\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01632\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ contourCount++;}
\DoxyCodeLine{01633\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ assert\ (contourCount\ <=\ \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}});}
\DoxyCodeLine{01634\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (endPoints,\ pointCount\ -\/\ 1);}
\DoxyCodeLine{01635\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{01636\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01637\ \ \ \ \ \ \ \ \ \ \ \ \ assert\ (op\ ==\ \mbox{\hyperlink{hex2otf_8c_a25218b5574c0da4a0580647c1a084f38a01f5371958d06ab1411c46f72f049f45}{OP\_POINT}});}
\DoxyCodeLine{01638\ \ \ \ \ \ \ \ \ \ \ \ \ pointCount++;}
\DoxyCodeLine{01639\ \ \ \ \ \ \ \ \ \ \ \ \ assert\ (pointCount\ <=\ \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}});}
\DoxyCodeLine{01640\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ x\ =\ *p++,\ y\ =\ *p++;}
\DoxyCodeLine{01641\ \ \ \ \ \ \ \ \ \ \ \ \ uint\_fast8\_t\ pointFlags\ =}
\DoxyCodeLine{01642\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}}\ (0)\ \textcolor{comment}{//\ point\ is\ on\ curve}}
\DoxyCodeLine{01643\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}}\ (1,\ x\ !=\ rx)\ \textcolor{comment}{//\ x\ coordinate\ is\ 1\ byte\ instead\ of\ 2}}
\DoxyCodeLine{01644\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}}\ (2,\ y\ !=\ ry)\ \textcolor{comment}{//\ y\ coordinate\ is\ 1\ byte\ instead\ of\ 2}}
\DoxyCodeLine{01645\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (3)\ \textcolor{comment}{//\ repeat}}
\DoxyCodeLine{01646\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}}\ (4,\ x\ >=\ rx)\ \textcolor{comment}{//\ when\ x\ is\ 1\ byte:\ x\ is\ positive;}}
\DoxyCodeLine{01647\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ when\ x\ is\ 2\ bytes:\ x\ unchanged\ and\ omitted}}
\DoxyCodeLine{01648\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a77e92e56b5af63bc912ed4cbf5f5c585}{BX}}\ (5,\ y\ >=\ ry)\ \textcolor{comment}{//\ when\ y\ is\ 1\ byte:\ y\ is\ positive;}}
\DoxyCodeLine{01649\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ when\ y\ is\ 2\ bytes:\ y\ unchanged\ and\ omitted}}
\DoxyCodeLine{01650\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a2177c1b55319bb7fd9015fb8b8629ead}{B1}}\ (6)\ \textcolor{comment}{//\ contours\ may\ overlap}}
\DoxyCodeLine{01651\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ \mbox{\hyperlink{hex2otf_8c_a15c6f2a017088c5db6daac264f992a67}{B0}}\ (7)\ \textcolor{comment}{//\ reserved}}
\DoxyCodeLine{01652\ \ \ \ \ \ \ \ \ \ \ \ \ ;}
\DoxyCodeLine{01653\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (flags,\ pointFlags);}
\DoxyCodeLine{01654\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (x\ !=\ rx)}
\DoxyCodeLine{01655\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (xs,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (x\ >\ rx\ ?\ x\ -\/\ rx\ :\ rx\ -\/\ x));}
\DoxyCodeLine{01656\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (y\ !=\ ry)}
\DoxyCodeLine{01657\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (ys,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (y\ >\ ry\ ?\ y\ -\/\ ry\ :\ ry\ -\/\ y));}
\DoxyCodeLine{01658\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (x\ <\ xMin)\ xMin\ =\ x;}
\DoxyCodeLine{01659\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (y\ <\ yMin)\ yMin\ =\ y;}
\DoxyCodeLine{01660\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (x\ >\ xMax)\ xMax\ =\ x;}
\DoxyCodeLine{01661\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (y\ >\ yMax)\ yMax\ =\ y;}
\DoxyCodeLine{01662\ \ \ \ \ \ \ \ \ \ \ \ \ rx\ =\ x;}
\DoxyCodeLine{01663\ \ \ \ \ \ \ \ \ \ \ \ \ ry\ =\ y;}
\DoxyCodeLine{01664\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01665\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (contourCount\ ==\ 0)}
\DoxyCodeLine{01666\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};\ \textcolor{comment}{//\ blank\ glyph\ is\ indicated\ by\ the\ 'loca'\ table}}
\DoxyCodeLine{01667\ \ \ \ \ \ \ \ \ glyph-\/>lsb\ =\ glyph-\/>pos\ +\ xMin;}
\DoxyCodeLine{01668\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (glyf,\ contourCount);\ \textcolor{comment}{//\ numberOfContours}}
\DoxyCodeLine{01669\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (glyf,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (glyph-\/>pos\ +\ xMin));\ \textcolor{comment}{//\ xMin}}
\DoxyCodeLine{01670\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (glyf,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (yMin));\ \textcolor{comment}{//\ yMin}}
\DoxyCodeLine{01671\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (glyf,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (glyph-\/>pos\ +\ xMax));\ \textcolor{comment}{//\ xMax}}
\DoxyCodeLine{01672\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (glyf,\ \mbox{\hyperlink{hex2otf_8c_a84fd83fab1f19cfb33addaa0557c4682}{FU}}\ (yMax));\ \textcolor{comment}{//\ yMax}}
\DoxyCodeLine{01673\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}}\ (glyf,\ endPoints);\ \textcolor{comment}{//\ endPtsOfContours[]}}
\DoxyCodeLine{01674\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (glyf,\ 0);\ \textcolor{comment}{//\ instructionLength}}
\DoxyCodeLine{01675\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}}\ (glyf,\ flags);\ \textcolor{comment}{//\ flags[]}}
\DoxyCodeLine{01676\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}}\ (glyf,\ xs);\ \textcolor{comment}{//\ xCoordinates[]}}
\DoxyCodeLine{01677\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a560637130747e543118ff304389fd18f}{cacheBuffer}}\ (glyf,\ ys);\ \textcolor{comment}{//\ yCoordinates[]}}
\DoxyCodeLine{01678\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (pointCount\ >\ *maxPoints)}
\DoxyCodeLine{01679\ \ \ \ \ \ \ \ \ \ \ \ \ *maxPoints\ =\ pointCount;}
\DoxyCodeLine{01680\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (contourCount\ >\ *maxContours)}
\DoxyCodeLine{01681\ \ \ \ \ \ \ \ \ \ \ \ \ *maxContours\ =\ contourCount;}
\DoxyCodeLine{01682\ \ \ \ \ \}}
\DoxyCodeLine{01683\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a051a88b0ac4eb063945b84e2242408ea}{cacheU32}}\ (loca,\ countBufferedBytes\ (glyf));}
\DoxyCodeLine{01684\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (endPoints);}
\DoxyCodeLine{01685\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (flags);}
\DoxyCodeLine{01686\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (xs);}
\DoxyCodeLine{01687\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (ys);}
\DoxyCodeLine{01688\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (outline);}
\DoxyCodeLine{01689\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 48
Here is the caller graph for this function\+:
% FIG 49
\mbox{\Hypertarget{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}\label{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}} 
\index{hex2otf.c@{hex2otf.c}!freeBuffer@{freeBuffer}}
\index{freeBuffer@{freeBuffer}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{freeBuffer()}{freeBuffer()}}
{\footnotesize\ttfamily void free\+Buffer (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structBuffer}{Buffer}} $\ast$}]{buf }\end{DoxyParamCaption})}



Free the memory previously allocated for a buffer. 

This function frees the memory allocated to an array of type \mbox{\hyperlink{structBuffer}{Buffer}} $\ast$.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em buf} & The pointer to an array of type \mbox{\hyperlink{structBuffer}{Buffer}} $\ast$. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00337}{337}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00338\ \{}
\DoxyCodeLine{00339\ \ \ \ \ free\ (buf-\/>begin);}
\DoxyCodeLine{00340\ \ \ \ \ buf-\/>capacity\ =\ 0;}
\DoxyCodeLine{00341\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 50
\mbox{\Hypertarget{hex2otf_8c_a4cebe6a72365812b5f392f4db9dc5db5}\label{hex2otf_8c_a4cebe6a72365812b5f392f4db9dc5db5}} 
\index{hex2otf.c@{hex2otf.c}!initBuffers@{initBuffers}}
\index{initBuffers@{initBuffers}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{initBuffers()}{initBuffers()}}
{\footnotesize\ttfamily void init\+Buffers (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{count }\end{DoxyParamCaption})}



Initialize an array of buffer pointers to all zeroes. 

This function initializes the \char`\"{}all\+Buffers\char`\"{} array of buffer pointers to all zeroes.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em count} & The number of buffer array pointers to allocate. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00152}{152}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00153\ \{}
\DoxyCodeLine{00154\ \ \ \ \ assert\ (count\ >\ 0);}
\DoxyCodeLine{00155\ \ \ \ \ assert\ (\mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}}\ ==\ 0);\ \textcolor{comment}{//\ uninitialized}}
\DoxyCodeLine{00156\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}\ =\ calloc\ (count,\ \textcolor{keyword}{sizeof}\ *\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}});}
\DoxyCodeLine{00157\ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}})}
\DoxyCodeLine{00158\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Failed\ to\ initialize\ buffers."{}});}
\DoxyCodeLine{00159\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}}\ =\ count;}
\DoxyCodeLine{00160\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}}\ =\ 0;}
\DoxyCodeLine{00161\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 51
Here is the caller graph for this function\+:
% FIG 52
\mbox{\Hypertarget{hex2otf_8c_a0ddf1224851353fc92bfbff6f499fa97}\label{hex2otf_8c_a0ddf1224851353fc92bfbff6f499fa97}} 
\index{hex2otf.c@{hex2otf.c}!main@{main}}
\index{main@{main}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{main()}{main()}}
{\footnotesize\ttfamily int main (\begin{DoxyParamCaption}\item[{int}]{argc,  }\item[{char $\ast$}]{argv\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})}



The main function. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em argc} & The number of command-\/line arguments. \\
\hline
\mbox{\texttt{ in}}  & {\em argv} & The array of command-\/line arguments. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
EXIT\+\_\+\+FAILURE upon fatal error, EXIT\+\_\+\+SUCCESS otherwise. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l02603}{2603}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{02604\ \{}
\DoxyCodeLine{02605\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a4cebe6a72365812b5f392f4db9dc5db5}{initBuffers}}\ (16);}
\DoxyCodeLine{02606\ \ \ \ \ atexit\ (\mbox{\hyperlink{hex2otf_8c_ac947cbe076da5fbab8f5e4c1c821b7a6}{cleanBuffers}});}
\DoxyCodeLine{02607\ \ \ \ \ \mbox{\hyperlink{structOptions}{Options}}\ opt\ =\ \mbox{\hyperlink{hex2otf_8c_ac2eec01939cae967aa9882b2517288a1}{parseOptions}}\ (argv);}
\DoxyCodeLine{02608\ \ \ \ \ \mbox{\hyperlink{structFont}{Font}}\ font;}
\DoxyCodeLine{02609\ \ \ \ \ font.tables\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (\textcolor{keyword}{sizeof}\ (\mbox{\hyperlink{structTable}{Table}})\ *\ 16);}
\DoxyCodeLine{02610\ \ \ \ \ font.glyphs\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (\textcolor{keyword}{sizeof}\ (\mbox{\hyperlink{structGlyph}{Glyph}})\ *\ \mbox{\hyperlink{hex2otf_8c_a1a1d1da8a5f6da54d749399b173c9bfc}{MAX\_GLYPHS}});}
\DoxyCodeLine{02611\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ad77c441582f862d494a734eb9855dd41}{readGlyphs}}\ (\&font,\ opt.hex);}
\DoxyCodeLine{02612\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a77ff68152c5cb38605010bc7621b0722}{sortGlyphs}}\ (\&font);}
\DoxyCodeLine{02613\ \ \ \ \ \textcolor{keyword}{enum}\ \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1ea}{LocaFormat}}\ loca\ =\ \mbox{\hyperlink{hex2otf_8c_a7da3527c69a413194afdce359b03e1eaa9c5871c30feb10df049d99bd703dfda4}{LOCA\_OFFSET16}};}
\DoxyCodeLine{02614\ \ \ \ \ uint\_fast16\_t\ maxPoints\ =\ 0,\ maxContours\ =\ 0;}
\DoxyCodeLine{02615\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\_t}}\ xMin\ =\ 0;}
\DoxyCodeLine{02616\ \ \ \ \ \textcolor{keywordflow}{if}\ (opt.pos)}
\DoxyCodeLine{02617\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_af3ba1ba33ebe63ba0340842b7f83021c}{positionGlyphs}}\ (\&font,\ opt.pos,\ \&xMin);}
\DoxyCodeLine{02618\ \ \ \ \ \textcolor{keywordflow}{if}\ (opt.gpos)}
\DoxyCodeLine{02619\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a6c1e982fdc6c51b9f84051daa2e71936}{fillGposTable}}\ (\&font);}
\DoxyCodeLine{02620\ \ \ \ \ \textcolor{keywordflow}{if}\ (opt.gsub)}
\DoxyCodeLine{02621\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a06b8121dea15c8117b7c951ffb22fb7e}{fillGsubTable}}\ (\&font);}
\DoxyCodeLine{02622\ \ \ \ \ \textcolor{keywordflow}{if}\ (opt.cff)}
\DoxyCodeLine{02623\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a3d62aa29f94c3fa78ca4438739d64a62}{fillCFF}}\ (\&font,\ opt.cff,\ opt.nameStrings);}
\DoxyCodeLine{02624\ \ \ \ \ \textcolor{keywordflow}{if}\ (opt.truetype)}
\DoxyCodeLine{02625\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a326e4fa86eb32bb18e37eab8f495bd2f}{fillTrueType}}\ (\&font,\ \&loca,\ \&maxPoints,\ \&maxContours);}
\DoxyCodeLine{02626\ \ \ \ \ \textcolor{keywordflow}{if}\ (opt.blankOutline)}
\DoxyCodeLine{02627\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ab37b4f7111692f8d1163bafd2aab831e}{fillBlankOutline}}\ (\&font);}
\DoxyCodeLine{02628\ \ \ \ \ \textcolor{keywordflow}{if}\ (opt.bitmap)}
\DoxyCodeLine{02629\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_afd499a24ff34cb5c19b52df795422c12}{fillBitmap}}\ (\&font);}
\DoxyCodeLine{02630\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a4ac0c02117b703a71bee3dd34e2eb306}{fillHeadTable}}\ (\&font,\ loca,\ xMin);}
\DoxyCodeLine{02631\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a28e889c3a36007c2e5d50a498046a6c6}{fillHheaTable}}\ (\&font,\ xMin);}
\DoxyCodeLine{02632\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_aff4f28ce178c84c7365245ec10034433}{fillMaxpTable}}\ (\&font,\ opt.cff,\ maxPoints,\ maxContours);}
\DoxyCodeLine{02633\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ab6e3bb110dc3e55193c344cb7b56e328}{fillOS2Table}}\ (\&font);}
\DoxyCodeLine{02634\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a79d8a322be9d9131b684a9ea67abe05e}{fillNameTable}}\ (\&font,\ opt.nameStrings);}
\DoxyCodeLine{02635\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a97c9b2ae58f5989d68e639715c3f9df9}{fillHmtxTable}}\ (\&font);}
\DoxyCodeLine{02636\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a6362601eb41d051a103a1d9edcd4f284}{fillCmapTable}}\ (\&font);}
\DoxyCodeLine{02637\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a0ddc03905c4918e04aa1e54a7c1716b1}{fillPostTable}}\ (\&font);}
\DoxyCodeLine{02638\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a049e485562f7f4dfe978c4146ad225b8}{organizeTables}}\ (\&font,\ opt.cff);}
\DoxyCodeLine{02639\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a074562f0527ff6db8b1b956b9356a315}{writeFont}}\ (\&font,\ opt.cff,\ opt.out);}
\DoxyCodeLine{02640\ \ \ \ \ \textcolor{keywordflow}{return}\ EXIT\_SUCCESS;}
\DoxyCodeLine{02641\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 53
\mbox{\Hypertarget{hex2otf_8c_af1d113ec0d790035476f2743cbf2696f}\label{hex2otf_8c_af1d113ec0d790035476f2743cbf2696f}} 
\index{hex2otf.c@{hex2otf.c}!matchToken@{matchToken}}
\index{matchToken@{matchToken}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{matchToken()}{matchToken()}}
{\footnotesize\ttfamily const char $\ast$ match\+Token (\begin{DoxyParamCaption}\item[{const char $\ast$}]{operand,  }\item[{const char $\ast$}]{key,  }\item[{char}]{delimiter }\end{DoxyParamCaption})}



Match a command line option with its key for enabling. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em operand} & A pointer to the specified operand. \\
\hline
\mbox{\texttt{ in}}  & {\em key} & Pointer to the option structure. \\
\hline
\mbox{\texttt{ in}}  & {\em delimeter} & The delimiter to end searching. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the first character of the desired option. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l02470}{2470}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{02471\ \{}
\DoxyCodeLine{02472\ \ \ \ \ \textcolor{keywordflow}{while}\ (*key)}
\DoxyCodeLine{02473\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (*operand++\ !=\ *key++)}
\DoxyCodeLine{02474\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{02475\ \ \ \ \ \textcolor{keywordflow}{if}\ (!*operand\ ||\ *operand++\ ==\ delimiter)}
\DoxyCodeLine{02476\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ operand;}
\DoxyCodeLine{02477\ \ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{02478\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 54
\mbox{\Hypertarget{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}\label{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}} 
\index{hex2otf.c@{hex2otf.c}!newBuffer@{newBuffer}}
\index{newBuffer@{newBuffer}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{newBuffer()}{newBuffer()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structBuffer}{Buffer}} $\ast$ new\+Buffer (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{initial\+Capacity }\end{DoxyParamCaption})}



Create a new buffer. 

This function creates a new buffer array of type \mbox{\hyperlink{structBuffer}{Buffer}}, with an initial size of initial\+Capacity elements.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em initial\+Capacity} & The initial number of elements in the buffer. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00188}{188}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00189\ \{}
\DoxyCodeLine{00190\ \ \ \ \ assert\ (initialCapacity\ >\ 0);}
\DoxyCodeLine{00191\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *buf\ =\ NULL;}
\DoxyCodeLine{00192\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ sentinel\ =\ \mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}};}
\DoxyCodeLine{00193\ \ \ \ \ \textcolor{keywordflow}{do}}
\DoxyCodeLine{00194\ \ \ \ \ \{}
\DoxyCodeLine{00195\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}}\ ==\ \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}})}
\DoxyCodeLine{00196\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}}\ =\ 0;}
\DoxyCodeLine{00197\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}[\mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}}].capacity\ ==\ 0)}
\DoxyCodeLine{00198\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00199\ \ \ \ \ \ \ \ \ \ \ \ \ buf\ =\ \&\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}[\mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}}++];}
\DoxyCodeLine{00200\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{00201\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00202\ \ \ \ \ \}\ \textcolor{keywordflow}{while}\ (++\mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}}\ !=\ sentinel);}
\DoxyCodeLine{00203\ \ \ \ \ \textcolor{keywordflow}{if}\ (!buf)\ \textcolor{comment}{//\ no\ existing\ buffer\ available}}
\DoxyCodeLine{00204\ \ \ \ \ \{}
\DoxyCodeLine{00205\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ newSize\ =\ \textcolor{keyword}{sizeof}\ (\mbox{\hyperlink{structBuffer}{Buffer}})\ *\ \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}}\ *\ 2;}
\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ *extended\ =\ realloc\ (\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}},\ newSize);}
\DoxyCodeLine{00207\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!extended)}
\DoxyCodeLine{00208\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Failed\ to\ create\ new\ buffers."{}});}
\DoxyCodeLine{00209\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}\ =\ extended;}
\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ memset\ (\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}\ +\ \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}},\ 0,\ \textcolor{keyword}{sizeof}\ (\mbox{\hyperlink{structBuffer}{Buffer}})\ *\ \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}});}
\DoxyCodeLine{00211\ \ \ \ \ \ \ \ \ buf\ =\ \&\mbox{\hyperlink{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}{allBuffers}}[\mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}}];}
\DoxyCodeLine{00212\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}{nextBufferIndex}}\ =\ \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}}\ +\ 1;}
\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}{bufferCount}}\ *=\ 2;}
\DoxyCodeLine{00214\ \ \ \ \ \}}
\DoxyCodeLine{00215\ \ \ \ \ buf-\/>begin\ =\ malloc\ (initialCapacity);}
\DoxyCodeLine{00216\ \ \ \ \ \textcolor{keywordflow}{if}\ (!buf-\/>begin)}
\DoxyCodeLine{00217\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Failed\ to\ allocate\ \%zu\ bytes\ of\ memory."{}},\ initialCapacity);}
\DoxyCodeLine{00218\ \ \ \ \ buf-\/>capacity\ =\ initialCapacity;}
\DoxyCodeLine{00219\ \ \ \ \ buf-\/>next\ =\ buf-\/>begin;}
\DoxyCodeLine{00220\ \ \ \ \ buf-\/>end\ =\ buf-\/>begin\ +\ initialCapacity;}
\DoxyCodeLine{00221\ \ \ \ \ \textcolor{keywordflow}{return}\ buf;}
\DoxyCodeLine{00222\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 55
Here is the caller graph for this function\+:
% FIG 56
\mbox{\Hypertarget{hex2otf_8c_a049e485562f7f4dfe978c4146ad225b8}\label{hex2otf_8c_a049e485562f7f4dfe978c4146ad225b8}} 
\index{hex2otf.c@{hex2otf.c}!organizeTables@{organizeTables}}
\index{organizeTables@{organizeTables}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{organizeTables()}{organizeTables()}}
{\footnotesize\ttfamily void organize\+Tables (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font,  }\item[{bool}]{is\+CFF }\end{DoxyParamCaption})}



Sort tables according to Open\+Type recommendations. 

The various tables in a font are sorted in an order recommended for True\+Type font files.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The font in which to sort tables. \\
\hline
\mbox{\texttt{ in}}  & {\em is\+CFF} & True iff Compact \mbox{\hyperlink{structFont}{Font}} Format (CFF) is being used. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00711}{711}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00712\ \{}
\DoxyCodeLine{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{00714\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}cmap"{}},\textcolor{stringliteral}{"{}post"{}},\textcolor{stringliteral}{"{}CFF\ "{}},NULL\};}
\DoxyCodeLine{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{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{00717\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}glyf"{}},\textcolor{stringliteral}{"{}kern"{}},\textcolor{stringliteral}{"{}name"{}},\textcolor{stringliteral}{"{}post"{}},\textcolor{stringliteral}{"{}gasp"{}},\textcolor{stringliteral}{"{}PCLT"{}},\textcolor{stringliteral}{"{}DSIG"{}},NULL\};}
\DoxyCodeLine{00718\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\textcolor{keyword}{const}\ *\textcolor{keyword}{const}\ order\ =\ isCFF\ ?\ cffOrder\ :\ truetypeOrder;}
\DoxyCodeLine{00719\ \ \ \ \ \mbox{\hyperlink{structTable}{Table}}\ *unordered\ =\ getBufferHead\ (font-\/>tables);}
\DoxyCodeLine{00720\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structTable}{Table}}\ *\textcolor{keyword}{const}\ tablesEnd\ =\ getBufferTail\ (font-\/>tables);}
\DoxyCodeLine{00721\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\textcolor{keyword}{const}\ *p\ =\ order;\ *p;\ p++)}
\DoxyCodeLine{00722\ \ \ \ \ \{}
\DoxyCodeLine{00723\ \ \ \ \ \ \ \ \ uint\_fast32\_t\ tag\ =\ tagAsU32\ (*p);}
\DoxyCodeLine{00724\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\mbox{\hyperlink{structTable}{Table}}\ *t\ =\ unordered;\ t\ <\ tablesEnd;\ t++)}
\DoxyCodeLine{00725\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00726\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (t-\/>tag\ !=\ tag)}
\DoxyCodeLine{00727\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{00728\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (t\ !=\ unordered)}
\DoxyCodeLine{00729\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00730\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structTable}{Table}}\ temp\ =\ *unordered;}
\DoxyCodeLine{00731\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *unordered\ =\ *t;}
\DoxyCodeLine{00732\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *t\ =\ temp;}
\DoxyCodeLine{00733\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00734\ \ \ \ \ \ \ \ \ \ \ \ \ unordered++;}
\DoxyCodeLine{00735\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{00736\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00737\ \ \ \ \ \}}
\DoxyCodeLine{00738\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 57
\mbox{\Hypertarget{hex2otf_8c_ac2eec01939cae967aa9882b2517288a1}\label{hex2otf_8c_ac2eec01939cae967aa9882b2517288a1}} 
\index{hex2otf.c@{hex2otf.c}!parseOptions@{parseOptions}}
\index{parseOptions@{parseOptions}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{parseOptions()}{parseOptions()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structOptions}{Options}} parse\+Options (\begin{DoxyParamCaption}\item[{char $\ast$const}]{argv\mbox{[}const \mbox{]} }\end{DoxyParamCaption})}



Parse command line options. 

\begin{DoxyVerb}Option         Data Type      Description
------         ---------      -----------
truetype       bool           Generate TrueType outlines
blankOutline   bool           Generate blank outlines
bitmap         bool           Generate embedded bitmap
gpos           bool           Generate a dummy GPOS table
gsub           bool           Generate a dummy GSUB table
cff            int            Generate CFF 1 or CFF 2 outlines
hex            const char *   Name of Unifont .hex file
pos            const char *   Name of Unifont combining data file
out            const char *   Name of output font file
nameStrings    NameStrings    Array of TrueType font Name IDs
\end{DoxyVerb}
 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em argv} & Pointer to array of command line options. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Data structure to hold requested command line options. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l02500}{2500}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{02501\ \{}
\DoxyCodeLine{02502\ \ \ \ \ \mbox{\hyperlink{structOptions}{Options}}\ opt\ =\ \{0\};\ \textcolor{comment}{//\ all\ options\ default\ to\ 0,\ false\ and\ NULL}}
\DoxyCodeLine{02503\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *format\ =\ NULL;}
\DoxyCodeLine{02504\ \ \ \ \ \textcolor{keyword}{struct\ }StringArg}
\DoxyCodeLine{02505\ \ \ \ \ \{}
\DoxyCodeLine{02506\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\textcolor{keyword}{const}\ key;}
\DoxyCodeLine{02507\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ **\textcolor{keyword}{const}\ value;}
\DoxyCodeLine{02508\ \ \ \ \ \}\ strArgs[]\ =}
\DoxyCodeLine{02509\ \ \ \ \ \{}
\DoxyCodeLine{02510\ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}hex"{}},\ \&opt.hex\},}
\DoxyCodeLine{02511\ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}pos"{}},\ \&opt.pos\},}
\DoxyCodeLine{02512\ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}out"{}},\ \&opt.out\},}
\DoxyCodeLine{02513\ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}format"{}},\ \&format\},}
\DoxyCodeLine{02514\ \ \ \ \ \ \ \ \ \{NULL,\ NULL\}\ \textcolor{comment}{//\ sentinel}}
\DoxyCodeLine{02515\ \ \ \ \ \};}
\DoxyCodeLine{02516\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{char}\ *\textcolor{keyword}{const}\ *argp\ =\ argv\ +\ 1;\ *argp;\ argp++)}
\DoxyCodeLine{02517\ \ \ \ \ \{}
\DoxyCodeLine{02518\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\textcolor{keyword}{const}\ arg\ =\ *argp;}
\DoxyCodeLine{02519\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }StringArg\ *p;}
\DoxyCodeLine{02520\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *value\ =\ NULL;}
\DoxyCodeLine{02521\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (strcmp\ (arg,\ \textcolor{stringliteral}{"{}-\/-\/help"{}})\ ==\ 0)}
\DoxyCodeLine{02522\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a0d20b69b0ad703df78459e1033d5c1d4}{printHelp}}\ ();}
\DoxyCodeLine{02523\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (strcmp\ (arg,\ \textcolor{stringliteral}{"{}-\/-\/version"{}})\ ==\ 0)}
\DoxyCodeLine{02524\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a9c4b081f1e1ad60def15811c71a936f2}{printVersion}}\ ();}
\DoxyCodeLine{02525\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (p\ =\ strArgs;\ p-\/>key;\ p++)}
\DoxyCodeLine{02526\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((value\ =\ \mbox{\hyperlink{hex2otf_8c_af1d113ec0d790035476f2743cbf2696f}{matchToken}}\ (arg,\ p-\/>key,\ \textcolor{charliteral}{'='})))}
\DoxyCodeLine{02527\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{02528\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (p-\/>key)}
\DoxyCodeLine{02529\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{02530\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!*value)}
\DoxyCodeLine{02531\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Empty\ argument:\ '\%s'."{}},\ p-\/>key);}
\DoxyCodeLine{02532\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (*p-\/>value)}
\DoxyCodeLine{02533\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Duplicate\ argument:\ '\%s'."{}},\ p-\/>key);}
\DoxyCodeLine{02534\ \ \ \ \ \ \ \ \ \ \ \ \ *p-\/>value\ =\ value;}
\DoxyCodeLine{02535\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02536\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{comment}{//\ shall\ be\ a\ name\ string}}
\DoxyCodeLine{02537\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{02538\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ *endptr;}
\DoxyCodeLine{02539\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{long}\ \textcolor{keywordtype}{id}\ =\ strtoul\ (arg,\ \&endptr,\ 10);}
\DoxyCodeLine{02540\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (endptr\ ==\ arg\ ||\ \textcolor{keywordtype}{id}\ >=\ \mbox{\hyperlink{hex2otf_8c_a06a292e7a76c13c1fa509187a7e6577a}{MAX\_NAME\_IDS}}\ ||\ *endptr\ !=\ \textcolor{charliteral}{'='})}
\DoxyCodeLine{02541\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Invalid\ argument:\ '\%s'."{}},\ arg);}
\DoxyCodeLine{02542\ \ \ \ \ \ \ \ \ \ \ \ \ endptr++;\ \textcolor{comment}{//\ skip\ '='}}
\DoxyCodeLine{02543\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (opt.nameStrings[\textcolor{keywordtype}{id}])}
\DoxyCodeLine{02544\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Duplicate\ name\ ID:\ \%lu."{}},\ \textcolor{keywordtype}{id});}
\DoxyCodeLine{02545\ \ \ \ \ \ \ \ \ \ \ \ \ opt.nameStrings[id]\ =\ endptr;}
\DoxyCodeLine{02546\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{02547\ \ \ \ \ \}}
\DoxyCodeLine{02548\ \ \ \ \ \textcolor{keywordflow}{if}\ (!opt.hex)}
\DoxyCodeLine{02549\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Hex\ file\ is\ not\ specified."{}});}
\DoxyCodeLine{02550\ \ \ \ \ \textcolor{keywordflow}{if}\ (opt.pos\ \&\&\ opt.pos[0]\ ==\ \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{02551\ \ \ \ \ \ \ \ \ opt.pos\ =\ NULL;\ \textcolor{comment}{//\ Position\ file\ is\ optional.\ Empty\ path\ means\ none.}}
\DoxyCodeLine{02552\ \ \ \ \ \textcolor{keywordflow}{if}\ (!opt.out)}
\DoxyCodeLine{02553\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Output\ file\ is\ not\ specified."{}});}
\DoxyCodeLine{02554\ \ \ \ \ \textcolor{keywordflow}{if}\ (!format)}
\DoxyCodeLine{02555\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Format\ is\ not\ specified."{}});}
\DoxyCodeLine{02556\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \mbox{\hyperlink{structNamePair}{NamePair}}\ *p\ =\ \mbox{\hyperlink{hex2otf_8h_a7932112a8cd522740aa941c15b79bd16}{defaultNames}};\ p-\/>str;\ p++)}
\DoxyCodeLine{02557\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!opt.nameStrings[p-\/>id])}
\DoxyCodeLine{02558\ \ \ \ \ \ \ \ \ \ \ \ \ opt.nameStrings[p-\/>id]\ =\ p-\/>str;}
\DoxyCodeLine{02559\ \ \ \ \ \textcolor{keywordtype}{bool}\ cff\ =\ \textcolor{keyword}{false},\ cff2\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{02560\ \ \ \ \ \textcolor{keyword}{struct\ }Symbol}
\DoxyCodeLine{02561\ \ \ \ \ \{}
\DoxyCodeLine{02562\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\textcolor{keyword}{const}\ key;}
\DoxyCodeLine{02563\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ *\textcolor{keyword}{const}\ found;}
\DoxyCodeLine{02564\ \ \ \ \ \}\ symbols[]\ =}
\DoxyCodeLine{02565\ \ \ \ \ \{}
\DoxyCodeLine{02566\ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}cff"{}},\ \&cff\},}
\DoxyCodeLine{02567\ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}cff2"{}},\ \&cff2\},}
\DoxyCodeLine{02568\ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}truetype"{}},\ \&opt.truetype\},}
\DoxyCodeLine{02569\ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}blank"{}},\ \&opt.blankOutline\},}
\DoxyCodeLine{02570\ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}bitmap"{}},\ \&opt.bitmap\},}
\DoxyCodeLine{02571\ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}gpos"{}},\ \&opt.gpos\},}
\DoxyCodeLine{02572\ \ \ \ \ \ \ \ \ \{\textcolor{stringliteral}{"{}gsub"{}},\ \&opt.gsub\},}
\DoxyCodeLine{02573\ \ \ \ \ \ \ \ \ \{NULL,\ NULL\}\ \textcolor{comment}{//\ sentinel}}
\DoxyCodeLine{02574\ \ \ \ \ \};}
\DoxyCodeLine{02575\ \ \ \ \ \textcolor{keywordflow}{while}\ (*format)}
\DoxyCodeLine{02576\ \ \ \ \ \{}
\DoxyCodeLine{02577\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct\ }Symbol\ *p;}
\DoxyCodeLine{02578\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *next\ =\ NULL;}
\DoxyCodeLine{02579\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (p\ =\ symbols;\ p-\/>key;\ p++)}
\DoxyCodeLine{02580\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ ((next\ =\ \mbox{\hyperlink{hex2otf_8c_af1d113ec0d790035476f2743cbf2696f}{matchToken}}\ (format,\ p-\/>key,\ \textcolor{charliteral}{','})))}
\DoxyCodeLine{02581\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{02582\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!p-\/>key)}
\DoxyCodeLine{02583\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Invalid\ format."{}});}
\DoxyCodeLine{02584\ \ \ \ \ \ \ \ \ *p-\/>found\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{02585\ \ \ \ \ \ \ \ \ format\ =\ next;}
\DoxyCodeLine{02586\ \ \ \ \ \}}
\DoxyCodeLine{02587\ \ \ \ \ \textcolor{keywordflow}{if}\ (cff\ +\ cff2\ +\ opt.truetype\ +\ opt.blankOutline\ >\ 1)}
\DoxyCodeLine{02588\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}At\ most\ one\ outline\ format\ can\ be\ accepted."{}});}
\DoxyCodeLine{02589\ \ \ \ \ \textcolor{keywordflow}{if}\ (!(cff\ ||\ cff2\ ||\ opt.truetype\ ||\ opt.bitmap))}
\DoxyCodeLine{02590\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Invalid\ format."{}});}
\DoxyCodeLine{02591\ \ \ \ \ opt.cff\ =\ cff\ +\ cff2\ *\ 2;}
\DoxyCodeLine{02592\ \ \ \ \ \textcolor{keywordflow}{return}\ opt;}
\DoxyCodeLine{02593\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 58
Here is the caller graph for this function\+:
% FIG 59
\mbox{\Hypertarget{hex2otf_8c_af3ba1ba33ebe63ba0340842b7f83021c}\label{hex2otf_8c_af3ba1ba33ebe63ba0340842b7f83021c}} 
\index{hex2otf.c@{hex2otf.c}!positionGlyphs@{positionGlyphs}}
\index{positionGlyphs@{positionGlyphs}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{positionGlyphs()}{positionGlyphs()}}
{\footnotesize\ttfamily void position\+Glyphs (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font,  }\item[{const char $\ast$}]{file\+Name,  }\item[{\mbox{\hyperlink{hex2otf_8c_ab9f46992237e1552d3ae221b2a5e95ff}{pixels\+\_\+t}} $\ast$}]{x\+Min }\end{DoxyParamCaption})}



Position a glyph within a 16-\/by-\/16 pixel bounding box. 

Position a glyph within the 16-\/by-\/16 pixel drawing area and note whether or not the glyph is a combining character.

N.\+B.\+: Glyphs must be sorted by code point before calling this function.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & \mbox{\hyperlink{structFont}{Font}} data structure pointer to store glyphs. \\
\hline
\mbox{\texttt{ in}}  & {\em file\+Name} & Name of glyph file to read. \\
\hline
\mbox{\texttt{ in}}  & {\em x\+Min} & Minimum x-\/axis value (for left side bearing). \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01061}{1061}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01062\ \{}
\DoxyCodeLine{01063\ \ \ \ \ *xMin\ =\ 0;}
\DoxyCodeLine{01064\ \ \ \ \ FILE\ *file\ =\ fopen\ (fileName,\ \textcolor{stringliteral}{"{}r"{}});}
\DoxyCodeLine{01065\ \ \ \ \ \textcolor{keywordflow}{if}\ (!file)}
\DoxyCodeLine{01066\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Failed\ to\ open\ file\ '\%s'."{}},\ fileName);}
\DoxyCodeLine{01067\ \ \ \ \ \mbox{\hyperlink{structGlyph}{Glyph}}\ *glyphs\ =\ getBufferHead\ (font-\/>glyphs);}
\DoxyCodeLine{01068\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *\textcolor{keyword}{const}\ endGlyph\ =\ glyphs\ +\ font-\/>glyphCount;}
\DoxyCodeLine{01069\ \ \ \ \ \mbox{\hyperlink{structGlyph}{Glyph}}\ *nextGlyph\ =\ \&glyphs[1];\ \textcolor{comment}{//\ predict\ and\ avoid\ search}}
\DoxyCodeLine{01070\ \ \ \ \ \textcolor{keywordflow}{for}\ (;;)}
\DoxyCodeLine{01071\ \ \ \ \ \{}
\DoxyCodeLine{01072\ \ \ \ \ \ \ \ \ uint\_fast32\_t\ codePoint;}
\DoxyCodeLine{01073\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{hex2otf_8c_ae28f2f636e4d3dd3b5784a3bc3f92b58}{readCodePoint}}\ (\&codePoint,\ fileName,\ file))}
\DoxyCodeLine{01074\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{01075\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structGlyph}{Glyph}}\ *glyph\ =\ nextGlyph;}
\DoxyCodeLine{01076\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (glyph\ ==\ endGlyph\ ||\ glyph-\/>\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}}\ !=\ codePoint)}
\DoxyCodeLine{01077\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01078\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Prediction\ failed.\ Search.}}
\DoxyCodeLine{01079\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ key\ =\ \{\ .\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}}\ =\ codePoint\ \};}
\DoxyCodeLine{01080\ \ \ \ \ \ \ \ \ \ \ \ \ glyph\ =\ bsearch\ (\&key,\ glyphs\ +\ 1,\ font-\/>glyphCount\ -\/\ 1,}
\DoxyCodeLine{01081\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{sizeof}\ key,\ \mbox{\hyperlink{hex2otf_8c_a0d187cc87528ef35478afd7a68309f08}{byCodePoint}});}
\DoxyCodeLine{01082\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!glyph)}
\DoxyCodeLine{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{01084\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ codePoint);}
\DoxyCodeLine{01085\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01086\ \ \ \ \ \ \ \ \ nextGlyph\ =\ glyph\ +\ 1;}
\DoxyCodeLine{01087\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ s[8];}
\DoxyCodeLine{01088\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!fgets\ (s,\ \textcolor{keyword}{sizeof}\ s,\ file))}
\DoxyCodeLine{01089\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}\%s:\ Read\ error."{}},\ fileName);}
\DoxyCodeLine{01090\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ *end;}
\DoxyCodeLine{01091\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{long}\ value\ =\ strtol\ (s,\ \&end,\ 10);}
\DoxyCodeLine{01092\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (*end\ !=\ \textcolor{charliteral}{'\(\backslash\)n'}\ \&\&\ *end\ !=\ \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{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{01094\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Currently\ no\ glyph\ is\ moved\ to\ the\ right,}}
\DoxyCodeLine{01095\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ so\ positive\ position\ is\ considered\ out\ of\ range.}}
\DoxyCodeLine{01096\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ If\ this\ limit\ is\ to\ be\ lifted,}}
\DoxyCodeLine{01097\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 'xMax'\ of\ bounding\ box\ in\ 'head'\ table\ shall\ also\ be\ updated.}}
\DoxyCodeLine{01098\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (value\ <\ -\/GLYPH\_MAX\_WIDTH\ ||\ value\ >\ 0)}
\DoxyCodeLine{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{01100\ \ \ \ \ \ \ \ \ glyph-\/>\mbox{\hyperlink{structGlyph_ada6b8b4b9419096c413b5a29dbc54aac}{combining}}\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{01101\ \ \ \ \ \ \ \ \ glyph-\/>\mbox{\hyperlink{structGlyph_ac113da35f4193641855eaf51547f9b43}{pos}}\ =\ value;}
\DoxyCodeLine{01102\ \ \ \ \ \ \ \ \ glyph-\/>\mbox{\hyperlink{structGlyph_a7fb4dc03b71777de880164eee4ffbc51}{lsb}}\ =\ value;\ \textcolor{comment}{//\ updated\ during\ outline\ generation}}
\DoxyCodeLine{01103\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (value\ <\ *xMin)}
\DoxyCodeLine{01104\ \ \ \ \ \ \ \ \ \ \ \ \ *xMin\ =\ value;}
\DoxyCodeLine{01105\ \ \ \ \ \}}
\DoxyCodeLine{01106\ \ \ \ \ fclose\ (file);}
\DoxyCodeLine{01107\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 60
Here is the caller graph for this function\+:
% FIG 61
\mbox{\Hypertarget{hex2otf_8c_a97af00050b8fd6b7e7b81c7027e4c8e6}\label{hex2otf_8c_a97af00050b8fd6b7e7b81c7027e4c8e6}} 
\index{hex2otf.c@{hex2otf.c}!prepareOffsets@{prepareOffsets}}
\index{prepareOffsets@{prepareOffsets}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{prepareOffsets()}{prepareOffsets()}}
{\footnotesize\ttfamily void prepare\+Offsets (\begin{DoxyParamCaption}\item[{size\+\_\+t $\ast$}]{sizes }\end{DoxyParamCaption})}



Prepare 32-\/bit glyph offsets in a font table. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em sizes} & Array of glyph sizes, for offset calculations. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01275}{1275}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01276\ \{}
\DoxyCodeLine{01277\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ *p\ =\ sizes;}
\DoxyCodeLine{01278\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ *i\ =\ sizes\ +\ 1;\ *i;\ i++)}
\DoxyCodeLine{01279\ \ \ \ \ \ \ \ \ *i\ +=\ *p++;}
\DoxyCodeLine{01280\ \ \ \ \ \textcolor{keywordflow}{if}\ (*p\ >\ 2147483647U)\ \textcolor{comment}{//\ offset\ not\ representable}}
\DoxyCodeLine{01281\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}CFF\ table\ is\ too\ large."{}});}
\DoxyCodeLine{01282\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 62
Here is the caller graph for this function\+:
% FIG 63
\mbox{\Hypertarget{hex2otf_8c_aa52cd46a50cdc2040a72e5c7ecfa944b}\label{hex2otf_8c_aa52cd46a50cdc2040a72e5c7ecfa944b}} 
\index{hex2otf.c@{hex2otf.c}!prepareStringIndex@{prepareStringIndex}}
\index{prepareStringIndex@{prepareStringIndex}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{prepareStringIndex()}{prepareStringIndex()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structBuffer}{Buffer}} $\ast$ prepare\+String\+Index (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{hex2otf_8c_a07c4a43c1a36ee79c8a163298ff9adac}{Name\+Strings}}}]{names }\end{DoxyParamCaption})}



Prepare a font name string index. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em names} & List of name strings. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to a \mbox{\hyperlink{structBuffer}{Buffer}} struct containing the string names. 
\end{DoxyReturn}
Get the number of elements in array char $\ast$strings\mbox{[}\mbox{]}.

Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01291}{1291}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01292\ \{}
\DoxyCodeLine{01293\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *buf\ =\ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (256);}
\DoxyCodeLine{01294\ \ \ \ \ assert\ (names[6]);}
\DoxyCodeLine{01295\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *strings[]\ =\ \{\textcolor{stringliteral}{"{}Adobe"{}},\ \textcolor{stringliteral}{"{}Identity"{}},\ names[6]\};\textcolor{comment}{}}
\DoxyCodeLine{01296\ \textcolor{comment}{\ \ \ \ ///\ Get\ the\ number\ of\ elements\ in\ array\ char\ *strings[].}}
\DoxyCodeLine{01297\ \textcolor{comment}{}\textcolor{preprocessor}{\ \ \ \ \#define\ stringCount\ (sizeof\ strings\ /\ sizeof\ *strings)}}
\DoxyCodeLine{01298\ \ \ \ \ \textcolor{keyword}{static\_assert}\ (stringCount\ <=\ \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}},\ \textcolor{stringliteral}{"{}too\ many\ strings"{}});}
\DoxyCodeLine{01299\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ offset\ =\ 1;}
\DoxyCodeLine{01300\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ lengths[stringCount];}
\DoxyCodeLine{01301\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ stringCount;\ i++)}
\DoxyCodeLine{01302\ \ \ \ \ \{}
\DoxyCodeLine{01303\ \ \ \ \ \ \ \ \ assert\ (strings[i]);}
\DoxyCodeLine{01304\ \ \ \ \ \ \ \ \ lengths[i]\ =\ strlen\ (strings[i]);}
\DoxyCodeLine{01305\ \ \ \ \ \ \ \ \ offset\ +=\ lengths[i];}
\DoxyCodeLine{01306\ \ \ \ \ \}}
\DoxyCodeLine{01307\ \ \ \ \ \textcolor{keywordtype}{int}\ offsetSize\ =\ 1\ +\ (offset\ >\ 0xff)}
\DoxyCodeLine{01308\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ (offset\ >\ 0xffff)}
\DoxyCodeLine{01309\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ (offset\ >\ 0xffffff);}
\DoxyCodeLine{01310\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a07b29528c561e5852a228c98391225f7}{cacheU16}}\ (buf,\ stringCount);\ \textcolor{comment}{//\ count}}
\DoxyCodeLine{01311\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a84d7310553d31f4ec587dc001f472834}{cacheU8}}\ (buf,\ offsetSize);\ \textcolor{comment}{//\ offSize}}
\DoxyCodeLine{01312\ \ \ \ \ cacheU\ (buf,\ offset\ =\ 1,\ offsetSize);\ \textcolor{comment}{//\ offset[0]}}
\DoxyCodeLine{01313\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ stringCount;\ i++)}
\DoxyCodeLine{01314\ \ \ \ \ \ \ \ \ cacheU\ (buf,\ offset\ +=\ lengths[i],\ offsetSize);\ \textcolor{comment}{//\ offset[i\ +\ 1]}}
\DoxyCodeLine{01315\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ stringCount;\ i++)}
\DoxyCodeLine{01316\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a927c31a7e187d15a70667ce6b0ef296a}{cacheBytes}}\ (buf,\ strings[i],\ lengths[i]);}
\DoxyCodeLine{01317\ \textcolor{preprocessor}{\ \ \ \ \#undef\ stringCount}}
\DoxyCodeLine{01318\ \ \ \ \ \textcolor{keywordflow}{return}\ buf;}
\DoxyCodeLine{01319\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 64
Here is the caller graph for this function\+:
% FIG 65
\mbox{\Hypertarget{hex2otf_8c_a0d20b69b0ad703df78459e1033d5c1d4}\label{hex2otf_8c_a0d20b69b0ad703df78459e1033d5c1d4}} 
\index{hex2otf.c@{hex2otf.c}!printHelp@{printHelp}}
\index{printHelp@{printHelp}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{printHelp()}{printHelp()}}
{\footnotesize\ttfamily void print\+Help (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Print help message to stdout and then exit. 

Print help message if invoked with the \char`\"{}-\/-\/help\char`\"{} option, and then exit successfully. 

Definition at line \mbox{\hyperlink{hex2otf_8c_source_l02426}{2426}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{02426\ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{02427\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}Synopsis:\ hex2otf\ <options>:\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{02428\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\ \ \ \ hex=<filename>\ \ \ \ \ \ \ \ Specify\ Unifont\ .hex\ input\ file.\(\backslash\)n"{}});}
\DoxyCodeLine{02429\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\ \ \ \ pos=<filename>\ \ \ \ \ \ \ \ Specify\ combining\ file.\ (Optional)\(\backslash\)n"{}});}
\DoxyCodeLine{02430\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\ \ \ \ out=<filename>\ \ \ \ \ \ \ \ Specify\ output\ font\ file.\(\backslash\)n"{}});}
\DoxyCodeLine{02431\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\ \ \ \ format=<f1>,<f2>,...\ \ Specify\ font\ format(s);\ values:\(\backslash\)n"{}});}
\DoxyCodeLine{02432\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cff\(\backslash\)n"{}});}
\DoxyCodeLine{02433\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cff2\(\backslash\)n"{}});}
\DoxyCodeLine{02434\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ truetype\(\backslash\)n"{}});}
\DoxyCodeLine{02435\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ blank\(\backslash\)n"{}});}
\DoxyCodeLine{02436\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ bitmap\(\backslash\)n"{}});}
\DoxyCodeLine{02437\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ gpos\(\backslash\)n"{}});}
\DoxyCodeLine{02438\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ gsub\(\backslash\)n"{}});}
\DoxyCodeLine{02439\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\(\backslash\)nExample:\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{02440\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}\ \ \ \ hex2otf\ hex=Myfont.hex\ out=Myfont.otf\ format=cff\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{02441\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}For\ more\ information,\ consult\ the\ hex2otf(1)\ man\ page.\(\backslash\)n\(\backslash\)n"{}});}
\DoxyCodeLine{02442\ }
\DoxyCodeLine{02443\ \ \ \ \ exit\ (EXIT\_SUCCESS);}
\DoxyCodeLine{02444\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 66
\mbox{\Hypertarget{hex2otf_8c_a9c4b081f1e1ad60def15811c71a936f2}\label{hex2otf_8c_a9c4b081f1e1ad60def15811c71a936f2}} 
\index{hex2otf.c@{hex2otf.c}!printVersion@{printVersion}}
\index{printVersion@{printVersion}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{printVersion()}{printVersion()}}
{\footnotesize\ttfamily void print\+Version (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Print program version string on stdout. 

Print program version if invoked with the \char`\"{}-\/-\/version\char`\"{} option, and then exit successfully. 

Definition at line \mbox{\hyperlink{hex2otf_8c_source_l02407}{2407}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{02407\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{02408\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}hex2otf\ (GNU\ Unifont)\ \%s\(\backslash\)n"{}},\ \mbox{\hyperlink{hex2otf_8c_a1c6d5de492ac61ad29aec7aa9a436bbf}{VERSION}});}
\DoxyCodeLine{02409\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}Copyright\ \(\backslash\)u00A9\ 2022\ \(\backslash\)u4F55\(\backslash\)u5FD7\(\backslash\)u7FD4\ (He\ Zhixiang)\(\backslash\)n"{}});}
\DoxyCodeLine{02410\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}License\ GPLv2+:\ GNU\ GPL\ version\ 2\ or\ later\(\backslash\)n"{}});}
\DoxyCodeLine{02411\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}<https://gnu.org/licenses/gpl.html>\(\backslash\)n"{}});}
\DoxyCodeLine{02412\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}This\ is\ free\ software:\ you\ are\ free\ to\ change\ and\(\backslash\)n"{}});}
\DoxyCodeLine{02413\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}redistribute\ it.\ \ There\ is\ NO\ WARRANTY,\ to\ the\ extent\(\backslash\)n"{}});}
\DoxyCodeLine{02414\ \ \ \ \ printf\ (\textcolor{stringliteral}{"{}permitted\ by\ law.\(\backslash\)n"{}});}
\DoxyCodeLine{02415\ }
\DoxyCodeLine{02416\ \ \ \ \ exit\ (EXIT\_SUCCESS);}
\DoxyCodeLine{02417\ \}}

\end{DoxyCode}
Here is the caller graph for this function\+:
% FIG 67
\mbox{\Hypertarget{hex2otf_8c_ae28f2f636e4d3dd3b5784a3bc3f92b58}\label{hex2otf_8c_ae28f2f636e4d3dd3b5784a3bc3f92b58}} 
\index{hex2otf.c@{hex2otf.c}!readCodePoint@{readCodePoint}}
\index{readCodePoint@{readCodePoint}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{readCodePoint()}{readCodePoint()}}
{\footnotesize\ttfamily bool read\+Code\+Point (\begin{DoxyParamCaption}\item[{uint\+\_\+fast32\+\_\+t $\ast$}]{code\+Point,  }\item[{const char $\ast$}]{file\+Name,  }\item[{FILE $\ast$}]{file }\end{DoxyParamCaption})}



Read up to 6 hexadecimal digits and a colon from file. 

This function reads up to 6 hexadecimal digits followed by a colon from a file.

If the end of the file is reached, the function returns true. The file name is provided to include in an error message if the end of file was reached unexpectedly.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em code\+Point} & The Unicode code point. \\
\hline
\mbox{\texttt{ in}}  & {\em file\+Name} & The name of the input file. \\
\hline
\mbox{\texttt{ in}}  & {\em file} & Pointer to the input file stream. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if at end of file, false otherwise. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00919}{919}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00920\ \{}
\DoxyCodeLine{00921\ \ \ \ \ *codePoint\ =\ 0;}
\DoxyCodeLine{00922\ \ \ \ \ uint\_fast8\_t\ digitCount\ =\ 0;}
\DoxyCodeLine{00923\ \ \ \ \ \textcolor{keywordflow}{for}\ (;;)}
\DoxyCodeLine{00924\ \ \ \ \ \{}
\DoxyCodeLine{00925\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ c\ =\ getc\ (file);}
\DoxyCodeLine{00926\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (isxdigit\ (c)\ \&\&\ ++digitCount\ <=\ 6)}
\DoxyCodeLine{00927\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00928\ \ \ \ \ \ \ \ \ \ \ \ \ *codePoint\ =\ (*codePoint\ <<\ 4)\ |\ nibbleValue\ (c);}
\DoxyCodeLine{00929\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{00930\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00931\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (c\ ==\ \textcolor{charliteral}{':'}\ \&\&\ digitCount\ >\ 0)}
\DoxyCodeLine{00932\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00933\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (c\ ==\ EOF)}
\DoxyCodeLine{00934\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00935\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (digitCount\ ==\ 0)}
\DoxyCodeLine{00936\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00937\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (feof\ (file))}
\DoxyCodeLine{00938\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}\%s:\ Unexpected\ end\ of\ file."{}},\ fileName);}
\DoxyCodeLine{00939\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{00940\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}\%s:\ Read\ error."{}},\ fileName);}
\DoxyCodeLine{00941\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00942\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}\%s:\ Unexpected\ character:\ \%\#.2x."{}},\ fileName,\ (\textcolor{keywordtype}{unsigned})c);}
\DoxyCodeLine{00943\ \ \ \ \ \}}
\DoxyCodeLine{00944\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 68
Here is the caller graph for this function\+:
% FIG 69
\mbox{\Hypertarget{hex2otf_8c_ad77c441582f862d494a734eb9855dd41}\label{hex2otf_8c_ad77c441582f862d494a734eb9855dd41}} 
\index{hex2otf.c@{hex2otf.c}!readGlyphs@{readGlyphs}}
\index{readGlyphs@{readGlyphs}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{readGlyphs()}{readGlyphs()}}
{\footnotesize\ttfamily void read\+Glyphs (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font,  }\item[{const char $\ast$}]{file\+Name }\end{DoxyParamCaption})}



Read glyph definitions from a Unifont .hex format file. 

This function reads in the glyph bitmaps contained in a Unifont .hex format file. These input files contain one glyph bitmap per line. Each line is of the form \begin{DoxyVerb}<hexadecimal code point> ':' <hexadecimal bitmap sequence>
\end{DoxyVerb}
 The code point field typically consists of 4 hexadecimal digits for a code point in Unicode Plane 0, and 6 hexadecimal digits for code points above Plane 0. The hexadecimal bitmap sequence is 32 hexadecimal digits long for a glyph that is 8 pixels wide by 16 pixels high, and 64 hexadecimal digits long for a glyph that is 16 pixels wide by 16 pixels high.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & The font data structure to update with new glyphs. \\
\hline
\mbox{\texttt{ in}}  & {\em file\+Name} & The name of the Unifont .hex format input file. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00966}{966}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00967\ \{}
\DoxyCodeLine{00968\ \ \ \ \ FILE\ *file\ =\ fopen\ (fileName,\ \textcolor{stringliteral}{"{}r"{}});}
\DoxyCodeLine{00969\ \ \ \ \ \textcolor{keywordflow}{if}\ (!file)}
\DoxyCodeLine{00970\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Failed\ to\ open\ file\ '\%s'."{}},\ fileName);}
\DoxyCodeLine{00971\ \ \ \ \ uint\_fast32\_t\ glyphCount\ =\ 1;\ \textcolor{comment}{//\ for\ glyph\ 0}}
\DoxyCodeLine{00972\ \ \ \ \ uint\_fast8\_t\ maxByteCount\ =\ 0;}
\DoxyCodeLine{00973\ \ \ \ \ \{\ \textcolor{comment}{//\ Hard\ code\ the\ .notdef\ glyph.}}
\DoxyCodeLine{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{00975\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{size\_t}\ byteCount\ =\ \textcolor{keyword}{sizeof}\ bitmap\ -\/\ 1;}
\DoxyCodeLine{00976\ \ \ \ \ \ \ \ \ assert\ (byteCount\ <=\ \mbox{\hyperlink{hex2otf_8c_ad0f95bf4a3a4a28b173b971e246b8745}{GLYPH\_MAX\_BYTE\_COUNT}});}
\DoxyCodeLine{00977\ \ \ \ \ \ \ \ \ assert\ (byteCount\ \%\ \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}}\ ==\ 0);}
\DoxyCodeLine{00978\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structGlyph}{Glyph}}\ *notdef\ =\ getBufferSlot\ (font-\/>glyphs,\ sizeof\ (\mbox{\hyperlink{structGlyph}{Glyph}}));}
\DoxyCodeLine{00979\ \ \ \ \ \ \ \ \ memcpy\ (notdef-\/>\mbox{\hyperlink{structGlyph_abbbc1113c6e10dc0fa986abbb7f7665e}{bitmap}},\ bitmap,\ byteCount);}
\DoxyCodeLine{00980\ \ \ \ \ \ \ \ \ notdef-\/>\mbox{\hyperlink{structGlyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}}\ =\ maxByteCount\ =\ byteCount;}
\DoxyCodeLine{00981\ \ \ \ \ \ \ \ \ notdef-\/>\mbox{\hyperlink{structGlyph_ada6b8b4b9419096c413b5a29dbc54aac}{combining}}\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{00982\ \ \ \ \ \ \ \ \ notdef-\/>\mbox{\hyperlink{structGlyph_ac113da35f4193641855eaf51547f9b43}{pos}}\ =\ 0;}
\DoxyCodeLine{00983\ \ \ \ \ \ \ \ \ notdef-\/>\mbox{\hyperlink{structGlyph_a7fb4dc03b71777de880164eee4ffbc51}{lsb}}\ =\ 0;}
\DoxyCodeLine{00984\ \ \ \ \ \}}
\DoxyCodeLine{00985\ \ \ \ \ \textcolor{keywordflow}{for}\ (;;)}
\DoxyCodeLine{00986\ \ \ \ \ \{}
\DoxyCodeLine{00987\ \ \ \ \ \ \ \ \ uint\_fast32\_t\ codePoint;}
\DoxyCodeLine{00988\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{hex2otf_8c_ae28f2f636e4d3dd3b5784a3bc3f92b58}{readCodePoint}}\ (\&codePoint,\ fileName,\ file))}
\DoxyCodeLine{00989\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{00990\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (++glyphCount\ >\ \mbox{\hyperlink{hex2otf_8c_a1a1d1da8a5f6da54d749399b173c9bfc}{MAX\_GLYPHS}})}
\DoxyCodeLine{00991\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}OpenType\ does\ not\ support\ more\ than\ \%lu\ glyphs."{}},}
\DoxyCodeLine{00992\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a1a1d1da8a5f6da54d749399b173c9bfc}{MAX\_GLYPHS}});}
\DoxyCodeLine{00993\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structGlyph}{Glyph}}\ *glyph\ =\ getBufferSlot\ (font-\/>glyphs,\ sizeof\ (\mbox{\hyperlink{structGlyph}{Glyph}}));}
\DoxyCodeLine{00994\ \ \ \ \ \ \ \ \ glyph-\/>\mbox{\hyperlink{structGlyph_a08ed20f3df1902ce776f6e1fccd089b9}{codePoint}}\ =\ codePoint;}
\DoxyCodeLine{00995\ \ \ \ \ \ \ \ \ glyph-\/>\mbox{\hyperlink{structGlyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}}\ =\ 0;}
\DoxyCodeLine{00996\ \ \ \ \ \ \ \ \ glyph-\/>\mbox{\hyperlink{structGlyph_ada6b8b4b9419096c413b5a29dbc54aac}{combining}}\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{00997\ \ \ \ \ \ \ \ \ glyph-\/>\mbox{\hyperlink{structGlyph_ac113da35f4193641855eaf51547f9b43}{pos}}\ =\ 0;}
\DoxyCodeLine{00998\ \ \ \ \ \ \ \ \ glyph-\/>\mbox{\hyperlink{structGlyph_a7fb4dc03b71777de880164eee4ffbc51}{lsb}}\ =\ 0;}
\DoxyCodeLine{00999\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{byte}\ *p\ =\ glyph-\/>\mbox{\hyperlink{structGlyph_abbbc1113c6e10dc0fa986abbb7f7665e}{bitmap}};;\ p++)}
\DoxyCodeLine{01000\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01001\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ h,\ l;}
\DoxyCodeLine{01002\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (isxdigit\ (h\ =\ getc\ (file))\ \&\&\ isxdigit\ (l\ =\ getc\ (file)))}
\DoxyCodeLine{01003\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{01004\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (++glyph-\/>\mbox{\hyperlink{structGlyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}}\ >\ \mbox{\hyperlink{hex2otf_8c_ad0f95bf4a3a4a28b173b971e246b8745}{GLYPH\_MAX\_BYTE\_COUNT}})}
\DoxyCodeLine{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{01006\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *p\ =\ nibbleValue\ (h)\ <<\ 4\ |\ nibbleValue\ (l);}
\DoxyCodeLine{01007\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01008\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (h\ ==\ \textcolor{charliteral}{'\(\backslash\)n'}\ ||\ (h\ ==\ EOF\ \&\&\ feof\ (file)))}
\DoxyCodeLine{01009\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{01010\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (ferror\ (file))}
\DoxyCodeLine{01011\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}\%s:\ Read\ error."{}},\ fileName);}
\DoxyCodeLine{01012\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{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{01014\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{01015\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (glyph-\/>\mbox{\hyperlink{structGlyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}}\ \%\ \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}}\ !=\ 0)}
\DoxyCodeLine{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{01017\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ codePoint,\ \mbox{\hyperlink{hex2otf_8c_a7d0a7ac24105d9c91bce2b5a1e9a1ad3}{GLYPH\_HEIGHT}});}
\DoxyCodeLine{01018\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (glyph-\/>\mbox{\hyperlink{structGlyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}}\ >\ maxByteCount)}
\DoxyCodeLine{01019\ \ \ \ \ \ \ \ \ \ \ \ \ maxByteCount\ =\ glyph-\/>\mbox{\hyperlink{structGlyph_aa309ceb984d5524ef7dab0e8927fdd64}{byteCount}};}
\DoxyCodeLine{01020\ \ \ \ \ \}}
\DoxyCodeLine{01021\ \ \ \ \ \textcolor{keywordflow}{if}\ (glyphCount\ ==\ 1)}
\DoxyCodeLine{01022\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}No\ glyph\ is\ specified."{}});}
\DoxyCodeLine{01023\ \ \ \ \ font-\/>glyphCount\ =\ glyphCount;}
\DoxyCodeLine{01024\ \ \ \ \ font-\/>maxWidth\ =\ \mbox{\hyperlink{hex2otf_8c_a79e768c38f3b21419f01d2d1347523be}{PW}}\ (maxByteCount);}
\DoxyCodeLine{01025\ \ \ \ \ fclose\ (file);}
\DoxyCodeLine{01026\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 70
Here is the caller graph for this function\+:
% FIG 71
\mbox{\Hypertarget{hex2otf_8c_a77ff68152c5cb38605010bc7621b0722}\label{hex2otf_8c_a77ff68152c5cb38605010bc7621b0722}} 
\index{hex2otf.c@{hex2otf.c}!sortGlyphs@{sortGlyphs}}
\index{sortGlyphs@{sortGlyphs}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{sortGlyphs()}{sortGlyphs()}}
{\footnotesize\ttfamily void sort\+Glyphs (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font }\end{DoxyParamCaption})}



Sort the glyphs in a font by Unicode code point. 

This function reads in an array of glyphs and sorts them by Unicode code point. If a duplicate code point is encountered, that will result in a fatal error with an error message to stderr.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em font} & Pointer to a \mbox{\hyperlink{structFont}{Font}} structure with glyphs to sort. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l01119}{1119}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{01120\ \{}
\DoxyCodeLine{01121\ \ \ \ \ \mbox{\hyperlink{structGlyph}{Glyph}}\ *glyphs\ =\ getBufferHead\ (font-\/>glyphs);}
\DoxyCodeLine{01122\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *\textcolor{keyword}{const}\ glyphsEnd\ =\ getBufferTail\ (font-\/>glyphs);}
\DoxyCodeLine{01123\ \ \ \ \ glyphs++;\ \textcolor{comment}{//\ glyph\ 0\ does\ not\ need\ sorting}}
\DoxyCodeLine{01124\ \ \ \ \ qsort\ (glyphs,\ glyphsEnd\ -\/\ glyphs,\ \textcolor{keyword}{sizeof}\ *glyphs,\ \mbox{\hyperlink{hex2otf_8c_a0d187cc87528ef35478afd7a68309f08}{byCodePoint}});}
\DoxyCodeLine{01125\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \mbox{\hyperlink{structGlyph}{Glyph}}\ *glyph\ =\ glyphs;\ glyph\ <\ glyphsEnd\ -\/\ 1;\ glyph++)}
\DoxyCodeLine{01126\ \ \ \ \ \{}
\DoxyCodeLine{01127\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (glyph[0].codePoint\ ==\ glyph[1].codePoint)}
\DoxyCodeLine{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{01129\ \ \ \ \ \ \ \ \ assert\ (glyph[0].codePoint\ <\ glyph[1].codePoint);}
\DoxyCodeLine{01130\ \ \ \ \ \}}
\DoxyCodeLine{01131\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 72
Here is the caller graph for this function\+:
% FIG 73
\mbox{\Hypertarget{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}\label{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}} 
\index{hex2otf.c@{hex2otf.c}!writeBytes@{writeBytes}}
\index{writeBytes@{writeBytes}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{writeBytes()}{writeBytes()}}
{\footnotesize\ttfamily void write\+Bytes (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{hex2otf_8c_a0c8186d9b9b7880309c27230bbb5e69d}{byte}}}]{bytes\mbox{[}$\,$\mbox{]},  }\item[{size\+\_\+t}]{count,  }\item[{FILE $\ast$}]{file }\end{DoxyParamCaption})}



Write an array of bytes to an output file. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em bytes} & An array of unsigned bytes to write. \\
\hline
\mbox{\texttt{ in}}  & {\em file} & The file pointer for writing, of type FILE $\ast$. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00538}{538}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00539\ \{}
\DoxyCodeLine{00540\ \ \ \ \ \textcolor{keywordflow}{if}\ (fwrite\ (bytes,\ count,\ 1,\ file)\ !=\ 1\ \&\&\ count\ !=\ 0)}
\DoxyCodeLine{00541\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Failed\ to\ write\ \%zu\ bytes\ to\ output\ file."{}},\ count);}
\DoxyCodeLine{00542\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 74
Here is the caller graph for this function\+:
% FIG 75
\mbox{\Hypertarget{hex2otf_8c_a074562f0527ff6db8b1b956b9356a315}\label{hex2otf_8c_a074562f0527ff6db8b1b956b9356a315}} 
\index{hex2otf.c@{hex2otf.c}!writeFont@{writeFont}}
\index{writeFont@{writeFont}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{writeFont()}{writeFont()}}
{\footnotesize\ttfamily void write\+Font (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structFont}{Font}} $\ast$}]{font,  }\item[{bool}]{is\+CFF,  }\item[{const char $\ast$}]{file\+Name }\end{DoxyParamCaption})}



Write Open\+Type font to output file. 

This function writes the constructed Open\+Type font to the output file named \char`\"{}filename\char`\"{}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em font} & Pointer to the font, of type \mbox{\hyperlink{structFont}{Font}} $\ast$. \\
\hline
\mbox{\texttt{ in}}  & {\em is\+CFF} & Boolean indicating whether the font has CFF data. \\
\hline
\mbox{\texttt{ in}}  & {\em filename} & The name of the font file to create. \\
\hline
\end{DoxyParams}
Add a byte shifted by 24, 16, 8, or 0 bits.

Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00786}{786}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00787\ \{}
\DoxyCodeLine{00788\ \ \ \ \ FILE\ *file\ =\ fopen\ (fileName,\ \textcolor{stringliteral}{"{}wb"{}});}
\DoxyCodeLine{00789\ \ \ \ \ \textcolor{keywordflow}{if}\ (!file)}
\DoxyCodeLine{00790\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Failed\ to\ open\ file\ '\%s'."{}},\ fileName);}
\DoxyCodeLine{00791\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structTable}{Table}}\ *\textcolor{keyword}{const}\ tables\ =\ getBufferHead\ (font-\/>tables);}
\DoxyCodeLine{00792\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structTable}{Table}}\ *\textcolor{keyword}{const}\ tablesEnd\ =\ getBufferTail\ (font-\/>tables);}
\DoxyCodeLine{00793\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ tableCount\ =\ tablesEnd\ -\/\ tables;}
\DoxyCodeLine{00794\ \ \ \ \ assert\ (0\ <\ tableCount\ \&\&\ tableCount\ <=\ \mbox{\hyperlink{hex2otf_8c_a01d5b7bf9004b7a8c920f958861d2a8e}{U16MAX}});}
\DoxyCodeLine{00795\ \ \ \ \ \textcolor{keywordtype}{size\_t}\ offset\ =\ 12\ +\ 16\ *\ tableCount;}
\DoxyCodeLine{00796\ \ \ \ \ uint\_fast32\_t\ totalChecksum\ =\ 0;}
\DoxyCodeLine{00797\ \ \ \ \ \mbox{\hyperlink{structBuffer}{Buffer}}\ *tableRecords\ =}
\DoxyCodeLine{00798\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ae8310060f5a9b7cefb84d0bb1b459b64}{newBuffer}}\ (\textcolor{keyword}{sizeof}\ (\textcolor{keyword}{struct}\ \mbox{\hyperlink{structTableRecord}{TableRecord}})\ *\ tableCount);}
\DoxyCodeLine{00799\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ tableCount;\ i++)}
\DoxyCodeLine{00800\ \ \ \ \ \{}
\DoxyCodeLine{00801\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structTableRecord}{TableRecord}}\ *record\ =}
\DoxyCodeLine{00802\ \ \ \ \ \ \ \ \ \ \ \ \ getBufferSlot\ (tableRecords,\ \textcolor{keyword}{sizeof}\ *record);}
\DoxyCodeLine{00803\ \ \ \ \ \ \ \ \ record-\/>tag\ =\ tables[i].tag;}
\DoxyCodeLine{00804\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ length\ =\ countBufferedBytes\ (tables[i].content);}
\DoxyCodeLine{00805\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \#if\ SIZE\_MAX\ >\ U32MAX}}
\DoxyCodeLine{00806\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (offset\ >\ \mbox{\hyperlink{hex2otf_8c_a7ccab01e56208030185cefdca13e0ac8}{U32MAX}})}
\DoxyCodeLine{00807\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Table\ offset\ exceeded\ 4\ GiB."{}});}
\DoxyCodeLine{00808\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (length\ >\ \mbox{\hyperlink{hex2otf_8c_a7ccab01e56208030185cefdca13e0ac8}{U32MAX}})}
\DoxyCodeLine{00809\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a2f5976201b1e630a94045f04a0348572}{fail}}\ (\textcolor{stringliteral}{"{}Table\ size\ exceeded\ 4\ GiB."{}});}
\DoxyCodeLine{00810\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \#endif}}
\DoxyCodeLine{00811\ \ \ \ \ \ \ \ \ record-\/>length\ =\ length;}
\DoxyCodeLine{00812\ \ \ \ \ \ \ \ \ record-\/>checksum\ =\ 0;}
\DoxyCodeLine{00813\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{byte}\ *p\ =\ getBufferHead\ (tables[i].content);}
\DoxyCodeLine{00814\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{byte}\ *\textcolor{keyword}{const}\ end\ =\ getBufferTail\ (tables[i].content);}
\DoxyCodeLine{00815\ \textcolor{comment}{}}
\DoxyCodeLine{00816\ \textcolor{comment}{\ \ \ \ \ \ \ \ ///\ Add\ a\ byte\ shifted\ by\ 24,\ 16,\ 8,\ or\ 0\ bits.}}
\DoxyCodeLine{00817\ \textcolor{comment}{}\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \#define\ addByte(shift)\ \(\backslash\)}}
\DoxyCodeLine{00818\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ if\ (p\ ==\ end)\ \(\backslash\)}}
\DoxyCodeLine{00819\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ break;\ \(\backslash\)}}
\DoxyCodeLine{00820\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ record-\/>checksum\ +=\ (uint\_fast32\_t)*p++\ <<\ (shift);}}
\DoxyCodeLine{00821\ }
\DoxyCodeLine{00822\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (;;)}
\DoxyCodeLine{00823\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00824\ \ \ \ \ \ \ \ \ \ \ \ \ addByte\ (24)}
\DoxyCodeLine{00825\ \ \ \ \ \ \ \ \ \ \ \ \ addByte\ (16)}
\DoxyCodeLine{00826\ \ \ \ \ \ \ \ \ \ \ \ \ addByte\ (8)}
\DoxyCodeLine{00827\ \ \ \ \ \ \ \ \ \ \ \ \ addByte\ (0)}
\DoxyCodeLine{00828\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00829\ \ \ \ \ \ \ \ \ \textcolor{preprocessor}{\#undef\ addByte}}
\DoxyCodeLine{00830\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a0d4560c5d562d31a33f092bb579f8397}{cacheZeros}}\ (tables[i].content,\ (\string~length\ +\ 1U)\ \&\ 3U);}
\DoxyCodeLine{00831\ \ \ \ \ \ \ \ \ record-\/>offset\ =\ offset;}
\DoxyCodeLine{00832\ \ \ \ \ \ \ \ \ offset\ +=\ countBufferedBytes\ (tables[i].content);}
\DoxyCodeLine{00833\ \ \ \ \ \ \ \ \ totalChecksum\ +=\ record-\/>checksum;}
\DoxyCodeLine{00834\ \ \ \ \ \}}
\DoxyCodeLine{00835\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structTableRecord}{TableRecord}}\ *records\ =\ getBufferHead\ (tableRecords);}
\DoxyCodeLine{00836\ \ \ \ \ qsort\ (records,\ tableCount,\ \textcolor{keyword}{sizeof}\ *records,\ \mbox{\hyperlink{hex2otf_8c_af1223f39e8627e0a3b0b7b533e6d0b64}{byTableTag}});}
\DoxyCodeLine{00837\ \ \ \ \ \textcolor{comment}{//\ Offset\ Table}}
\DoxyCodeLine{00838\ \ \ \ \ uint\_fast32\_t\ sfntVersion\ =\ isCFF\ ?\ 0x4f54544f\ :\ 0x00010000;}
\DoxyCodeLine{00839\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}}\ (sfntVersion,\ file);\ \textcolor{comment}{//\ sfntVersion}}
\DoxyCodeLine{00840\ \ \ \ \ totalChecksum\ +=\ sfntVersion;}
\DoxyCodeLine{00841\ \ \ \ \ uint\_fast16\_t\ entrySelector\ =\ 0;}
\DoxyCodeLine{00842\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ k\ =\ tableCount;\ k\ !=\ 1;\ k\ >>=\ 1)}
\DoxyCodeLine{00843\ \ \ \ \ \ \ \ \ entrySelector++;}
\DoxyCodeLine{00844\ \ \ \ \ uint\_fast16\_t\ searchRange\ =\ 1\ <<\ (entrySelector\ +\ 4);}
\DoxyCodeLine{00845\ \ \ \ \ uint\_fast16\_t\ rangeShift\ =\ (tableCount\ -\/\ (1\ <<\ entrySelector))\ <<\ 4;}
\DoxyCodeLine{00846\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}{writeU16}}\ (tableCount,\ file);\ \textcolor{comment}{//\ numTables}}
\DoxyCodeLine{00847\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}{writeU16}}\ (searchRange,\ file);\ \textcolor{comment}{//\ searchRange}}
\DoxyCodeLine{00848\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}{writeU16}}\ (entrySelector,\ file);\ \textcolor{comment}{//\ entrySelector}}
\DoxyCodeLine{00849\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}{writeU16}}\ (rangeShift,\ file);\ \textcolor{comment}{//\ rangeShift}}
\DoxyCodeLine{00850\ \ \ \ \ totalChecksum\ +=\ (uint\_fast32\_t)tableCount\ <<\ 16;}
\DoxyCodeLine{00851\ \ \ \ \ totalChecksum\ +=\ searchRange;}
\DoxyCodeLine{00852\ \ \ \ \ totalChecksum\ +=\ (uint\_fast32\_t)entrySelector\ <<\ 16;}
\DoxyCodeLine{00853\ \ \ \ \ totalChecksum\ +=\ rangeShift;}
\DoxyCodeLine{00854\ \ \ \ \ \textcolor{comment}{//\ Table\ Records\ (always\ sorted\ by\ table\ tags)}}
\DoxyCodeLine{00855\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ tableCount;\ i++)}
\DoxyCodeLine{00856\ \ \ \ \ \{}
\DoxyCodeLine{00857\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Table\ Record}}
\DoxyCodeLine{00858\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}}\ (records[i].tag,\ file);\ \textcolor{comment}{//\ tableTag}}
\DoxyCodeLine{00859\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}}\ (records[i].checksum,\ file);\ \textcolor{comment}{//\ checkSum}}
\DoxyCodeLine{00860\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}}\ (records[i].offset,\ file);\ \textcolor{comment}{//\ offset}}
\DoxyCodeLine{00861\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}}\ (records[i].length,\ file);\ \textcolor{comment}{//\ length}}
\DoxyCodeLine{00862\ \ \ \ \ \ \ \ \ totalChecksum\ +=\ records[i].tag;}
\DoxyCodeLine{00863\ \ \ \ \ \ \ \ \ totalChecksum\ +=\ records[i].checksum;}
\DoxyCodeLine{00864\ \ \ \ \ \ \ \ \ totalChecksum\ +=\ records[i].offset;}
\DoxyCodeLine{00865\ \ \ \ \ \ \ \ \ totalChecksum\ +=\ records[i].length;}
\DoxyCodeLine{00866\ \ \ \ \ \}}
\DoxyCodeLine{00867\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ac928f7761fc187ff86f33805309bec21}{freeBuffer}}\ (tableRecords);}
\DoxyCodeLine{00868\ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \mbox{\hyperlink{structTable}{Table}}\ *table\ =\ tables;\ table\ <\ tablesEnd;\ table++)}
\DoxyCodeLine{00869\ \ \ \ \ \{}
\DoxyCodeLine{00870\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (table-\/>tag\ ==\ 0x68656164)\ \textcolor{comment}{//\ 'head'\ table}}
\DoxyCodeLine{00871\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00872\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{byte}\ *begin\ =\ getBufferHead\ (table-\/>content);}
\DoxyCodeLine{00873\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{byte}\ *end\ =\ getBufferTail\ (table-\/>content);}
\DoxyCodeLine{00874\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}{writeBytes}}\ (begin,\ 8,\ file);}
\DoxyCodeLine{00875\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}{writeU32}}\ (0xb1b0afbaU\ -\/\ totalChecksum,\ file);\ \textcolor{comment}{//\ checksumAdjustment}}
\DoxyCodeLine{00876\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}{writeBytes}}\ (begin\ +\ 12,\ end\ -\/\ (begin\ +\ 12),\ file);}
\DoxyCodeLine{00877\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};}
\DoxyCodeLine{00878\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00879\ \ \ \ \ \ \ \ \ writeBuffer\ (table-\/>content,\ file);}
\DoxyCodeLine{00880\ \ \ \ \ \}}
\DoxyCodeLine{00881\ \ \ \ \ fclose\ (file);}
\DoxyCodeLine{00882\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 76
Here is the caller graph for this function\+:
% FIG 77
\mbox{\Hypertarget{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}\label{hex2otf_8c_a83aece82aa1fe815fc24a12be34a24b1}} 
\index{hex2otf.c@{hex2otf.c}!writeU16@{writeU16}}
\index{writeU16@{writeU16}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{writeU16()}{writeU16()}}
{\footnotesize\ttfamily void write\+U16 (\begin{DoxyParamCaption}\item[{uint\+\_\+fast16\+\_\+t}]{value,  }\item[{FILE $\ast$}]{file }\end{DoxyParamCaption})}



Write an unsigned 16-\/bit value to an output file. 

This function writes a 16-\/bit unsigned value in big-\/endian order to an output file specified with a file pointer.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em value} & The 16-\/bit value to write. \\
\hline
\mbox{\texttt{ in}}  & {\em file} & The file pointer for writing, of type FILE $\ast$. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00554}{554}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00555\ \{}
\DoxyCodeLine{00556\ \ \ \ \ \textcolor{keywordtype}{byte}\ bytes[]\ =}
\DoxyCodeLine{00557\ \ \ \ \ \{}
\DoxyCodeLine{00558\ \ \ \ \ \ \ \ \ (value\ >>\ 8)\ \&\ 0xff,}
\DoxyCodeLine{00559\ \ \ \ \ \ \ \ \ (value\ \ \ \ \ )\ \&\ 0xff,}
\DoxyCodeLine{00560\ \ \ \ \ \};}
\DoxyCodeLine{00561\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}{writeBytes}}\ (bytes,\ \textcolor{keyword}{sizeof}\ bytes,\ file);}
\DoxyCodeLine{00562\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 78
Here is the caller graph for this function\+:
% FIG 79
\mbox{\Hypertarget{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}\label{hex2otf_8c_a941153850cde042e39ce40d47d5aac5f}} 
\index{hex2otf.c@{hex2otf.c}!writeU32@{writeU32}}
\index{writeU32@{writeU32}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{writeU32()}{writeU32()}}
{\footnotesize\ttfamily void write\+U32 (\begin{DoxyParamCaption}\item[{uint\+\_\+fast32\+\_\+t}]{value,  }\item[{FILE $\ast$}]{file }\end{DoxyParamCaption})}



Write an unsigned 32-\/bit value to an output file. 

This function writes a 32-\/bit unsigned value in big-\/endian order to an output file specified with a file pointer.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em value} & The 32-\/bit value to write. \\
\hline
\mbox{\texttt{ in}}  & {\em file} & The file pointer for writing, of type FILE $\ast$. \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00574}{574}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{00575\ \{}
\DoxyCodeLine{00576\ \ \ \ \ \textcolor{keywordtype}{byte}\ bytes[]\ =}
\DoxyCodeLine{00577\ \ \ \ \ \{}
\DoxyCodeLine{00578\ \ \ \ \ \ \ \ \ (value\ >>\ 24)\ \&\ 0xff,}
\DoxyCodeLine{00579\ \ \ \ \ \ \ \ \ (value\ >>\ 16)\ \&\ 0xff,}
\DoxyCodeLine{00580\ \ \ \ \ \ \ \ \ (value\ >>\ \ 8)\ \&\ 0xff,}
\DoxyCodeLine{00581\ \ \ \ \ \ \ \ \ (value\ \ \ \ \ \ )\ \&\ 0xff,}
\DoxyCodeLine{00582\ \ \ \ \ \};}
\DoxyCodeLine{00583\ \ \ \ \ \mbox{\hyperlink{hex2otf_8c_ae2b46edf2ac290c695e2b27d16f1b380}{writeBytes}}\ (bytes,\ \textcolor{keyword}{sizeof}\ bytes,\ file);}
\DoxyCodeLine{00584\ \}}

\end{DoxyCode}
Here is the call graph for this function\+:
% FIG 80
Here is the caller graph for this function\+:
% FIG 81


\doxysubsection{Variable Documentation}
\mbox{\Hypertarget{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}\label{hex2otf_8c_a0524ff7f6df40782a03af6d8efd1cf45}} 
\index{hex2otf.c@{hex2otf.c}!allBuffers@{allBuffers}}
\index{allBuffers@{allBuffers}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{allBuffers}{allBuffers}}
{\footnotesize\ttfamily \mbox{\hyperlink{structBuffer}{Buffer}}$\ast$ all\+Buffers}



Initial allocation of empty array of buffer pointers. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00139}{139}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}\label{hex2otf_8c_a91d9682686a5100fae5b0cf362940e14}} 
\index{hex2otf.c@{hex2otf.c}!bufferCount@{bufferCount}}
\index{bufferCount@{bufferCount}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{bufferCount}{bufferCount}}
{\footnotesize\ttfamily size\+\_\+t buffer\+Count}



Number of buffers in a \mbox{\hyperlink{structBuffer}{Buffer}} $\ast$ array. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00140}{140}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

\mbox{\Hypertarget{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}\label{hex2otf_8c_a11ea3753e3a4f90123b78a4b1f731bd4}} 
\index{hex2otf.c@{hex2otf.c}!nextBufferIndex@{nextBufferIndex}}
\index{nextBufferIndex@{nextBufferIndex}!hex2otf.c@{hex2otf.c}}
\doxysubsubsection{\texorpdfstring{nextBufferIndex}{nextBufferIndex}}
{\footnotesize\ttfamily size\+\_\+t next\+Buffer\+Index}



Index number to tail element of \mbox{\hyperlink{structBuffer}{Buffer}} $\ast$ array. 



Definition at line \mbox{\hyperlink{hex2otf_8c_source_l00141}{141}} of file \mbox{\hyperlink{hex2otf_8c_source}{hex2otf.\+c}}.

