ftimage.h 75 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220
  1. /***************************************************************************/
  2. /* */
  3. /* ftimage.h */
  4. /* */
  5. /* FreeType glyph image formats and default raster interface */
  6. /* (specification). */
  7. /* */
  8. /* Copyright 1996-2010, 2013, 2014 by */
  9. /* David Turner, Robert Wilhelm, and Werner Lemberg. */
  10. /* */
  11. /* This file is part of the FreeType project, and may only be used, */
  12. /* modified, and distributed under the terms of the FreeType project */
  13. /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
  14. /* this file you indicate that you have read the license and */
  15. /* understand and accept it fully. */
  16. /* */
  17. /***************************************************************************/
  18. /*************************************************************************/
  19. /* */
  20. /* Note: A `raster' is simply a scan-line converter, used to render */
  21. /* FT_Outlines into FT_Bitmaps. */
  22. /* */
  23. /*************************************************************************/
  24. #ifndef __FTIMAGE_H__
  25. #define __FTIMAGE_H__
  26. /* _STANDALONE_ is from ftgrays.c */
  27. #ifndef _STANDALONE_
  28. #include <ft2build.h>
  29. #endif
  30. FT_BEGIN_HEADER
  31. /*************************************************************************/
  32. /* */
  33. /* <Section> */
  34. /* basic_types */
  35. /* */
  36. /*************************************************************************/
  37. /*************************************************************************/
  38. /* */
  39. /* <Type> */
  40. /* FT_Pos */
  41. /* */
  42. /* <Description> */
  43. /* The type FT_Pos is used to store vectorial coordinates. Depending */
  44. /* on the context, these can represent distances in integer font */
  45. /* units, or 16.16, or 26.6 fixed-point pixel coordinates. */
  46. /* */
  47. typedef signed long FT_Pos;
  48. /*************************************************************************/
  49. /* */
  50. /* <Struct> */
  51. /* FT_Vector */
  52. /* */
  53. /* <Description> */
  54. /* A simple structure used to store a 2D vector; coordinates are of */
  55. /* the FT_Pos type. */
  56. /* */
  57. /* <Fields> */
  58. /* x :: The horizontal coordinate. */
  59. /* y :: The vertical coordinate. */
  60. /* */
  61. typedef struct FT_Vector_
  62. {
  63. FT_Pos x;
  64. FT_Pos y;
  65. } FT_Vector;
  66. /*************************************************************************/
  67. /* */
  68. /* <Struct> */
  69. /* FT_BBox */
  70. /* */
  71. /* <Description> */
  72. /* A structure used to hold an outline's bounding box, i.e., the */
  73. /* coordinates of its extrema in the horizontal and vertical */
  74. /* directions. */
  75. /* */
  76. /* <Fields> */
  77. /* xMin :: The horizontal minimum (left-most). */
  78. /* */
  79. /* yMin :: The vertical minimum (bottom-most). */
  80. /* */
  81. /* xMax :: The horizontal maximum (right-most). */
  82. /* */
  83. /* yMax :: The vertical maximum (top-most). */
  84. /* */
  85. /* <Note> */
  86. /* The bounding box is specified with the coordinates of the lower */
  87. /* left and the upper right corner. In PostScript, those values are */
  88. /* often called (llx,lly) and (urx,ury), respectively. */
  89. /* */
  90. /* If `yMin' is negative, this value gives the glyph's descender. */
  91. /* Otherwise, the glyph doesn't descend below the baseline. */
  92. /* Similarly, if `ymax' is positive, this value gives the glyph's */
  93. /* ascender. */
  94. /* */
  95. /* `xMin' gives the horizontal distance from the glyph's origin to */
  96. /* the left edge of the glyph's bounding box. If `xMin' is negative, */
  97. /* the glyph extends to the left of the origin. */
  98. /* */
  99. typedef struct FT_BBox_
  100. {
  101. FT_Pos xMin, yMin;
  102. FT_Pos xMax, yMax;
  103. } FT_BBox;
  104. /*************************************************************************/
  105. /* */
  106. /* <Enum> */
  107. /* FT_Pixel_Mode */
  108. /* */
  109. /* <Description> */
  110. /* An enumeration type used to describe the format of pixels in a */
  111. /* given bitmap. Note that additional formats may be added in the */
  112. /* future. */
  113. /* */
  114. /* <Values> */
  115. /* FT_PIXEL_MODE_NONE :: */
  116. /* Value~0 is reserved. */
  117. /* */
  118. /* FT_PIXEL_MODE_MONO :: */
  119. /* A monochrome bitmap, using 1~bit per pixel. Note that pixels */
  120. /* are stored in most-significant order (MSB), which means that */
  121. /* the left-most pixel in a byte has value 128. */
  122. /* */
  123. /* FT_PIXEL_MODE_GRAY :: */
  124. /* An 8-bit bitmap, generally used to represent anti-aliased glyph */
  125. /* images. Each pixel is stored in one byte. Note that the number */
  126. /* of `gray' levels is stored in the `num_grays' field of the */
  127. /* @FT_Bitmap structure (it generally is 256). */
  128. /* */
  129. /* FT_PIXEL_MODE_GRAY2 :: */
  130. /* A 2-bit per pixel bitmap, used to represent embedded */
  131. /* anti-aliased bitmaps in font files according to the OpenType */
  132. /* specification. We haven't found a single font using this */
  133. /* format, however. */
  134. /* */
  135. /* FT_PIXEL_MODE_GRAY4 :: */
  136. /* A 4-bit per pixel bitmap, representing embedded anti-aliased */
  137. /* bitmaps in font files according to the OpenType specification. */
  138. /* We haven't found a single font using this format, however. */
  139. /* */
  140. /* FT_PIXEL_MODE_LCD :: */
  141. /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */
  142. /* used for display on LCD displays; the bitmap is three times */
  143. /* wider than the original glyph image. See also */
  144. /* @FT_RENDER_MODE_LCD. */
  145. /* */
  146. /* FT_PIXEL_MODE_LCD_V :: */
  147. /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */
  148. /* used for display on rotated LCD displays; the bitmap is three */
  149. /* times taller than the original glyph image. See also */
  150. /* @FT_RENDER_MODE_LCD_V. */
  151. /* */
  152. /* FT_PIXEL_MODE_BGRA :: */
  153. /* An image with four 8-bit channels per pixel, representing a */
  154. /* color image (such as emoticons) with alpha channel. For each */
  155. /* pixel, the format is BGRA, which means, the blue channel comes */
  156. /* first in memory. The color channels are pre-multiplied and in */
  157. /* the sRGB colorspace. For example, full red at half-translucent */
  158. /* opacity will be represented as `00,00,80,80', not `00,00,FF,80'. */
  159. /* See also @FT_LOAD_COLOR. */
  160. /* */
  161. typedef enum FT_Pixel_Mode_
  162. {
  163. FT_PIXEL_MODE_NONE = 0,
  164. FT_PIXEL_MODE_MONO,
  165. FT_PIXEL_MODE_GRAY,
  166. FT_PIXEL_MODE_GRAY2,
  167. FT_PIXEL_MODE_GRAY4,
  168. FT_PIXEL_MODE_LCD,
  169. FT_PIXEL_MODE_LCD_V,
  170. FT_PIXEL_MODE_BGRA,
  171. FT_PIXEL_MODE_MAX /* do not remove */
  172. } FT_Pixel_Mode;
  173. /* these constants are deprecated; use the corresponding `FT_Pixel_Mode' */
  174. /* values instead. */
  175. #define ft_pixel_mode_none FT_PIXEL_MODE_NONE
  176. #define ft_pixel_mode_mono FT_PIXEL_MODE_MONO
  177. #define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY
  178. #define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2
  179. #define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4
  180. /*************************************************************************/
  181. /* */
  182. /* <Struct> */
  183. /* FT_Bitmap */
  184. /* */
  185. /* <Description> */
  186. /* A structure used to describe a bitmap or pixmap to the raster. */
  187. /* Note that we now manage pixmaps of various depths through the */
  188. /* `pixel_mode' field. */
  189. /* */
  190. /* <Fields> */
  191. /* rows :: The number of bitmap rows. */
  192. /* */
  193. /* width :: The number of pixels in bitmap row. */
  194. /* */
  195. /* pitch :: The pitch's absolute value is the number of bytes */
  196. /* taken by one bitmap row, including padding. */
  197. /* However, the pitch is positive when the bitmap has */
  198. /* a `down' flow, and negative when it has an `up' */
  199. /* flow. In all cases, the pitch is an offset to add */
  200. /* to a bitmap pointer in order to go down one row. */
  201. /* */
  202. /* Note that `padding' means the alignment of a */
  203. /* bitmap to a byte border, and FreeType functions */
  204. /* normally align to the smallest possible integer */
  205. /* value. */
  206. /* */
  207. /* For the B/W rasterizer, `pitch' is always an even */
  208. /* number. */
  209. /* */
  210. /* To change the pitch of a bitmap (say, to make it a */
  211. /* multiple of 4), use @FT_Bitmap_Convert. */
  212. /* Alternatively, you might use callback functions to */
  213. /* directly render to the application's surface; see */
  214. /* the file `example2.cpp' in the tutorial for a */
  215. /* demonstration. */
  216. /* */
  217. /* buffer :: A typeless pointer to the bitmap buffer. This */
  218. /* value should be aligned on 32-bit boundaries in */
  219. /* most cases. */
  220. /* */
  221. /* num_grays :: This field is only used with */
  222. /* @FT_PIXEL_MODE_GRAY; it gives the number of gray */
  223. /* levels used in the bitmap. */
  224. /* */
  225. /* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */
  226. /* See @FT_Pixel_Mode for possible values. */
  227. /* */
  228. /* palette_mode :: This field is intended for paletted pixel modes; */
  229. /* it indicates how the palette is stored. Not */
  230. /* used currently. */
  231. /* */
  232. /* palette :: A typeless pointer to the bitmap palette; this */
  233. /* field is intended for paletted pixel modes. Not */
  234. /* used currently. */
  235. /* */
  236. /* <Note> */
  237. /* For now, the only pixel modes supported by FreeType are mono and */
  238. /* grays. However, drivers might be added in the future to support */
  239. /* more `colorful' options. */
  240. /* */
  241. typedef struct FT_Bitmap_
  242. {
  243. unsigned int rows;
  244. unsigned int width;
  245. int pitch;
  246. unsigned char* buffer;
  247. unsigned short num_grays;
  248. unsigned char pixel_mode;
  249. unsigned char palette_mode;
  250. void* palette;
  251. } FT_Bitmap;
  252. /*************************************************************************/
  253. /* */
  254. /* <Section> */
  255. /* outline_processing */
  256. /* */
  257. /*************************************************************************/
  258. /*************************************************************************/
  259. /* */
  260. /* <Struct> */
  261. /* FT_Outline */
  262. /* */
  263. /* <Description> */
  264. /* This structure is used to describe an outline to the scan-line */
  265. /* converter. */
  266. /* */
  267. /* <Fields> */
  268. /* n_contours :: The number of contours in the outline. */
  269. /* */
  270. /* n_points :: The number of points in the outline. */
  271. /* */
  272. /* points :: A pointer to an array of `n_points' @FT_Vector */
  273. /* elements, giving the outline's point coordinates. */
  274. /* */
  275. /* tags :: A pointer to an array of `n_points' chars, giving */
  276. /* each outline point's type. */
  277. /* */
  278. /* If bit~0 is unset, the point is `off' the curve, */
  279. /* i.e., a Bézier control point, while it is `on' if */
  280. /* set. */
  281. /* */
  282. /* Bit~1 is meaningful for `off' points only. If set, */
  283. /* it indicates a third-order Bézier arc control point; */
  284. /* and a second-order control point if unset. */
  285. /* */
  286. /* If bit~2 is set, bits 5-7 contain the drop-out mode */
  287. /* (as defined in the OpenType specification; the value */
  288. /* is the same as the argument to the SCANMODE */
  289. /* instruction). */
  290. /* */
  291. /* Bits 3 and~4 are reserved for internal purposes. */
  292. /* */
  293. /* contours :: An array of `n_contours' shorts, giving the end */
  294. /* point of each contour within the outline. For */
  295. /* example, the first contour is defined by the points */
  296. /* `0' to `contours[0]', the second one is defined by */
  297. /* the points `contours[0]+1' to `contours[1]', etc. */
  298. /* */
  299. /* flags :: A set of bit flags used to characterize the outline */
  300. /* and give hints to the scan-converter and hinter on */
  301. /* how to convert/grid-fit it. See @FT_OUTLINE_XXX. */
  302. /* */
  303. /* <Note> */
  304. /* The B/W rasterizer only checks bit~2 in the `tags' array for the */
  305. /* first point of each contour. The drop-out mode as given with */
  306. /* @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and */
  307. /* @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden. */
  308. /* */
  309. typedef struct FT_Outline_
  310. {
  311. short n_contours; /* number of contours in glyph */
  312. short n_points; /* number of points in the glyph */
  313. FT_Vector* points; /* the outline's points */
  314. char* tags; /* the points flags */
  315. short* contours; /* the contour end points */
  316. int flags; /* outline masks */
  317. } FT_Outline;
  318. /* */
  319. /* Following limits must be consistent with */
  320. /* FT_Outline.{n_contours,n_points} */
  321. #define FT_OUTLINE_CONTOURS_MAX SHRT_MAX
  322. #define FT_OUTLINE_POINTS_MAX SHRT_MAX
  323. /*************************************************************************/
  324. /* */
  325. /* <Enum> */
  326. /* FT_OUTLINE_XXX */
  327. /* */
  328. /* <Description> */
  329. /* A list of bit-field constants use for the flags in an outline's */
  330. /* `flags' field. */
  331. /* */
  332. /* <Values> */
  333. /* FT_OUTLINE_NONE :: */
  334. /* Value~0 is reserved. */
  335. /* */
  336. /* FT_OUTLINE_OWNER :: */
  337. /* If set, this flag indicates that the outline's field arrays */
  338. /* (i.e., `points', `flags', and `contours') are `owned' by the */
  339. /* outline object, and should thus be freed when it is destroyed. */
  340. /* */
  341. /* FT_OUTLINE_EVEN_ODD_FILL :: */
  342. /* By default, outlines are filled using the non-zero winding rule. */
  343. /* If set to 1, the outline will be filled using the even-odd fill */
  344. /* rule (only works with the smooth rasterizer). */
  345. /* */
  346. /* FT_OUTLINE_REVERSE_FILL :: */
  347. /* By default, outside contours of an outline are oriented in */
  348. /* clock-wise direction, as defined in the TrueType specification. */
  349. /* This flag is set if the outline uses the opposite direction */
  350. /* (typically for Type~1 fonts). This flag is ignored by the scan */
  351. /* converter. */
  352. /* */
  353. /* FT_OUTLINE_IGNORE_DROPOUTS :: */
  354. /* By default, the scan converter will try to detect drop-outs in */
  355. /* an outline and correct the glyph bitmap to ensure consistent */
  356. /* shape continuity. If set, this flag hints the scan-line */
  357. /* converter to ignore such cases. See below for more information. */
  358. /* */
  359. /* FT_OUTLINE_SMART_DROPOUTS :: */
  360. /* Select smart dropout control. If unset, use simple dropout */
  361. /* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See */
  362. /* below for more information. */
  363. /* */
  364. /* FT_OUTLINE_INCLUDE_STUBS :: */
  365. /* If set, turn pixels on for `stubs', otherwise exclude them. */
  366. /* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for */
  367. /* more information. */
  368. /* */
  369. /* FT_OUTLINE_HIGH_PRECISION :: */
  370. /* This flag indicates that the scan-line converter should try to */
  371. /* convert this outline to bitmaps with the highest possible */
  372. /* quality. It is typically set for small character sizes. Note */
  373. /* that this is only a hint that might be completely ignored by a */
  374. /* given scan-converter. */
  375. /* */
  376. /* FT_OUTLINE_SINGLE_PASS :: */
  377. /* This flag is set to force a given scan-converter to only use a */
  378. /* single pass over the outline to render a bitmap glyph image. */
  379. /* Normally, it is set for very large character sizes. It is only */
  380. /* a hint that might be completely ignored by a given */
  381. /* scan-converter. */
  382. /* */
  383. /* <Note> */
  384. /* The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */
  385. /* and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth */
  386. /* rasterizer. */
  387. /* */
  388. /* There exists a second mechanism to pass the drop-out mode to the */
  389. /* B/W rasterizer; see the `tags' field in @FT_Outline. */
  390. /* */
  391. /* Please refer to the description of the `SCANTYPE' instruction in */
  392. /* the OpenType specification (in file `ttinst1.doc') how simple */
  393. /* drop-outs, smart drop-outs, and stubs are defined. */
  394. /* */
  395. #define FT_OUTLINE_NONE 0x0
  396. #define FT_OUTLINE_OWNER 0x1
  397. #define FT_OUTLINE_EVEN_ODD_FILL 0x2
  398. #define FT_OUTLINE_REVERSE_FILL 0x4
  399. #define FT_OUTLINE_IGNORE_DROPOUTS 0x8
  400. #define FT_OUTLINE_SMART_DROPOUTS 0x10
  401. #define FT_OUTLINE_INCLUDE_STUBS 0x20
  402. #define FT_OUTLINE_HIGH_PRECISION 0x100
  403. #define FT_OUTLINE_SINGLE_PASS 0x200
  404. /* these constants are deprecated; use the corresponding */
  405. /* `FT_OUTLINE_XXX' values instead */
  406. #define ft_outline_none FT_OUTLINE_NONE
  407. #define ft_outline_owner FT_OUTLINE_OWNER
  408. #define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL
  409. #define ft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL
  410. #define ft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS
  411. #define ft_outline_high_precision FT_OUTLINE_HIGH_PRECISION
  412. #define ft_outline_single_pass FT_OUTLINE_SINGLE_PASS
  413. /* */
  414. #define FT_CURVE_TAG( flag ) ( flag & 3 )
  415. #define FT_CURVE_TAG_ON 1
  416. #define FT_CURVE_TAG_CONIC 0
  417. #define FT_CURVE_TAG_CUBIC 2
  418. #define FT_CURVE_TAG_HAS_SCANMODE 4
  419. #define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */
  420. #define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */
  421. #define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \
  422. FT_CURVE_TAG_TOUCH_Y )
  423. #define FT_Curve_Tag_On FT_CURVE_TAG_ON
  424. #define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC
  425. #define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC
  426. #define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X
  427. #define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y
  428. /*************************************************************************/
  429. /* */
  430. /* <FuncType> */
  431. /* FT_Outline_MoveToFunc */
  432. /* */
  433. /* <Description> */
  434. /* A function pointer type used to describe the signature of a `move */
  435. /* to' function during outline walking/decomposition. */
  436. /* */
  437. /* A `move to' is emitted to start a new contour in an outline. */
  438. /* */
  439. /* <Input> */
  440. /* to :: A pointer to the target point of the `move to'. */
  441. /* */
  442. /* user :: A typeless pointer, which is passed from the caller of the */
  443. /* decomposition function. */
  444. /* */
  445. /* <Return> */
  446. /* Error code. 0~means success. */
  447. /* */
  448. typedef int
  449. (*FT_Outline_MoveToFunc)( const FT_Vector* to,
  450. void* user );
  451. #define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc
  452. /*************************************************************************/
  453. /* */
  454. /* <FuncType> */
  455. /* FT_Outline_LineToFunc */
  456. /* */
  457. /* <Description> */
  458. /* A function pointer type used to describe the signature of a `line */
  459. /* to' function during outline walking/decomposition. */
  460. /* */
  461. /* A `line to' is emitted to indicate a segment in the outline. */
  462. /* */
  463. /* <Input> */
  464. /* to :: A pointer to the target point of the `line to'. */
  465. /* */
  466. /* user :: A typeless pointer, which is passed from the caller of the */
  467. /* decomposition function. */
  468. /* */
  469. /* <Return> */
  470. /* Error code. 0~means success. */
  471. /* */
  472. typedef int
  473. (*FT_Outline_LineToFunc)( const FT_Vector* to,
  474. void* user );
  475. #define FT_Outline_LineTo_Func FT_Outline_LineToFunc
  476. /*************************************************************************/
  477. /* */
  478. /* <FuncType> */
  479. /* FT_Outline_ConicToFunc */
  480. /* */
  481. /* <Description> */
  482. /* A function pointer type used to describe the signature of a `conic */
  483. /* to' function during outline walking or decomposition. */
  484. /* */
  485. /* A `conic to' is emitted to indicate a second-order Bézier arc in */
  486. /* the outline. */
  487. /* */
  488. /* <Input> */
  489. /* control :: An intermediate control point between the last position */
  490. /* and the new target in `to'. */
  491. /* */
  492. /* to :: A pointer to the target end point of the conic arc. */
  493. /* */
  494. /* user :: A typeless pointer, which is passed from the caller of */
  495. /* the decomposition function. */
  496. /* */
  497. /* <Return> */
  498. /* Error code. 0~means success. */
  499. /* */
  500. typedef int
  501. (*FT_Outline_ConicToFunc)( const FT_Vector* control,
  502. const FT_Vector* to,
  503. void* user );
  504. #define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc
  505. /*************************************************************************/
  506. /* */
  507. /* <FuncType> */
  508. /* FT_Outline_CubicToFunc */
  509. /* */
  510. /* <Description> */
  511. /* A function pointer type used to describe the signature of a `cubic */
  512. /* to' function during outline walking or decomposition. */
  513. /* */
  514. /* A `cubic to' is emitted to indicate a third-order Bézier arc. */
  515. /* */
  516. /* <Input> */
  517. /* control1 :: A pointer to the first Bézier control point. */
  518. /* */
  519. /* control2 :: A pointer to the second Bézier control point. */
  520. /* */
  521. /* to :: A pointer to the target end point. */
  522. /* */
  523. /* user :: A typeless pointer, which is passed from the caller of */
  524. /* the decomposition function. */
  525. /* */
  526. /* <Return> */
  527. /* Error code. 0~means success. */
  528. /* */
  529. typedef int
  530. (*FT_Outline_CubicToFunc)( const FT_Vector* control1,
  531. const FT_Vector* control2,
  532. const FT_Vector* to,
  533. void* user );
  534. #define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc
  535. /*************************************************************************/
  536. /* */
  537. /* <Struct> */
  538. /* FT_Outline_Funcs */
  539. /* */
  540. /* <Description> */
  541. /* A structure to hold various function pointers used during outline */
  542. /* decomposition in order to emit segments, conic, and cubic Béziers. */
  543. /* */
  544. /* <Fields> */
  545. /* move_to :: The `move to' emitter. */
  546. /* */
  547. /* line_to :: The segment emitter. */
  548. /* */
  549. /* conic_to :: The second-order Bézier arc emitter. */
  550. /* */
  551. /* cubic_to :: The third-order Bézier arc emitter. */
  552. /* */
  553. /* shift :: The shift that is applied to coordinates before they */
  554. /* are sent to the emitter. */
  555. /* */
  556. /* delta :: The delta that is applied to coordinates before they */
  557. /* are sent to the emitter, but after the shift. */
  558. /* */
  559. /* <Note> */
  560. /* The point coordinates sent to the emitters are the transformed */
  561. /* version of the original coordinates (this is important for high */
  562. /* accuracy during scan-conversion). The transformation is simple: */
  563. /* */
  564. /* { */
  565. /* x' = (x << shift) - delta */
  566. /* y' = (x << shift) - delta */
  567. /* } */
  568. /* */
  569. /* Set the values of `shift' and `delta' to~0 to get the original */
  570. /* point coordinates. */
  571. /* */
  572. typedef struct FT_Outline_Funcs_
  573. {
  574. FT_Outline_MoveToFunc move_to;
  575. FT_Outline_LineToFunc line_to;
  576. FT_Outline_ConicToFunc conic_to;
  577. FT_Outline_CubicToFunc cubic_to;
  578. int shift;
  579. FT_Pos delta;
  580. } FT_Outline_Funcs;
  581. /*************************************************************************/
  582. /* */
  583. /* <Section> */
  584. /* basic_types */
  585. /* */
  586. /*************************************************************************/
  587. /*************************************************************************/
  588. /* */
  589. /* <Macro> */
  590. /* FT_IMAGE_TAG */
  591. /* */
  592. /* <Description> */
  593. /* This macro converts four-letter tags to an unsigned long type. */
  594. /* */
  595. /* <Note> */
  596. /* Since many 16-bit compilers don't like 32-bit enumerations, you */
  597. /* should redefine this macro in case of problems to something like */
  598. /* this: */
  599. /* */
  600. /* { */
  601. /* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */
  602. /* } */
  603. /* */
  604. /* to get a simple enumeration without assigning special numbers. */
  605. /* */
  606. #ifndef FT_IMAGE_TAG
  607. #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) \
  608. value = ( ( (unsigned long)_x1 << 24 ) | \
  609. ( (unsigned long)_x2 << 16 ) | \
  610. ( (unsigned long)_x3 << 8 ) | \
  611. (unsigned long)_x4 )
  612. #endif /* FT_IMAGE_TAG */
  613. /*************************************************************************/
  614. /* */
  615. /* <Enum> */
  616. /* FT_Glyph_Format */
  617. /* */
  618. /* <Description> */
  619. /* An enumeration type used to describe the format of a given glyph */
  620. /* image. Note that this version of FreeType only supports two image */
  621. /* formats, even though future font drivers will be able to register */
  622. /* their own format. */
  623. /* */
  624. /* <Values> */
  625. /* FT_GLYPH_FORMAT_NONE :: */
  626. /* The value~0 is reserved. */
  627. /* */
  628. /* FT_GLYPH_FORMAT_COMPOSITE :: */
  629. /* The glyph image is a composite of several other images. This */
  630. /* format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to */
  631. /* report compound glyphs (like accented characters). */
  632. /* */
  633. /* FT_GLYPH_FORMAT_BITMAP :: */
  634. /* The glyph image is a bitmap, and can be described as an */
  635. /* @FT_Bitmap. You generally need to access the `bitmap' field of */
  636. /* the @FT_GlyphSlotRec structure to read it. */
  637. /* */
  638. /* FT_GLYPH_FORMAT_OUTLINE :: */
  639. /* The glyph image is a vectorial outline made of line segments */
  640. /* and Bézier arcs; it can be described as an @FT_Outline; you */
  641. /* generally want to access the `outline' field of the */
  642. /* @FT_GlyphSlotRec structure to read it. */
  643. /* */
  644. /* FT_GLYPH_FORMAT_PLOTTER :: */
  645. /* The glyph image is a vectorial path with no inside and outside */
  646. /* contours. Some Type~1 fonts, like those in the Hershey family, */
  647. /* contain glyphs in this format. These are described as */
  648. /* @FT_Outline, but FreeType isn't currently capable of rendering */
  649. /* them correctly. */
  650. /* */
  651. typedef enum FT_Glyph_Format_
  652. {
  653. FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),
  654. FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),
  655. FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP, 'b', 'i', 't', 's' ),
  656. FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE, 'o', 'u', 't', 'l' ),
  657. FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' )
  658. } FT_Glyph_Format;
  659. /* these constants are deprecated; use the corresponding */
  660. /* `FT_Glyph_Format' values instead. */
  661. #define ft_glyph_format_none FT_GLYPH_FORMAT_NONE
  662. #define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE
  663. #define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP
  664. #define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE
  665. #define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER
  666. /*************************************************************************/
  667. /*************************************************************************/
  668. /*************************************************************************/
  669. /***** *****/
  670. /***** R A S T E R D E F I N I T I O N S *****/
  671. /***** *****/
  672. /*************************************************************************/
  673. /*************************************************************************/
  674. /*************************************************************************/
  675. /*************************************************************************/
  676. /* */
  677. /* A raster is a scan converter, in charge of rendering an outline into */
  678. /* a a bitmap. This section contains the public API for rasters. */
  679. /* */
  680. /* Note that in FreeType 2, all rasters are now encapsulated within */
  681. /* specific modules called `renderers'. See `ftrender.h' for more */
  682. /* details on renderers. */
  683. /* */
  684. /*************************************************************************/
  685. /*************************************************************************/
  686. /* */
  687. /* <Section> */
  688. /* raster */
  689. /* */
  690. /* <Title> */
  691. /* Scanline Converter */
  692. /* */
  693. /* <Abstract> */
  694. /* How vectorial outlines are converted into bitmaps and pixmaps. */
  695. /* */
  696. /* <Description> */
  697. /* This section contains technical definitions. */
  698. /* */
  699. /* <Order> */
  700. /* FT_Raster */
  701. /* FT_Span */
  702. /* FT_SpanFunc */
  703. /* */
  704. /* FT_Raster_Params */
  705. /* FT_RASTER_FLAG_XXX */
  706. /* */
  707. /* FT_Raster_NewFunc */
  708. /* FT_Raster_DoneFunc */
  709. /* FT_Raster_ResetFunc */
  710. /* FT_Raster_SetModeFunc */
  711. /* FT_Raster_RenderFunc */
  712. /* FT_Raster_Funcs */
  713. /* */
  714. /*************************************************************************/
  715. /*************************************************************************/
  716. /* */
  717. /* <Type> */
  718. /* FT_Raster */
  719. /* */
  720. /* <Description> */
  721. /* An opaque handle (pointer) to a raster object. Each object can be */
  722. /* used independently to convert an outline into a bitmap or pixmap. */
  723. /* */
  724. typedef struct FT_RasterRec_* FT_Raster;
  725. /*************************************************************************/
  726. /* */
  727. /* <Struct> */
  728. /* FT_Span */
  729. /* */
  730. /* <Description> */
  731. /* A structure used to model a single span of gray pixels when */
  732. /* rendering an anti-aliased bitmap. */
  733. /* */
  734. /* <Fields> */
  735. /* x :: The span's horizontal start position. */
  736. /* */
  737. /* len :: The span's length in pixels. */
  738. /* */
  739. /* coverage :: The span color/coverage, ranging from 0 (background) */
  740. /* to 255 (foreground). */
  741. /* */
  742. /* <Note> */
  743. /* This structure is used by the span drawing callback type named */
  744. /* @FT_SpanFunc that takes the y~coordinate of the span as a */
  745. /* parameter. */
  746. /* */
  747. /* The coverage value is always between 0 and 255. If you want less */
  748. /* gray values, the callback function has to reduce them. */
  749. /* */
  750. typedef struct FT_Span_
  751. {
  752. short x;
  753. unsigned short len;
  754. unsigned char coverage;
  755. } FT_Span;
  756. /*************************************************************************/
  757. /* */
  758. /* <FuncType> */
  759. /* FT_SpanFunc */
  760. /* */
  761. /* <Description> */
  762. /* A function used as a call-back by the anti-aliased renderer in */
  763. /* order to let client applications draw themselves the gray pixel */
  764. /* spans on each scan line. */
  765. /* */
  766. /* <Input> */
  767. /* y :: The scanline's y~coordinate. */
  768. /* */
  769. /* count :: The number of spans to draw on this scanline. */
  770. /* */
  771. /* spans :: A table of `count' spans to draw on the scanline. */
  772. /* */
  773. /* user :: User-supplied data that is passed to the callback. */
  774. /* */
  775. /* <Note> */
  776. /* This callback allows client applications to directly render the */
  777. /* gray spans of the anti-aliased bitmap to any kind of surfaces. */
  778. /* */
  779. /* This can be used to write anti-aliased outlines directly to a */
  780. /* given background bitmap, and even perform translucency. */
  781. /* */
  782. /* Note that the `count' field cannot be greater than a fixed value */
  783. /* defined by the `FT_MAX_GRAY_SPANS' configuration macro in */
  784. /* `ftoption.h'. By default, this value is set to~32, which means */
  785. /* that if there are more than 32~spans on a given scanline, the */
  786. /* callback is called several times with the same `y' parameter in */
  787. /* order to draw all callbacks. */
  788. /* */
  789. /* Otherwise, the callback is only called once per scan-line, and */
  790. /* only for those scanlines that do have `gray' pixels on them. */
  791. /* */
  792. typedef void
  793. (*FT_SpanFunc)( int y,
  794. int count,
  795. const FT_Span* spans,
  796. void* user );
  797. #define FT_Raster_Span_Func FT_SpanFunc
  798. /*************************************************************************/
  799. /* */
  800. /* <FuncType> */
  801. /* FT_Raster_BitTest_Func */
  802. /* */
  803. /* <Description> */
  804. /* Deprecated, unimplemented. */
  805. /* */
  806. typedef int
  807. (*FT_Raster_BitTest_Func)( int y,
  808. int x,
  809. void* user );
  810. /*************************************************************************/
  811. /* */
  812. /* <FuncType> */
  813. /* FT_Raster_BitSet_Func */
  814. /* */
  815. /* <Description> */
  816. /* Deprecated, unimplemented. */
  817. /* */
  818. typedef void
  819. (*FT_Raster_BitSet_Func)( int y,
  820. int x,
  821. void* user );
  822. /*************************************************************************/
  823. /* */
  824. /* <Enum> */
  825. /* FT_RASTER_FLAG_XXX */
  826. /* */
  827. /* <Description> */
  828. /* A list of bit flag constants as used in the `flags' field of a */
  829. /* @FT_Raster_Params structure. */
  830. /* */
  831. /* <Values> */
  832. /* FT_RASTER_FLAG_DEFAULT :: This value is 0. */
  833. /* */
  834. /* FT_RASTER_FLAG_AA :: This flag is set to indicate that an */
  835. /* anti-aliased glyph image should be */
  836. /* generated. Otherwise, it will be */
  837. /* monochrome (1-bit). */
  838. /* */
  839. /* FT_RASTER_FLAG_DIRECT :: This flag is set to indicate direct */
  840. /* rendering. In this mode, client */
  841. /* applications must provide their own span */
  842. /* callback. This lets them directly */
  843. /* draw or compose over an existing bitmap. */
  844. /* If this bit is not set, the target */
  845. /* pixmap's buffer _must_ be zeroed before */
  846. /* rendering. */
  847. /* */
  848. /* Direct rendering is only possible with */
  849. /* anti-aliased glyphs. */
  850. /* */
  851. /* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */
  852. /* rendering mode. If set, the output will */
  853. /* be clipped to a box specified in the */
  854. /* `clip_box' field of the */
  855. /* @FT_Raster_Params structure. */
  856. /* */
  857. /* Note that by default, the glyph bitmap */
  858. /* is clipped to the target pixmap, except */
  859. /* in direct rendering mode where all spans */
  860. /* are generated if no clipping box is set. */
  861. /* */
  862. #define FT_RASTER_FLAG_DEFAULT 0x0
  863. #define FT_RASTER_FLAG_AA 0x1
  864. #define FT_RASTER_FLAG_DIRECT 0x2
  865. #define FT_RASTER_FLAG_CLIP 0x4
  866. /* these constants are deprecated; use the corresponding */
  867. /* `FT_RASTER_FLAG_XXX' values instead */
  868. #define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT
  869. #define ft_raster_flag_aa FT_RASTER_FLAG_AA
  870. #define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT
  871. #define ft_raster_flag_clip FT_RASTER_FLAG_CLIP
  872. /*************************************************************************/
  873. /* */
  874. /* <Struct> */
  875. /* FT_Raster_Params */
  876. /* */
  877. /* <Description> */
  878. /* A structure to hold the arguments used by a raster's render */
  879. /* function. */
  880. /* */
  881. /* <Fields> */
  882. /* target :: The target bitmap. */
  883. /* */
  884. /* source :: A pointer to the source glyph image (e.g., an */
  885. /* @FT_Outline). */
  886. /* */
  887. /* flags :: The rendering flags. */
  888. /* */
  889. /* gray_spans :: The gray span drawing callback. */
  890. /* */
  891. /* black_spans :: Unused. */
  892. /* */
  893. /* bit_test :: Unused. */
  894. /* */
  895. /* bit_set :: Unused. */
  896. /* */
  897. /* user :: User-supplied data that is passed to each drawing */
  898. /* callback. */
  899. /* */
  900. /* clip_box :: An optional clipping box. It is only used in */
  901. /* direct rendering mode. Note that coordinates here */
  902. /* should be expressed in _integer_ pixels (and not in */
  903. /* 26.6 fixed-point units). */
  904. /* */
  905. /* <Note> */
  906. /* An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA */
  907. /* bit flag is set in the `flags' field, otherwise a monochrome */
  908. /* bitmap is generated. */
  909. /* */
  910. /* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */
  911. /* raster will call the `gray_spans' callback to draw gray pixel */
  912. /* spans. This allows direct composition over a pre-existing bitmap */
  913. /* through user-provided callbacks to perform the span drawing and */
  914. /* composition. Not supported by the monochrome rasterizer. */
  915. /* */
  916. typedef struct FT_Raster_Params_
  917. {
  918. const FT_Bitmap* target;
  919. const void* source;
  920. int flags;
  921. FT_SpanFunc gray_spans;
  922. FT_SpanFunc black_spans; /* unused */
  923. FT_Raster_BitTest_Func bit_test; /* unused */
  924. FT_Raster_BitSet_Func bit_set; /* unused */
  925. void* user;
  926. FT_BBox clip_box;
  927. } FT_Raster_Params;
  928. /*************************************************************************/
  929. /* */
  930. /* <FuncType> */
  931. /* FT_Raster_NewFunc */
  932. /* */
  933. /* <Description> */
  934. /* A function used to create a new raster object. */
  935. /* */
  936. /* <Input> */
  937. /* memory :: A handle to the memory allocator. */
  938. /* */
  939. /* <Output> */
  940. /* raster :: A handle to the new raster object. */
  941. /* */
  942. /* <Return> */
  943. /* Error code. 0~means success. */
  944. /* */
  945. /* <Note> */
  946. /* The `memory' parameter is a typeless pointer in order to avoid */
  947. /* un-wanted dependencies on the rest of the FreeType code. In */
  948. /* practice, it is an @FT_Memory object, i.e., a handle to the */
  949. /* standard FreeType memory allocator. However, this field can be */
  950. /* completely ignored by a given raster implementation. */
  951. /* */
  952. typedef int
  953. (*FT_Raster_NewFunc)( void* memory,
  954. FT_Raster* raster );
  955. #define FT_Raster_New_Func FT_Raster_NewFunc
  956. /*************************************************************************/
  957. /* */
  958. /* <FuncType> */
  959. /* FT_Raster_DoneFunc */
  960. /* */
  961. /* <Description> */
  962. /* A function used to destroy a given raster object. */
  963. /* */
  964. /* <Input> */
  965. /* raster :: A handle to the raster object. */
  966. /* */
  967. typedef void
  968. (*FT_Raster_DoneFunc)( FT_Raster raster );
  969. #define FT_Raster_Done_Func FT_Raster_DoneFunc
  970. /*************************************************************************/
  971. /* */
  972. /* <FuncType> */
  973. /* FT_Raster_ResetFunc */
  974. /* */
  975. /* <Description> */
  976. /* FreeType provides an area of memory called the `render pool', */
  977. /* available to all registered rasters. This pool can be freely used */
  978. /* during a given scan-conversion but is shared by all rasters. Its */
  979. /* content is thus transient. */
  980. /* */
  981. /* This function is called each time the render pool changes, or just */
  982. /* after a new raster object is created. */
  983. /* */
  984. /* <Input> */
  985. /* raster :: A handle to the new raster object. */
  986. /* */
  987. /* pool_base :: The address in memory of the render pool. */
  988. /* */
  989. /* pool_size :: The size in bytes of the render pool. */
  990. /* */
  991. /* <Note> */
  992. /* Rasters can ignore the render pool and rely on dynamic memory */
  993. /* allocation if they want to (a handle to the memory allocator is */
  994. /* passed to the raster constructor). However, this is not */
  995. /* recommended for efficiency purposes. */
  996. /* */
  997. typedef void
  998. (*FT_Raster_ResetFunc)( FT_Raster raster,
  999. unsigned char* pool_base,
  1000. unsigned long pool_size );
  1001. #define FT_Raster_Reset_Func FT_Raster_ResetFunc
  1002. /*************************************************************************/
  1003. /* */
  1004. /* <FuncType> */
  1005. /* FT_Raster_SetModeFunc */
  1006. /* */
  1007. /* <Description> */
  1008. /* This function is a generic facility to change modes or attributes */
  1009. /* in a given raster. This can be used for debugging purposes, or */
  1010. /* simply to allow implementation-specific `features' in a given */
  1011. /* raster module. */
  1012. /* */
  1013. /* <Input> */
  1014. /* raster :: A handle to the new raster object. */
  1015. /* */
  1016. /* mode :: A 4-byte tag used to name the mode or property. */
  1017. /* */
  1018. /* args :: A pointer to the new mode/property to use. */
  1019. /* */
  1020. typedef int
  1021. (*FT_Raster_SetModeFunc)( FT_Raster raster,
  1022. unsigned long mode,
  1023. void* args );
  1024. #define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc
  1025. /*************************************************************************/
  1026. /* */
  1027. /* <FuncType> */
  1028. /* FT_Raster_RenderFunc */
  1029. /* */
  1030. /* <Description> */
  1031. /* Invoke a given raster to scan-convert a given glyph image into a */
  1032. /* target bitmap. */
  1033. /* */
  1034. /* <Input> */
  1035. /* raster :: A handle to the raster object. */
  1036. /* */
  1037. /* params :: A pointer to an @FT_Raster_Params structure used to */
  1038. /* store the rendering parameters. */
  1039. /* */
  1040. /* <Return> */
  1041. /* Error code. 0~means success. */
  1042. /* */
  1043. /* <Note> */
  1044. /* The exact format of the source image depends on the raster's glyph */
  1045. /* format defined in its @FT_Raster_Funcs structure. It can be an */
  1046. /* @FT_Outline or anything else in order to support a large array of */
  1047. /* glyph formats. */
  1048. /* */
  1049. /* Note also that the render function can fail and return a */
  1050. /* `FT_Err_Unimplemented_Feature' error code if the raster used does */
  1051. /* not support direct composition. */
  1052. /* */
  1053. /* XXX: For now, the standard raster doesn't support direct */
  1054. /* composition but this should change for the final release (see */
  1055. /* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */
  1056. /* for examples of distinct implementations that support direct */
  1057. /* composition). */
  1058. /* */
  1059. typedef int
  1060. (*FT_Raster_RenderFunc)( FT_Raster raster,
  1061. const FT_Raster_Params* params );
  1062. #define FT_Raster_Render_Func FT_Raster_RenderFunc
  1063. /*************************************************************************/
  1064. /* */
  1065. /* <Struct> */
  1066. /* FT_Raster_Funcs */
  1067. /* */
  1068. /* <Description> */
  1069. /* A structure used to describe a given raster class to the library. */
  1070. /* */
  1071. /* <Fields> */
  1072. /* glyph_format :: The supported glyph format for this raster. */
  1073. /* */
  1074. /* raster_new :: The raster constructor. */
  1075. /* */
  1076. /* raster_reset :: Used to reset the render pool within the raster. */
  1077. /* */
  1078. /* raster_render :: A function to render a glyph into a given bitmap. */
  1079. /* */
  1080. /* raster_done :: The raster destructor. */
  1081. /* */
  1082. typedef struct FT_Raster_Funcs_
  1083. {
  1084. FT_Glyph_Format glyph_format;
  1085. FT_Raster_NewFunc raster_new;
  1086. FT_Raster_ResetFunc raster_reset;
  1087. FT_Raster_SetModeFunc raster_set_mode;
  1088. FT_Raster_RenderFunc raster_render;
  1089. FT_Raster_DoneFunc raster_done;
  1090. } FT_Raster_Funcs;
  1091. /* */
  1092. FT_END_HEADER
  1093. #endif /* __FTIMAGE_H__ */
  1094. /* END */
  1095. /* Local Variables: */
  1096. /* coding: utf-8 */
  1097. /* End: */