ftimage.h 75 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214
  1. /***************************************************************************/
  2. /* */
  3. /* ftimage.h */
  4. /* */
  5. /* FreeType glyph image formats and default raster interface */
  6. /* (specification). */
  7. /* */
  8. /* Copyright 1996-2015 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. typedef struct FT_Bitmap_
  237. {
  238. unsigned int rows;
  239. unsigned int width;
  240. int pitch;
  241. unsigned char* buffer;
  242. unsigned short num_grays;
  243. unsigned char pixel_mode;
  244. unsigned char palette_mode;
  245. void* palette;
  246. } FT_Bitmap;
  247. /*************************************************************************/
  248. /* */
  249. /* <Section> */
  250. /* outline_processing */
  251. /* */
  252. /*************************************************************************/
  253. /*************************************************************************/
  254. /* */
  255. /* <Struct> */
  256. /* FT_Outline */
  257. /* */
  258. /* <Description> */
  259. /* This structure is used to describe an outline to the scan-line */
  260. /* converter. */
  261. /* */
  262. /* <Fields> */
  263. /* n_contours :: The number of contours in the outline. */
  264. /* */
  265. /* n_points :: The number of points in the outline. */
  266. /* */
  267. /* points :: A pointer to an array of `n_points' @FT_Vector */
  268. /* elements, giving the outline's point coordinates. */
  269. /* */
  270. /* tags :: A pointer to an array of `n_points' chars, giving */
  271. /* each outline point's type. */
  272. /* */
  273. /* If bit~0 is unset, the point is `off' the curve, */
  274. /* i.e., a Bézier control point, while it is `on' if */
  275. /* set. */
  276. /* */
  277. /* Bit~1 is meaningful for `off' points only. If set, */
  278. /* it indicates a third-order Bézier arc control point; */
  279. /* and a second-order control point if unset. */
  280. /* */
  281. /* If bit~2 is set, bits 5-7 contain the drop-out mode */
  282. /* (as defined in the OpenType specification; the value */
  283. /* is the same as the argument to the SCANMODE */
  284. /* instruction). */
  285. /* */
  286. /* Bits 3 and~4 are reserved for internal purposes. */
  287. /* */
  288. /* contours :: An array of `n_contours' shorts, giving the end */
  289. /* point of each contour within the outline. For */
  290. /* example, the first contour is defined by the points */
  291. /* `0' to `contours[0]', the second one is defined by */
  292. /* the points `contours[0]+1' to `contours[1]', etc. */
  293. /* */
  294. /* flags :: A set of bit flags used to characterize the outline */
  295. /* and give hints to the scan-converter and hinter on */
  296. /* how to convert/grid-fit it. See @FT_OUTLINE_XXX. */
  297. /* */
  298. /* <Note> */
  299. /* The B/W rasterizer only checks bit~2 in the `tags' array for the */
  300. /* first point of each contour. The drop-out mode as given with */
  301. /* @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and */
  302. /* @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden. */
  303. /* */
  304. typedef struct FT_Outline_
  305. {
  306. short n_contours; /* number of contours in glyph */
  307. short n_points; /* number of points in the glyph */
  308. FT_Vector* points; /* the outline's points */
  309. char* tags; /* the points flags */
  310. short* contours; /* the contour end points */
  311. int flags; /* outline masks */
  312. } FT_Outline;
  313. /* */
  314. /* Following limits must be consistent with */
  315. /* FT_Outline.{n_contours,n_points} */
  316. #define FT_OUTLINE_CONTOURS_MAX SHRT_MAX
  317. #define FT_OUTLINE_POINTS_MAX SHRT_MAX
  318. /*************************************************************************/
  319. /* */
  320. /* <Enum> */
  321. /* FT_OUTLINE_XXX */
  322. /* */
  323. /* <Description> */
  324. /* A list of bit-field constants use for the flags in an outline's */
  325. /* `flags' field. */
  326. /* */
  327. /* <Values> */
  328. /* FT_OUTLINE_NONE :: */
  329. /* Value~0 is reserved. */
  330. /* */
  331. /* FT_OUTLINE_OWNER :: */
  332. /* If set, this flag indicates that the outline's field arrays */
  333. /* (i.e., `points', `flags', and `contours') are `owned' by the */
  334. /* outline object, and should thus be freed when it is destroyed. */
  335. /* */
  336. /* FT_OUTLINE_EVEN_ODD_FILL :: */
  337. /* By default, outlines are filled using the non-zero winding rule. */
  338. /* If set to 1, the outline will be filled using the even-odd fill */
  339. /* rule (only works with the smooth rasterizer). */
  340. /* */
  341. /* FT_OUTLINE_REVERSE_FILL :: */
  342. /* By default, outside contours of an outline are oriented in */
  343. /* clock-wise direction, as defined in the TrueType specification. */
  344. /* This flag is set if the outline uses the opposite direction */
  345. /* (typically for Type~1 fonts). This flag is ignored by the scan */
  346. /* converter. */
  347. /* */
  348. /* FT_OUTLINE_IGNORE_DROPOUTS :: */
  349. /* By default, the scan converter will try to detect drop-outs in */
  350. /* an outline and correct the glyph bitmap to ensure consistent */
  351. /* shape continuity. If set, this flag hints the scan-line */
  352. /* converter to ignore such cases. See below for more information. */
  353. /* */
  354. /* FT_OUTLINE_SMART_DROPOUTS :: */
  355. /* Select smart dropout control. If unset, use simple dropout */
  356. /* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See */
  357. /* below for more information. */
  358. /* */
  359. /* FT_OUTLINE_INCLUDE_STUBS :: */
  360. /* If set, turn pixels on for `stubs', otherwise exclude them. */
  361. /* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for */
  362. /* more information. */
  363. /* */
  364. /* FT_OUTLINE_HIGH_PRECISION :: */
  365. /* This flag indicates that the scan-line converter should try to */
  366. /* convert this outline to bitmaps with the highest possible */
  367. /* quality. It is typically set for small character sizes. Note */
  368. /* that this is only a hint that might be completely ignored by a */
  369. /* given scan-converter. */
  370. /* */
  371. /* FT_OUTLINE_SINGLE_PASS :: */
  372. /* This flag is set to force a given scan-converter to only use a */
  373. /* single pass over the outline to render a bitmap glyph image. */
  374. /* Normally, it is set for very large character sizes. It is only */
  375. /* a hint that might be completely ignored by a given */
  376. /* scan-converter. */
  377. /* */
  378. /* <Note> */
  379. /* The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */
  380. /* and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth */
  381. /* rasterizer. */
  382. /* */
  383. /* There exists a second mechanism to pass the drop-out mode to the */
  384. /* B/W rasterizer; see the `tags' field in @FT_Outline. */
  385. /* */
  386. /* Please refer to the description of the `SCANTYPE' instruction in */
  387. /* the OpenType specification (in file `ttinst1.doc') how simple */
  388. /* drop-outs, smart drop-outs, and stubs are defined. */
  389. /* */
  390. #define FT_OUTLINE_NONE 0x0
  391. #define FT_OUTLINE_OWNER 0x1
  392. #define FT_OUTLINE_EVEN_ODD_FILL 0x2
  393. #define FT_OUTLINE_REVERSE_FILL 0x4
  394. #define FT_OUTLINE_IGNORE_DROPOUTS 0x8
  395. #define FT_OUTLINE_SMART_DROPOUTS 0x10
  396. #define FT_OUTLINE_INCLUDE_STUBS 0x20
  397. #define FT_OUTLINE_HIGH_PRECISION 0x100
  398. #define FT_OUTLINE_SINGLE_PASS 0x200
  399. /* these constants are deprecated; use the corresponding */
  400. /* `FT_OUTLINE_XXX' values instead */
  401. #define ft_outline_none FT_OUTLINE_NONE
  402. #define ft_outline_owner FT_OUTLINE_OWNER
  403. #define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL
  404. #define ft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL
  405. #define ft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS
  406. #define ft_outline_high_precision FT_OUTLINE_HIGH_PRECISION
  407. #define ft_outline_single_pass FT_OUTLINE_SINGLE_PASS
  408. /* */
  409. #define FT_CURVE_TAG( flag ) ( flag & 3 )
  410. #define FT_CURVE_TAG_ON 1
  411. #define FT_CURVE_TAG_CONIC 0
  412. #define FT_CURVE_TAG_CUBIC 2
  413. #define FT_CURVE_TAG_HAS_SCANMODE 4
  414. #define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */
  415. #define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */
  416. #define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \
  417. FT_CURVE_TAG_TOUCH_Y )
  418. #define FT_Curve_Tag_On FT_CURVE_TAG_ON
  419. #define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC
  420. #define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC
  421. #define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X
  422. #define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y
  423. /*************************************************************************/
  424. /* */
  425. /* <FuncType> */
  426. /* FT_Outline_MoveToFunc */
  427. /* */
  428. /* <Description> */
  429. /* A function pointer type used to describe the signature of a `move */
  430. /* to' function during outline walking/decomposition. */
  431. /* */
  432. /* A `move to' is emitted to start a new contour in an outline. */
  433. /* */
  434. /* <Input> */
  435. /* to :: A pointer to the target point of the `move to'. */
  436. /* */
  437. /* user :: A typeless pointer, which is passed from the caller of the */
  438. /* decomposition function. */
  439. /* */
  440. /* <Return> */
  441. /* Error code. 0~means success. */
  442. /* */
  443. typedef int
  444. (*FT_Outline_MoveToFunc)( const FT_Vector* to,
  445. void* user );
  446. #define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc
  447. /*************************************************************************/
  448. /* */
  449. /* <FuncType> */
  450. /* FT_Outline_LineToFunc */
  451. /* */
  452. /* <Description> */
  453. /* A function pointer type used to describe the signature of a `line */
  454. /* to' function during outline walking/decomposition. */
  455. /* */
  456. /* A `line to' is emitted to indicate a segment in the outline. */
  457. /* */
  458. /* <Input> */
  459. /* to :: A pointer to the target point of the `line to'. */
  460. /* */
  461. /* user :: A typeless pointer, which is passed from the caller of the */
  462. /* decomposition function. */
  463. /* */
  464. /* <Return> */
  465. /* Error code. 0~means success. */
  466. /* */
  467. typedef int
  468. (*FT_Outline_LineToFunc)( const FT_Vector* to,
  469. void* user );
  470. #define FT_Outline_LineTo_Func FT_Outline_LineToFunc
  471. /*************************************************************************/
  472. /* */
  473. /* <FuncType> */
  474. /* FT_Outline_ConicToFunc */
  475. /* */
  476. /* <Description> */
  477. /* A function pointer type used to describe the signature of a `conic */
  478. /* to' function during outline walking or decomposition. */
  479. /* */
  480. /* A `conic to' is emitted to indicate a second-order Bézier arc in */
  481. /* the outline. */
  482. /* */
  483. /* <Input> */
  484. /* control :: An intermediate control point between the last position */
  485. /* and the new target in `to'. */
  486. /* */
  487. /* to :: A pointer to the target end point of the conic arc. */
  488. /* */
  489. /* user :: A typeless pointer, which is passed from the caller of */
  490. /* the decomposition function. */
  491. /* */
  492. /* <Return> */
  493. /* Error code. 0~means success. */
  494. /* */
  495. typedef int
  496. (*FT_Outline_ConicToFunc)( const FT_Vector* control,
  497. const FT_Vector* to,
  498. void* user );
  499. #define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc
  500. /*************************************************************************/
  501. /* */
  502. /* <FuncType> */
  503. /* FT_Outline_CubicToFunc */
  504. /* */
  505. /* <Description> */
  506. /* A function pointer type used to describe the signature of a `cubic */
  507. /* to' function during outline walking or decomposition. */
  508. /* */
  509. /* A `cubic to' is emitted to indicate a third-order Bézier arc. */
  510. /* */
  511. /* <Input> */
  512. /* control1 :: A pointer to the first Bézier control point. */
  513. /* */
  514. /* control2 :: A pointer to the second Bézier control point. */
  515. /* */
  516. /* to :: A pointer to the target end point. */
  517. /* */
  518. /* user :: A typeless pointer, which is passed from the caller of */
  519. /* the decomposition function. */
  520. /* */
  521. /* <Return> */
  522. /* Error code. 0~means success. */
  523. /* */
  524. typedef int
  525. (*FT_Outline_CubicToFunc)( const FT_Vector* control1,
  526. const FT_Vector* control2,
  527. const FT_Vector* to,
  528. void* user );
  529. #define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc
  530. /*************************************************************************/
  531. /* */
  532. /* <Struct> */
  533. /* FT_Outline_Funcs */
  534. /* */
  535. /* <Description> */
  536. /* A structure to hold various function pointers used during outline */
  537. /* decomposition in order to emit segments, conic, and cubic Béziers. */
  538. /* */
  539. /* <Fields> */
  540. /* move_to :: The `move to' emitter. */
  541. /* */
  542. /* line_to :: The segment emitter. */
  543. /* */
  544. /* conic_to :: The second-order Bézier arc emitter. */
  545. /* */
  546. /* cubic_to :: The third-order Bézier arc emitter. */
  547. /* */
  548. /* shift :: The shift that is applied to coordinates before they */
  549. /* are sent to the emitter. */
  550. /* */
  551. /* delta :: The delta that is applied to coordinates before they */
  552. /* are sent to the emitter, but after the shift. */
  553. /* */
  554. /* <Note> */
  555. /* The point coordinates sent to the emitters are the transformed */
  556. /* version of the original coordinates (this is important for high */
  557. /* accuracy during scan-conversion). The transformation is simple: */
  558. /* */
  559. /* { */
  560. /* x' = (x << shift) - delta */
  561. /* y' = (x << shift) - delta */
  562. /* } */
  563. /* */
  564. /* Set the values of `shift' and `delta' to~0 to get the original */
  565. /* point coordinates. */
  566. /* */
  567. typedef struct FT_Outline_Funcs_
  568. {
  569. FT_Outline_MoveToFunc move_to;
  570. FT_Outline_LineToFunc line_to;
  571. FT_Outline_ConicToFunc conic_to;
  572. FT_Outline_CubicToFunc cubic_to;
  573. int shift;
  574. FT_Pos delta;
  575. } FT_Outline_Funcs;
  576. /*************************************************************************/
  577. /* */
  578. /* <Section> */
  579. /* basic_types */
  580. /* */
  581. /*************************************************************************/
  582. /*************************************************************************/
  583. /* */
  584. /* <Macro> */
  585. /* FT_IMAGE_TAG */
  586. /* */
  587. /* <Description> */
  588. /* This macro converts four-letter tags to an unsigned long type. */
  589. /* */
  590. /* <Note> */
  591. /* Since many 16-bit compilers don't like 32-bit enumerations, you */
  592. /* should redefine this macro in case of problems to something like */
  593. /* this: */
  594. /* */
  595. /* { */
  596. /* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */
  597. /* } */
  598. /* */
  599. /* to get a simple enumeration without assigning special numbers. */
  600. /* */
  601. #ifndef FT_IMAGE_TAG
  602. #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) \
  603. value = ( ( (unsigned long)_x1 << 24 ) | \
  604. ( (unsigned long)_x2 << 16 ) | \
  605. ( (unsigned long)_x3 << 8 ) | \
  606. (unsigned long)_x4 )
  607. #endif /* FT_IMAGE_TAG */
  608. /*************************************************************************/
  609. /* */
  610. /* <Enum> */
  611. /* FT_Glyph_Format */
  612. /* */
  613. /* <Description> */
  614. /* An enumeration type used to describe the format of a given glyph */
  615. /* image. Note that this version of FreeType only supports two image */
  616. /* formats, even though future font drivers will be able to register */
  617. /* their own format. */
  618. /* */
  619. /* <Values> */
  620. /* FT_GLYPH_FORMAT_NONE :: */
  621. /* The value~0 is reserved. */
  622. /* */
  623. /* FT_GLYPH_FORMAT_COMPOSITE :: */
  624. /* The glyph image is a composite of several other images. This */
  625. /* format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to */
  626. /* report compound glyphs (like accented characters). */
  627. /* */
  628. /* FT_GLYPH_FORMAT_BITMAP :: */
  629. /* The glyph image is a bitmap, and can be described as an */
  630. /* @FT_Bitmap. You generally need to access the `bitmap' field of */
  631. /* the @FT_GlyphSlotRec structure to read it. */
  632. /* */
  633. /* FT_GLYPH_FORMAT_OUTLINE :: */
  634. /* The glyph image is a vectorial outline made of line segments */
  635. /* and Bézier arcs; it can be described as an @FT_Outline; you */
  636. /* generally want to access the `outline' field of the */
  637. /* @FT_GlyphSlotRec structure to read it. */
  638. /* */
  639. /* FT_GLYPH_FORMAT_PLOTTER :: */
  640. /* The glyph image is a vectorial path with no inside and outside */
  641. /* contours. Some Type~1 fonts, like those in the Hershey family, */
  642. /* contain glyphs in this format. These are described as */
  643. /* @FT_Outline, but FreeType isn't currently capable of rendering */
  644. /* them correctly. */
  645. /* */
  646. typedef enum FT_Glyph_Format_
  647. {
  648. FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),
  649. FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),
  650. FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP, 'b', 'i', 't', 's' ),
  651. FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE, 'o', 'u', 't', 'l' ),
  652. FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' )
  653. } FT_Glyph_Format;
  654. /* these constants are deprecated; use the corresponding */
  655. /* `FT_Glyph_Format' values instead. */
  656. #define ft_glyph_format_none FT_GLYPH_FORMAT_NONE
  657. #define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE
  658. #define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP
  659. #define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE
  660. #define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER
  661. /*************************************************************************/
  662. /*************************************************************************/
  663. /*************************************************************************/
  664. /***** *****/
  665. /***** R A S T E R D E F I N I T I O N S *****/
  666. /***** *****/
  667. /*************************************************************************/
  668. /*************************************************************************/
  669. /*************************************************************************/
  670. /*************************************************************************/
  671. /* */
  672. /* A raster is a scan converter, in charge of rendering an outline into */
  673. /* a a bitmap. This section contains the public API for rasters. */
  674. /* */
  675. /* Note that in FreeType 2, all rasters are now encapsulated within */
  676. /* specific modules called `renderers'. See `ftrender.h' for more */
  677. /* details on renderers. */
  678. /* */
  679. /*************************************************************************/
  680. /*************************************************************************/
  681. /* */
  682. /* <Section> */
  683. /* raster */
  684. /* */
  685. /* <Title> */
  686. /* Scanline Converter */
  687. /* */
  688. /* <Abstract> */
  689. /* How vectorial outlines are converted into bitmaps and pixmaps. */
  690. /* */
  691. /* <Description> */
  692. /* This section contains technical definitions. */
  693. /* */
  694. /* <Order> */
  695. /* FT_Raster */
  696. /* FT_Span */
  697. /* FT_SpanFunc */
  698. /* */
  699. /* FT_Raster_Params */
  700. /* FT_RASTER_FLAG_XXX */
  701. /* */
  702. /* FT_Raster_NewFunc */
  703. /* FT_Raster_DoneFunc */
  704. /* FT_Raster_ResetFunc */
  705. /* FT_Raster_SetModeFunc */
  706. /* FT_Raster_RenderFunc */
  707. /* FT_Raster_Funcs */
  708. /* */
  709. /*************************************************************************/
  710. /*************************************************************************/
  711. /* */
  712. /* <Type> */
  713. /* FT_Raster */
  714. /* */
  715. /* <Description> */
  716. /* An opaque handle (pointer) to a raster object. Each object can be */
  717. /* used independently to convert an outline into a bitmap or pixmap. */
  718. /* */
  719. typedef struct FT_RasterRec_* FT_Raster;
  720. /*************************************************************************/
  721. /* */
  722. /* <Struct> */
  723. /* FT_Span */
  724. /* */
  725. /* <Description> */
  726. /* A structure used to model a single span of gray pixels when */
  727. /* rendering an anti-aliased bitmap. */
  728. /* */
  729. /* <Fields> */
  730. /* x :: The span's horizontal start position. */
  731. /* */
  732. /* len :: The span's length in pixels. */
  733. /* */
  734. /* coverage :: The span color/coverage, ranging from 0 (background) */
  735. /* to 255 (foreground). */
  736. /* */
  737. /* <Note> */
  738. /* This structure is used by the span drawing callback type named */
  739. /* @FT_SpanFunc that takes the y~coordinate of the span as a */
  740. /* parameter. */
  741. /* */
  742. /* The coverage value is always between 0 and 255. If you want less */
  743. /* gray values, the callback function has to reduce them. */
  744. /* */
  745. typedef struct FT_Span_
  746. {
  747. short x;
  748. unsigned short len;
  749. unsigned char coverage;
  750. } FT_Span;
  751. /*************************************************************************/
  752. /* */
  753. /* <FuncType> */
  754. /* FT_SpanFunc */
  755. /* */
  756. /* <Description> */
  757. /* A function used as a call-back by the anti-aliased renderer in */
  758. /* order to let client applications draw themselves the gray pixel */
  759. /* spans on each scan line. */
  760. /* */
  761. /* <Input> */
  762. /* y :: The scanline's y~coordinate. */
  763. /* */
  764. /* count :: The number of spans to draw on this scanline. */
  765. /* */
  766. /* spans :: A table of `count' spans to draw on the scanline. */
  767. /* */
  768. /* user :: User-supplied data that is passed to the callback. */
  769. /* */
  770. /* <Note> */
  771. /* This callback allows client applications to directly render the */
  772. /* gray spans of the anti-aliased bitmap to any kind of surfaces. */
  773. /* */
  774. /* This can be used to write anti-aliased outlines directly to a */
  775. /* given background bitmap, and even perform translucency. */
  776. /* */
  777. /* Note that the `count' field cannot be greater than a fixed value */
  778. /* defined by the `FT_MAX_GRAY_SPANS' configuration macro in */
  779. /* `ftoption.h'. By default, this value is set to~32, which means */
  780. /* that if there are more than 32~spans on a given scanline, the */
  781. /* callback is called several times with the same `y' parameter in */
  782. /* order to draw all callbacks. */
  783. /* */
  784. /* Otherwise, the callback is only called once per scan-line, and */
  785. /* only for those scanlines that do have `gray' pixels on them. */
  786. /* */
  787. typedef void
  788. (*FT_SpanFunc)( int y,
  789. int count,
  790. const FT_Span* spans,
  791. void* user );
  792. #define FT_Raster_Span_Func FT_SpanFunc
  793. /*************************************************************************/
  794. /* */
  795. /* <FuncType> */
  796. /* FT_Raster_BitTest_Func */
  797. /* */
  798. /* <Description> */
  799. /* Deprecated, unimplemented. */
  800. /* */
  801. typedef int
  802. (*FT_Raster_BitTest_Func)( int y,
  803. int x,
  804. void* user );
  805. /*************************************************************************/
  806. /* */
  807. /* <FuncType> */
  808. /* FT_Raster_BitSet_Func */
  809. /* */
  810. /* <Description> */
  811. /* Deprecated, unimplemented. */
  812. /* */
  813. typedef void
  814. (*FT_Raster_BitSet_Func)( int y,
  815. int x,
  816. void* user );
  817. /*************************************************************************/
  818. /* */
  819. /* <Enum> */
  820. /* FT_RASTER_FLAG_XXX */
  821. /* */
  822. /* <Description> */
  823. /* A list of bit flag constants as used in the `flags' field of a */
  824. /* @FT_Raster_Params structure. */
  825. /* */
  826. /* <Values> */
  827. /* FT_RASTER_FLAG_DEFAULT :: This value is 0. */
  828. /* */
  829. /* FT_RASTER_FLAG_AA :: This flag is set to indicate that an */
  830. /* anti-aliased glyph image should be */
  831. /* generated. Otherwise, it will be */
  832. /* monochrome (1-bit). */
  833. /* */
  834. /* FT_RASTER_FLAG_DIRECT :: This flag is set to indicate direct */
  835. /* rendering. In this mode, client */
  836. /* applications must provide their own span */
  837. /* callback. This lets them directly */
  838. /* draw or compose over an existing bitmap. */
  839. /* If this bit is not set, the target */
  840. /* pixmap's buffer _must_ be zeroed before */
  841. /* rendering. */
  842. /* */
  843. /* Direct rendering is only possible with */
  844. /* anti-aliased glyphs. */
  845. /* */
  846. /* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */
  847. /* rendering mode. If set, the output will */
  848. /* be clipped to a box specified in the */
  849. /* `clip_box' field of the */
  850. /* @FT_Raster_Params structure. */
  851. /* */
  852. /* Note that by default, the glyph bitmap */
  853. /* is clipped to the target pixmap, except */
  854. /* in direct rendering mode where all spans */
  855. /* are generated if no clipping box is set. */
  856. /* */
  857. #define FT_RASTER_FLAG_DEFAULT 0x0
  858. #define FT_RASTER_FLAG_AA 0x1
  859. #define FT_RASTER_FLAG_DIRECT 0x2
  860. #define FT_RASTER_FLAG_CLIP 0x4
  861. /* these constants are deprecated; use the corresponding */
  862. /* `FT_RASTER_FLAG_XXX' values instead */
  863. #define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT
  864. #define ft_raster_flag_aa FT_RASTER_FLAG_AA
  865. #define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT
  866. #define ft_raster_flag_clip FT_RASTER_FLAG_CLIP
  867. /*************************************************************************/
  868. /* */
  869. /* <Struct> */
  870. /* FT_Raster_Params */
  871. /* */
  872. /* <Description> */
  873. /* A structure to hold the arguments used by a raster's render */
  874. /* function. */
  875. /* */
  876. /* <Fields> */
  877. /* target :: The target bitmap. */
  878. /* */
  879. /* source :: A pointer to the source glyph image (e.g., an */
  880. /* @FT_Outline). */
  881. /* */
  882. /* flags :: The rendering flags. */
  883. /* */
  884. /* gray_spans :: The gray span drawing callback. */
  885. /* */
  886. /* black_spans :: Unused. */
  887. /* */
  888. /* bit_test :: Unused. */
  889. /* */
  890. /* bit_set :: Unused. */
  891. /* */
  892. /* user :: User-supplied data that is passed to each drawing */
  893. /* callback. */
  894. /* */
  895. /* clip_box :: An optional clipping box. It is only used in */
  896. /* direct rendering mode. Note that coordinates here */
  897. /* should be expressed in _integer_ pixels (and not in */
  898. /* 26.6 fixed-point units). */
  899. /* */
  900. /* <Note> */
  901. /* An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA */
  902. /* bit flag is set in the `flags' field, otherwise a monochrome */
  903. /* bitmap is generated. */
  904. /* */
  905. /* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */
  906. /* raster will call the `gray_spans' callback to draw gray pixel */
  907. /* spans. This allows direct composition over a pre-existing bitmap */
  908. /* through user-provided callbacks to perform the span drawing and */
  909. /* composition. Not supported by the monochrome rasterizer. */
  910. /* */
  911. typedef struct FT_Raster_Params_
  912. {
  913. const FT_Bitmap* target;
  914. const void* source;
  915. int flags;
  916. FT_SpanFunc gray_spans;
  917. FT_SpanFunc black_spans; /* unused */
  918. FT_Raster_BitTest_Func bit_test; /* unused */
  919. FT_Raster_BitSet_Func bit_set; /* unused */
  920. void* user;
  921. FT_BBox clip_box;
  922. } FT_Raster_Params;
  923. /*************************************************************************/
  924. /* */
  925. /* <FuncType> */
  926. /* FT_Raster_NewFunc */
  927. /* */
  928. /* <Description> */
  929. /* A function used to create a new raster object. */
  930. /* */
  931. /* <Input> */
  932. /* memory :: A handle to the memory allocator. */
  933. /* */
  934. /* <Output> */
  935. /* raster :: A handle to the new raster object. */
  936. /* */
  937. /* <Return> */
  938. /* Error code. 0~means success. */
  939. /* */
  940. /* <Note> */
  941. /* The `memory' parameter is a typeless pointer in order to avoid */
  942. /* un-wanted dependencies on the rest of the FreeType code. In */
  943. /* practice, it is an @FT_Memory object, i.e., a handle to the */
  944. /* standard FreeType memory allocator. However, this field can be */
  945. /* completely ignored by a given raster implementation. */
  946. /* */
  947. typedef int
  948. (*FT_Raster_NewFunc)( void* memory,
  949. FT_Raster* raster );
  950. #define FT_Raster_New_Func FT_Raster_NewFunc
  951. /*************************************************************************/
  952. /* */
  953. /* <FuncType> */
  954. /* FT_Raster_DoneFunc */
  955. /* */
  956. /* <Description> */
  957. /* A function used to destroy a given raster object. */
  958. /* */
  959. /* <Input> */
  960. /* raster :: A handle to the raster object. */
  961. /* */
  962. typedef void
  963. (*FT_Raster_DoneFunc)( FT_Raster raster );
  964. #define FT_Raster_Done_Func FT_Raster_DoneFunc
  965. /*************************************************************************/
  966. /* */
  967. /* <FuncType> */
  968. /* FT_Raster_ResetFunc */
  969. /* */
  970. /* <Description> */
  971. /* FreeType used to provide an area of memory called the `render */
  972. /* pool' available to all registered rasters. This was not thread */
  973. /* safe however and now FreeType never allocates this pool. NULL */
  974. /* is always passed in as pool_base. */
  975. /* */
  976. /* This function is called each time the render pool changes, or just */
  977. /* after a new raster object is created. */
  978. /* */
  979. /* <Input> */
  980. /* raster :: A handle to the new raster object. */
  981. /* */
  982. /* pool_base :: The address in memory of the render pool. */
  983. /* */
  984. /* pool_size :: The size in bytes of the render pool. */
  985. /* */
  986. /* <Note> */
  987. /* Rasters should ignore the render pool and rely on dynamic or stack */
  988. /* allocation if they want to (a handle to the memory allocator is */
  989. /* passed to the raster constructor). */
  990. /* */
  991. typedef void
  992. (*FT_Raster_ResetFunc)( FT_Raster raster,
  993. unsigned char* pool_base,
  994. unsigned long pool_size );
  995. #define FT_Raster_Reset_Func FT_Raster_ResetFunc
  996. /*************************************************************************/
  997. /* */
  998. /* <FuncType> */
  999. /* FT_Raster_SetModeFunc */
  1000. /* */
  1001. /* <Description> */
  1002. /* This function is a generic facility to change modes or attributes */
  1003. /* in a given raster. This can be used for debugging purposes, or */
  1004. /* simply to allow implementation-specific `features' in a given */
  1005. /* raster module. */
  1006. /* */
  1007. /* <Input> */
  1008. /* raster :: A handle to the new raster object. */
  1009. /* */
  1010. /* mode :: A 4-byte tag used to name the mode or property. */
  1011. /* */
  1012. /* args :: A pointer to the new mode/property to use. */
  1013. /* */
  1014. typedef int
  1015. (*FT_Raster_SetModeFunc)( FT_Raster raster,
  1016. unsigned long mode,
  1017. void* args );
  1018. #define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc
  1019. /*************************************************************************/
  1020. /* */
  1021. /* <FuncType> */
  1022. /* FT_Raster_RenderFunc */
  1023. /* */
  1024. /* <Description> */
  1025. /* Invoke a given raster to scan-convert a given glyph image into a */
  1026. /* target bitmap. */
  1027. /* */
  1028. /* <Input> */
  1029. /* raster :: A handle to the raster object. */
  1030. /* */
  1031. /* params :: A pointer to an @FT_Raster_Params structure used to */
  1032. /* store the rendering parameters. */
  1033. /* */
  1034. /* <Return> */
  1035. /* Error code. 0~means success. */
  1036. /* */
  1037. /* <Note> */
  1038. /* The exact format of the source image depends on the raster's glyph */
  1039. /* format defined in its @FT_Raster_Funcs structure. It can be an */
  1040. /* @FT_Outline or anything else in order to support a large array of */
  1041. /* glyph formats. */
  1042. /* */
  1043. /* Note also that the render function can fail and return a */
  1044. /* `FT_Err_Unimplemented_Feature' error code if the raster used does */
  1045. /* not support direct composition. */
  1046. /* */
  1047. /* XXX: For now, the standard raster doesn't support direct */
  1048. /* composition but this should change for the final release (see */
  1049. /* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */
  1050. /* for examples of distinct implementations that support direct */
  1051. /* composition). */
  1052. /* */
  1053. typedef int
  1054. (*FT_Raster_RenderFunc)( FT_Raster raster,
  1055. const FT_Raster_Params* params );
  1056. #define FT_Raster_Render_Func FT_Raster_RenderFunc
  1057. /*************************************************************************/
  1058. /* */
  1059. /* <Struct> */
  1060. /* FT_Raster_Funcs */
  1061. /* */
  1062. /* <Description> */
  1063. /* A structure used to describe a given raster class to the library. */
  1064. /* */
  1065. /* <Fields> */
  1066. /* glyph_format :: The supported glyph format for this raster. */
  1067. /* */
  1068. /* raster_new :: The raster constructor. */
  1069. /* */
  1070. /* raster_reset :: Used to reset the render pool within the raster. */
  1071. /* */
  1072. /* raster_render :: A function to render a glyph into a given bitmap. */
  1073. /* */
  1074. /* raster_done :: The raster destructor. */
  1075. /* */
  1076. typedef struct FT_Raster_Funcs_
  1077. {
  1078. FT_Glyph_Format glyph_format;
  1079. FT_Raster_NewFunc raster_new;
  1080. FT_Raster_ResetFunc raster_reset;
  1081. FT_Raster_SetModeFunc raster_set_mode;
  1082. FT_Raster_RenderFunc raster_render;
  1083. FT_Raster_DoneFunc raster_done;
  1084. } FT_Raster_Funcs;
  1085. /* */
  1086. FT_END_HEADER
  1087. #endif /* __FTIMAGE_H__ */
  1088. /* END */
  1089. /* Local Variables: */
  1090. /* coding: utf-8 */
  1091. /* End: */