ReactOS  r76032
ftsmooth.c
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* ftsmooth.c */
4 /* */
5 /* Anti-aliasing renderer interface (body). */
6 /* */
7 /* Copyright 2000-2017 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9 /* */
10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
15 /* */
16 /***************************************************************************/
17 
18 
19 #include <ft2build.h>
20 #include FT_INTERNAL_DEBUG_H
21 #include FT_INTERNAL_OBJECTS_H
22 #include FT_OUTLINE_H
23 #include "ftsmooth.h"
24 #include "ftgrays.h"
25 #include "ftspic.h"
26 
27 #include "ftsmerrs.h"
28 
29 
30  /* initialize renderer -- init its raster */
31  static FT_Error
33  {
34  render->clazz->raster_class->raster_reset( render->raster, NULL, 0 );
35 
36  return 0;
37  }
38 
39 
40  /* sets render-specific mode */
41  static FT_Error
43  FT_ULong mode_tag,
45  {
46  /* we simply pass it to the raster */
47  return render->clazz->raster_class->raster_set_mode( render->raster,
48  mode_tag,
49  data );
50  }
51 
52  /* transform a given glyph image */
53  static FT_Error
56  const FT_Matrix* matrix,
57  const FT_Vector* delta )
58  {
60 
61 
62  if ( slot->format != render->glyph_format )
63  {
64  error = FT_THROW( Invalid_Argument );
65  goto Exit;
66  }
67 
68  if ( matrix )
69  FT_Outline_Transform( &slot->outline, matrix );
70 
71  if ( delta )
72  FT_Outline_Translate( &slot->outline, delta->x, delta->y );
73 
74  Exit:
75  return error;
76  }
77 
78 
79  /* return the glyph's control box */
80  static void
83  FT_BBox* cbox )
84  {
85  FT_ZERO( cbox );
86 
87  if ( slot->format == render->glyph_format )
88  FT_Outline_Get_CBox( &slot->outline, cbox );
89  }
90 
91 
92  /* convert a slot's glyph image into a bitmap */
93  static FT_Error
97  const FT_Vector* origin,
98  FT_Render_Mode required_mode )
99  {
100  FT_Error error;
101  FT_Outline* outline = &slot->outline;
102  FT_Bitmap* bitmap = &slot->bitmap;
103  FT_Memory memory = render->root.memory;
104  FT_BBox cbox;
105  FT_Pos x_shift = 0;
106  FT_Pos y_shift = 0;
107  FT_Pos x_left, y_top;
108  FT_Pos width, height, pitch;
109  FT_Int hmul = ( mode == FT_RENDER_MODE_LCD );
110  FT_Int vmul = ( mode == FT_RENDER_MODE_LCD_V );
111 
113 
114  FT_Bool have_outline_shifted = FALSE;
115  FT_Bool have_buffer = FALSE;
116 
117 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
118 
119  FT_LcdFiveTapFilter lcd_weights = { 0 };
120  FT_Bool have_custom_weight = FALSE;
121  FT_Bitmap_LcdFilterFunc lcd_filter_func = NULL;
122 
123 
124  if ( slot->face )
125  {
126  FT_Char i;
127 
128 
129  for ( i = 0; i < FT_LCD_FILTER_FIVE_TAPS; i++ )
130  if ( slot->face->internal->lcd_weights[i] != 0 )
131  {
132  have_custom_weight = TRUE;
133  break;
134  }
135  }
136 
137  /*
138  * The LCD filter can be set library-wide and per-face. Face overrides
139  * library. If the face filter weights are all zero (the default), it
140  * means that the library default should be used.
141  */
142  if ( have_custom_weight )
143  {
144  /*
145  * A per-font filter is set. It always uses the default 5-tap
146  * in-place FIR filter.
147  */
148  ft_memcpy( lcd_weights,
149  slot->face->internal->lcd_weights,
151  lcd_filter_func = ft_lcd_filter_fir;
152  }
153  else
154  {
155  /*
156  * The face's lcd_weights is {0, 0, 0, 0, 0}, meaning `use library
157  * default'. If the library is set to use no LCD filtering
158  * (lcd_filter_func == NULL), `lcd_filter_func' here is also set to
159  * NULL and the tests further below pass over the filtering process.
160  */
161  ft_memcpy( lcd_weights,
162  slot->library->lcd_weights,
164  lcd_filter_func = slot->library->lcd_filter_func;
165  }
166 
167 #endif /*FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
168 
169  /* check glyph image format */
170  if ( slot->format != render->glyph_format )
171  {
172  error = FT_THROW( Invalid_Argument );
173  goto Exit;
174  }
175 
176  /* check mode */
177  if ( mode != required_mode )
178  {
179  error = FT_THROW( Cannot_Render_Glyph );
180  goto Exit;
181  }
182 
183  if ( origin )
184  {
185  x_shift = origin->x;
186  y_shift = origin->y;
187  }
188 
189  /* compute the control box, and grid fit it */
190  /* taking into account the origin shift */
191  FT_Outline_Get_CBox( outline, &cbox );
192 
193 #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
194 
195  /* add minimal padding for LCD rendering */
196  if ( hmul )
197  {
198  cbox.xMax += 21;
199  cbox.xMin -= 21;
200  }
201 
202  if ( vmul )
203  {
204  cbox.yMax += 21;
205  cbox.yMin -= 21;
206  }
207 
208 #else /* FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
209 
210  /* add minimal padding for LCD filter depending on specific weights */
211  if ( lcd_filter_func )
212  {
213  if ( hmul )
214  {
215  cbox.xMax += lcd_weights[4] ? 43
216  : lcd_weights[3] ? 22 : 0;
217  cbox.xMin -= lcd_weights[0] ? 43
218  : lcd_weights[1] ? 22 : 0;
219  }
220 
221  if ( vmul )
222  {
223  cbox.yMax += lcd_weights[4] ? 43
224  : lcd_weights[3] ? 22 : 0;
225  cbox.yMin -= lcd_weights[0] ? 43
226  : lcd_weights[1] ? 22 : 0;
227  }
228  }
229 
230 #endif /* FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
231 
232  cbox.xMin = FT_PIX_FLOOR( cbox.xMin + x_shift );
233  cbox.yMin = FT_PIX_FLOOR( cbox.yMin + y_shift );
234  cbox.xMax = FT_PIX_CEIL( cbox.xMax + x_shift );
235  cbox.yMax = FT_PIX_CEIL( cbox.yMax + y_shift );
236 
237  x_shift -= cbox.xMin;
238  y_shift -= cbox.yMin;
239 
240  x_left = cbox.xMin >> 6;
241  y_top = cbox.yMax >> 6;
242 
243  width = (FT_ULong)( cbox.xMax - cbox.xMin ) >> 6;
244  height = (FT_ULong)( cbox.yMax - cbox.yMin ) >> 6;
245 
246  pitch = width;
247  if ( hmul )
248  {
249  width *= 3;
250  pitch = FT_PAD_CEIL( width, 4 );
251  }
252 
253  if ( vmul )
254  height *= 3;
255 
256  /*
257  * XXX: on 16bit system, we return an error for huge bitmap
258  * to prevent an overflow.
259  */
260  if ( x_left > FT_INT_MAX || y_top > FT_INT_MAX ||
261  x_left < FT_INT_MIN || y_top < FT_INT_MIN )
262  {
263  error = FT_THROW( Invalid_Pixel_Size );
264  goto Exit;
265  }
266 
267  /* Required check is (pitch * height < FT_ULONG_MAX), */
268  /* but we care realistic cases only. Always pitch <= width. */
269  if ( width > 0x7FFF || height > 0x7FFF )
270  {
271  FT_ERROR(( "ft_smooth_render_generic: glyph too large: %u x %u\n",
272  width, height ));
273  error = FT_THROW( Raster_Overflow );
274  goto Exit;
275  }
276 
277  /* release old bitmap buffer */
278  if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
279  {
280  FT_FREE( bitmap->buffer );
282  }
283 
284  /* allocate new one */
285  if ( FT_ALLOC( bitmap->buffer, (FT_ULong)( pitch * height ) ) )
286  goto Exit;
287  else
288  have_buffer = TRUE;
289 
291 
292  slot->format = FT_GLYPH_FORMAT_BITMAP;
293  slot->bitmap_left = (FT_Int)x_left;
294  slot->bitmap_top = (FT_Int)y_top;
295 
296  bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
297  bitmap->num_grays = 256;
298  bitmap->width = (unsigned int)width;
299  bitmap->rows = (unsigned int)height;
300  bitmap->pitch = pitch;
301 
302  /* translate outline to render it into the bitmap */
303  if ( x_shift || y_shift )
304  {
305  FT_Outline_Translate( outline, x_shift, y_shift );
306  have_outline_shifted = TRUE;
307  }
308 
309  /* set up parameters */
310  params.target = bitmap;
311  params.source = outline;
312  params.flags = FT_RASTER_FLAG_AA;
313 
314 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
315 
316  /* implode outline if needed */
317  {
318  FT_Vector* points = outline->points;
319  FT_Vector* points_end = points + outline->n_points;
320  FT_Vector* vec;
321 
322 
323  if ( hmul )
324  for ( vec = points; vec < points_end; vec++ )
325  vec->x *= 3;
326 
327  if ( vmul )
328  for ( vec = points; vec < points_end; vec++ )
329  vec->y *= 3;
330  }
331 
332  /* render outline into the bitmap */
333  error = render->raster_render( render->raster, &params );
334 
335  /* deflate outline if needed */
336  {
337  FT_Vector* points = outline->points;
338  FT_Vector* points_end = points + outline->n_points;
339  FT_Vector* vec;
340 
341 
342  if ( hmul )
343  for ( vec = points; vec < points_end; vec++ )
344  vec->x /= 3;
345 
346  if ( vmul )
347  for ( vec = points; vec < points_end; vec++ )
348  vec->y /= 3;
349  }
350 
351  if ( error )
352  goto Exit;
353 
354  if ( lcd_filter_func )
355  lcd_filter_func( bitmap, mode, lcd_weights );
356 
357 #else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
358 
359  if ( hmul ) /* lcd */
360  {
361  FT_Byte* line;
362  FT_Byte* temp;
363  FT_Int i, j;
364 
365 
366  /* Render 3 separate monochrome bitmaps, shifting the outline */
367  /* by 1/3 pixel. */
368  width /= 3;
369 
370  FT_Outline_Translate( outline, 21, 0 );
371 
372  error = render->raster_render( render->raster, &params );
373  if ( error )
374  goto Exit;
375 
376  FT_Outline_Translate( outline, -21, 0 );
377  bitmap->buffer += width;
378 
379  error = render->raster_render( render->raster, &params );
380  if ( error )
381  goto Exit;
382 
383  FT_Outline_Translate( outline, -21, 0 );
384  bitmap->buffer += width;
385 
386  error = render->raster_render( render->raster, &params );
387  if ( error )
388  goto Exit;
389 
390  FT_Outline_Translate( outline, 21, 0 );
391  bitmap->buffer -= 2 * width;
392 
393  /* XXX: Rearrange the bytes according to FT_PIXEL_MODE_LCD. */
394  /* XXX: It is more efficient to render every third byte above. */
395 
396  if ( FT_ALLOC( temp, (FT_ULong)pitch ) )
397  goto Exit;
398 
399  for ( i = 0; i < height; i++ )
400  {
401  line = bitmap->buffer + i * pitch;
402  for ( j = 0; j < width; j++ )
403  {
404  temp[3 * j ] = line[j];
405  temp[3 * j + 1] = line[j + width];
406  temp[3 * j + 2] = line[j + width + width];
407  }
408  FT_MEM_COPY( line, temp, pitch );
409  }
410 
411  FT_FREE( temp );
412  }
413  else if ( vmul ) /* lcd_v */
414  {
415  /* Render 3 separate monochrome bitmaps, shifting the outline */
416  /* by 1/3 pixel. Triple the pitch to render on each third row. */
417  bitmap->pitch *= 3;
418  bitmap->rows /= 3;
419 
420  FT_Outline_Translate( outline, 0, 21 );
421  bitmap->buffer += 2 * pitch;
422 
423  error = render->raster_render( render->raster, &params );
424  if ( error )
425  goto Exit;
426 
427  FT_Outline_Translate( outline, 0, -21 );
428  bitmap->buffer -= pitch;
429 
430  error = render->raster_render( render->raster, &params );
431  if ( error )
432  goto Exit;
433 
434  FT_Outline_Translate( outline, 0, -21 );
435  bitmap->buffer -= pitch;
436 
437  error = render->raster_render( render->raster, &params );
438  if ( error )
439  goto Exit;
440 
441  FT_Outline_Translate( outline, 0, 21 );
442 
443  bitmap->pitch /= 3;
444  bitmap->rows *= 3;
445  }
446  else /* grayscale */
447  {
448  error = render->raster_render( render->raster, &params );
449  if ( error )
450  goto Exit;
451  }
452 
453 #endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
454 
455  /* everything is fine; don't deallocate buffer */
456  have_buffer = FALSE;
457 
458  error = FT_Err_Ok;
459 
460  Exit:
461  if ( have_outline_shifted )
462  FT_Outline_Translate( outline, -x_shift, -y_shift );
463  if ( have_buffer )
464  {
465  FT_FREE( bitmap->buffer );
467  }
468 
469  return error;
470  }
471 
472 
473  /* convert a slot's glyph image into a bitmap */
474  static FT_Error
478  const FT_Vector* origin )
479  {
480  if ( mode == FT_RENDER_MODE_LIGHT )
481  mode = FT_RENDER_MODE_NORMAL;
482 
483  return ft_smooth_render_generic( render, slot, mode, origin,
485  }
486 
487 
488  /* convert a slot's glyph image into a horizontal LCD bitmap */
489  static FT_Error
493  const FT_Vector* origin )
494  {
495  FT_Error error;
496 
497  error = ft_smooth_render_generic( render, slot, mode, origin,
499  if ( !error )
501 
502  return error;
503  }
504 
505 
506  /* convert a slot's glyph image into a vertical LCD bitmap */
507  static FT_Error
511  const FT_Vector* origin )
512  {
513  FT_Error error;
514 
515  error = ft_smooth_render_generic( render, slot, mode, origin,
517  if ( !error )
519 
520  return error;
521  }
522 
523 
525  ft_smooth_renderer_class,
526 
528  sizeof ( FT_RendererRec ),
529 
530  "smooth",
531  0x10000L,
532  0x20000L,
533 
534  NULL, /* module specific interface */
535 
536  (FT_Module_Constructor)ft_smooth_init, /* module_init */
537  (FT_Module_Destructor) NULL, /* module_done */
538  (FT_Module_Requester) NULL, /* get_interface */
539 
541 
542  (FT_Renderer_RenderFunc) ft_smooth_render, /* render_glyph */
543  (FT_Renderer_TransformFunc)ft_smooth_transform, /* transform_glyph */
544  (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox, /* get_glyph_cbox */
546 
547  (FT_Raster_Funcs*)&FT_GRAYS_RASTER_GET /* raster_class */
548  )
549 
550 
552  ft_smooth_lcd_renderer_class,
553 
556 
557  "smooth-lcd",
558  0x10000L,
559  0x20000L,
560 
561  NULL, /* module specific interface */
562 
563  (FT_Module_Constructor)ft_smooth_init, /* module_init */
564  (FT_Module_Destructor) NULL, /* module_done */
565  (FT_Module_Requester) NULL, /* get_interface */
566 
568 
569  (FT_Renderer_RenderFunc) ft_smooth_render_lcd, /* render_glyph */
570  (FT_Renderer_TransformFunc)ft_smooth_transform, /* transform_glyph */
571  (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox, /* get_glyph_cbox */
572  (FT_Renderer_SetModeFunc) ft_smooth_set_mode, /* set_mode */
573 
574  (FT_Raster_Funcs*)&FT_GRAYS_RASTER_GET /* raster_class */
575  )
576 
577 
579  ft_smooth_lcdv_renderer_class,
580 
582  sizeof ( FT_RendererRec ),
583 
584  "smooth-lcdv",
585  0x10000L,
586  0x20000L,
587 
588  NULL, /* module specific interface */
589 
590  (FT_Module_Constructor)ft_smooth_init, /* module_init */
591  (FT_Module_Destructor) NULL, /* module_done */
592  (FT_Module_Requester) NULL, /* get_interface */
593 
594  FT_GLYPH_FORMAT_OUTLINE,
595 
596  (FT_Renderer_RenderFunc) ft_smooth_render_lcd_v, /* render_glyph */
597  (FT_Renderer_TransformFunc)ft_smooth_transform, /* transform_glyph */
598  (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox, /* get_glyph_cbox */
599  (FT_Renderer_SetModeFunc) ft_smooth_set_mode, /* set_mode */
600 
601  (FT_Raster_Funcs*)&FT_GRAYS_RASTER_GET /* raster_class */
602  )
603 
604 
605 /* END */
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:303
#define FT_PIX_CEIL(x)
Definition: ftobjs.h:94
int FT_Error
Definition: fttypes.h:300
FT_Face_Internal internal
Definition: freetype.h:1107
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint j
Definition: glfuncs.h:98
FT_Pos y
Definition: ftimage.h:77
#define TRUE
Definition: types.h:120
FT_Raster_SetModeFunc raster_set_mode
Definition: ftimage.h:1186
unsigned long FT_ULong
Definition: fttypes.h:253
FT_Memory memory
Definition: ftobjs.h:513
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:58
unsigned char pixel_mode
Definition: ftimage.h:268
unsigned int rows
Definition: ftimage.h:263
#define error(str)
Definition: mkdosfs.c:1605
FT_BBox *abbox FT_BBox cbox
Definition: ftbbox.c:444
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_Renderer_RenderFunc FT_Renderer_TransformFunc FT_Renderer_GetCBoxFunc ft_smooth_get_cbox
Definition: ftsmooth.c:557
FT_Pos x
Definition: ftimage.h:76
const void * source
Definition: ftimage.h:1000
signed int FT_Int
Definition: fttypes.h:220
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_Renderer_RenderFunc FT_Renderer_TransformFunc ft_smooth_transform
Definition: ftsmooth.c:557
GLuint GLenum matrix
Definition: glext.h:9407
sizeof(FT_RendererRec)
enum FT_Render_Mode_ FT_Render_Mode
FT_Module_Interface(* FT_Module_Requester)(FT_Module module, const char *name)
Definition: ftmodapi.h:184
return FT_THROW(Missing_Property)
unsigned char * buffer
Definition: ftimage.h:266
signed char FT_Char
Definition: fttypes.h:143
#define FT_RASTER_FLAG_AA
Definition: ftimage.h:941
FT_Glyph_Format glyph_format
Definition: ftobjs.h:744
smooth lcd
Definition: ftsmooth.c:557
return FT_Err_Ok
Definition: ftbbox.c:511
#define FT_LCD_FILTER_FIVE_TAPS
Definition: ftlcdfil.h:309
#define FT_GLYPH_OWN_BITMAP
Definition: ftobjs.h:439
static FT_Error ft_smooth_render(FT_Renderer render, FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin)
Definition: ftsmooth.c:475
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
static FT_Error ft_smooth_render_generic(FT_Renderer render, FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin, FT_Render_Mode required_mode)
Definition: ftsmooth.c:94
FT_Raster_ResetFunc raster_reset
Definition: ftimage.h:1185
FT_Vector * points
Definition: ftimage.h:339
FT_Renderer_Class * clazz
Definition: ftobjs.h:743
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define FT_ERROR(varformat)
Definition: ftdebug.h:181
#define FT_PAD_CEIL(x, n)
Definition: ftobjs.h:90
#define FALSE
Definition: types.h:117
GLenum const GLfloat * params
Definition: glext.h:5645
unsigned char FT_Byte
Definition: fttypes.h:154
FT_Raster_Funcs * raster_class
Definition: ftrender.h:156
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
Definition: ftoutln.c:478
smooth NULL
Definition: ftsmooth.c:557
FT_Pos yMax
Definition: ftimage.h:118
FT_Int bitmap_left
Definition: freetype.h:1839
void(* FT_Bitmap_LcdFilterFunc)(FT_Bitmap *bitmap, FT_Render_Mode render_mode, FT_Byte *weights)
Definition: ftobjs.h:824
#define FT_PIX_FLOOR(x)
Definition: ftobjs.h:92
#define FT_FREE(ptr)
Definition: ftmemory.h:329
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
Definition: ftoutln.c:711
FT_Int bitmap_top
Definition: freetype.h:1840
smooth FT_Module_Constructor ft_smooth_init
Definition: ftsmooth.c:557
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_Renderer_RenderFunc FT_Renderer_TransformFunc FT_Renderer_GetCBoxFunc FT_Renderer_SetModeFunc ft_smooth_set_mode
Definition: ftsmooth.c:557
Definition: uimain.c:88
void(* FT_Module_Destructor)(FT_Module module)
Definition: ftmodapi.h:167
#define FT_ZERO(p)
Definition: ftmemory.h:237
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_GLYPH_FORMAT_OUTLINE
Definition: ftsmooth.c:557
GLint GLint GLsizei width
Definition: gl.h:1546
FT_Pos xMin
Definition: ftimage.h:117
#define FT_INT_MIN
Definition: ftstdlib.h:64
if(!(yy_init))
Definition: macro.lex.yy.c:704
static void Exit(void)
Definition: sock.c:1272
static void render(void)
Definition: ssstars.c:272
FT_Pos xMax
Definition: ftimage.h:118
unsigned short num_grays
Definition: ftimage.h:267
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
FT_Vector * vec
Definition: ftbbox.c:448
GLsizei const GLfloat * points
Definition: glext.h:8112
FT_Byte FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS]
Definition: ftlcdfil.h:311
char line[200]
Definition: main.c:97
void(* FT_Renderer_GetCBoxFunc)(FT_Renderer renderer, FT_GlyphSlot slot, FT_BBox *cbox)
Definition: ftrender.h:102
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_Renderer_RenderFunc ft_smooth_render_lcd
Definition: ftsmooth.c:557
FT_Outline outline
Definition: freetype.h:1842
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
FT_Error(* FT_Renderer_SetModeFunc)(FT_Renderer renderer, FT_ULong mode_tag, FT_Pointer mode_ptr)
Definition: ftrender.h:108
static stack_node_t temp
Definition: rpn.c:18
FT_Bitmap bitmap
Definition: freetype.h:1838
static FT_Error ft_smooth_render_lcd_v(FT_Renderer render, FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin)
Definition: ftsmooth.c:508
Definition: mesh.c:5325
FT_Error(* FT_Module_Constructor)(FT_Module module)
Definition: ftmodapi.h:152
Definition: vfat.h:179
FT_Glyph_Format format
Definition: freetype.h:1836
short n_points
Definition: ftimage.h:337
FT_Library library
Definition: freetype.h:1825
FT_Pos yMin
Definition: ftimage.h:117
const FT_Bitmap * target
Definition: ftimage.h:999
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
FT_Error(* FT_Renderer_TransformFunc)(FT_Renderer renderer, FT_GlyphSlot slot, const FT_Matrix *matrix, const FT_Vector *delta)
Definition: ftrender.h:95
#define FT_GRAYS_RASTER_GET
Definition: ftspic.h:30
FT_Raster_Render_Func raster_render
Definition: ftobjs.h:748
int pitch
Definition: ftimage.h:265
FT_MODULE_RENDERER
Definition: ftsmooth.c:554
ft_lcd_filter_fir(FT_Bitmap *bitmap, FT_Render_Mode mode, FT_LcdFiveTapFilter weights)
Definition: ftlcdfil.c:316
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
Definition: ftoutln.c:528
FT_Slot_Internal internal
Definition: freetype.h:1855
#define FT_INT_MAX
Definition: ftstdlib.h:63
#define FT_MEM_COPY(dest, source, count)
Definition: ftmemory.h:228
static HBITMAP bitmap
Definition: clipboard.c:1621
FT_ModuleRec root
Definition: ftobjs.h:742
FT_Error(* FT_Renderer_RenderFunc)(FT_Renderer renderer, FT_GlyphSlot slot, FT_UInt mode, const FT_Vector *origin)
Definition: ftrender.h:89
#define ft_memcpy
Definition: ftstdlib.h:82
FT_DEFINE_RENDERER(ft_smooth_renderer_class, FT_MODULE_RENDERER, sizeof(FT_RendererRec),"smooth", 0x10000L, 0x20000L, NULL,(FT_Module_Constructor) ft_smooth_init,(FT_Module_Destructor) NULL,(FT_Module_Requester) NULL, FT_GLYPH_FORMAT_OUTLINE,(FT_Renderer_RenderFunc) ft_smooth_render,(FT_Renderer_TransformFunc) ft_smooth_transform,(FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox,(FT_Renderer_SetModeFunc) ft_smooth_set_mode,(FT_Raster_Funcs *)&FT_GRAYS_RASTER_GET) FT_DEFINE_RENDERER(ft_smooth_lcd_renderer_class
FT_Raster raster
Definition: ftobjs.h:747
unsigned int width
Definition: ftimage.h:264
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29