ReactOS  r75636
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  {
35 
36 
37  render->clazz->raster_class->raster_reset( render->raster,
38  library->raster_pool,
39  library->raster_pool_size );
40 
41  return 0;
42  }
43 
44 
45  /* sets render-specific mode */
46  static FT_Error
48  FT_ULong mode_tag,
50  {
51  /* we simply pass it to the raster */
52  return render->clazz->raster_class->raster_set_mode( render->raster,
53  mode_tag,
54  data );
55  }
56 
57  /* transform a given glyph image */
58  static FT_Error
61  const FT_Matrix* matrix,
62  const FT_Vector* delta )
63  {
65 
66 
67  if ( slot->format != render->glyph_format )
68  {
69  error = FT_THROW( Invalid_Argument );
70  goto Exit;
71  }
72 
73  if ( matrix )
74  FT_Outline_Transform( &slot->outline, matrix );
75 
76  if ( delta )
77  FT_Outline_Translate( &slot->outline, delta->x, delta->y );
78 
79  Exit:
80  return error;
81  }
82 
83 
84  /* return the glyph's control box */
85  static void
88  FT_BBox* cbox )
89  {
90  FT_ZERO( cbox );
91 
92  if ( slot->format == render->glyph_format )
93  FT_Outline_Get_CBox( &slot->outline, cbox );
94  }
95 
96 
97  /* convert a slot's glyph image into a bitmap */
98  static FT_Error
102  const FT_Vector* origin,
103  FT_Render_Mode required_mode )
104  {
105  FT_Error error;
106  FT_Outline* outline = &slot->outline;
107  FT_Bitmap* bitmap = &slot->bitmap;
108  FT_Memory memory = render->root.memory;
109  FT_BBox cbox;
110  FT_Pos x_shift = 0;
111  FT_Pos y_shift = 0;
112  FT_Pos x_left, y_top;
113  FT_Pos width, height, pitch;
114 #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
115  FT_Pos height_org, width_org;
116 #endif
117  FT_Int hmul = ( mode == FT_RENDER_MODE_LCD );
118  FT_Int vmul = ( mode == FT_RENDER_MODE_LCD_V );
119 
121 
122  FT_Bool have_outline_shifted = FALSE;
123  FT_Bool have_buffer = FALSE;
124 
125 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
126 
127  FT_Int lcd_extra = 0;
128  FT_LcdFiveTapFilter lcd_weights = { 0 };
129  FT_Bool have_custom_weight = FALSE;
130  FT_Bitmap_LcdFilterFunc lcd_filter_func = NULL;
131 
132 
133  if ( slot->face )
134  {
135  FT_Char i;
136 
137 
138  for ( i = 0; i < FT_LCD_FILTER_FIVE_TAPS; i++ )
139  if ( slot->face->internal->lcd_weights[i] != 0 )
140  {
141  have_custom_weight = TRUE;
142  break;
143  }
144  }
145 
146  /*
147  * The LCD filter can be set library-wide and per-face. Face overrides
148  * library. If the face filter weights are all zero (the default), it
149  * means that the library default should be used.
150  */
151  if ( have_custom_weight )
152  {
153  /*
154  * A per-font filter is set. It always uses the default 5-tap
155  * in-place FIR filter that needs 2 extra pixels.
156  */
157  ft_memcpy( lcd_weights,
158  slot->face->internal->lcd_weights,
160  lcd_filter_func = ft_lcd_filter_fir;
161  lcd_extra = 2;
162  }
163  else
164  {
165  /*
166  * The face's lcd_weights is {0, 0, 0, 0, 0}, meaning `use library
167  * default'. If the library is set to use no LCD filtering
168  * (lcd_filter_func == NULL), `lcd_filter_func' here is also set to
169  * NULL and the tests further below pass over the filtering process.
170  */
171  ft_memcpy( lcd_weights,
172  slot->library->lcd_weights,
174  lcd_filter_func = slot->library->lcd_filter_func;
175  lcd_extra = slot->library->lcd_extra;
176  }
177 
178 #endif /*FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
179 
180  /* check glyph image format */
181  if ( slot->format != render->glyph_format )
182  {
183  error = FT_THROW( Invalid_Argument );
184  goto Exit;
185  }
186 
187  /* check mode */
188  if ( mode != required_mode )
189  {
190  error = FT_THROW( Cannot_Render_Glyph );
191  goto Exit;
192  }
193 
194  if ( origin )
195  {
196  x_shift = origin->x;
197  y_shift = origin->y;
198  }
199 
200  /* compute the control box, and grid fit it */
201  /* taking into account the origin shift */
202  FT_Outline_Get_CBox( outline, &cbox );
203 
204  cbox.xMin = FT_PIX_FLOOR( cbox.xMin + x_shift );
205  cbox.yMin = FT_PIX_FLOOR( cbox.yMin + y_shift );
206  cbox.xMax = FT_PIX_CEIL( cbox.xMax + x_shift );
207  cbox.yMax = FT_PIX_CEIL( cbox.yMax + y_shift );
208 
209  x_shift -= cbox.xMin;
210  y_shift -= cbox.yMin;
211 
212  x_left = cbox.xMin >> 6;
213  y_top = cbox.yMax >> 6;
214 
215  width = (FT_ULong)( cbox.xMax - cbox.xMin ) >> 6;
216  height = (FT_ULong)( cbox.yMax - cbox.yMin ) >> 6;
217 
218 #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
219  width_org = width;
220  height_org = height;
221 #endif
222 
223  pitch = width;
224  if ( hmul )
225  {
226  width *= 3;
227  pitch = FT_PAD_CEIL( width, 4 );
228  }
229 
230  if ( vmul )
231  height *= 3;
232 
233 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
234  if ( lcd_filter_func )
235  {
236  if ( hmul )
237  {
238  x_shift += 64 * ( lcd_extra >> 1 );
239  x_left -= lcd_extra >> 1;
240  width += 3 * lcd_extra;
241  pitch = FT_PAD_CEIL( width, 4 );
242  }
243 
244  if ( vmul )
245  {
246  y_shift += 64 * ( lcd_extra >> 1 );
247  y_top += lcd_extra >> 1;
248  height += 3 * lcd_extra;
249  }
250  }
251 #endif
252 
253  /*
254  * XXX: on 16bit system, we return an error for huge bitmap
255  * to prevent an overflow.
256  */
257  if ( x_left > FT_INT_MAX || y_top > FT_INT_MAX ||
258  x_left < FT_INT_MIN || y_top < FT_INT_MIN )
259  {
260  error = FT_THROW( Invalid_Pixel_Size );
261  goto Exit;
262  }
263 
264  /* Required check is (pitch * height < FT_ULONG_MAX), */
265  /* but we care realistic cases only. Always pitch <= width. */
266  if ( width > 0x7FFF || height > 0x7FFF )
267  {
268  FT_ERROR(( "ft_smooth_render_generic: glyph too large: %u x %u\n",
269  width, height ));
270  error = FT_THROW( Raster_Overflow );
271  goto Exit;
272  }
273 
274  /* release old bitmap buffer */
275  if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
276  {
277  FT_FREE( bitmap->buffer );
279  }
280 
281  /* allocate new one */
282  if ( FT_ALLOC( bitmap->buffer, (FT_ULong)( pitch * height ) ) )
283  goto Exit;
284  else
285  have_buffer = TRUE;
286 
288 
289  slot->format = FT_GLYPH_FORMAT_BITMAP;
290  slot->bitmap_left = (FT_Int)x_left;
291  slot->bitmap_top = (FT_Int)y_top;
292 
293  bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
294  bitmap->num_grays = 256;
295  bitmap->width = (unsigned int)width;
296  bitmap->rows = (unsigned int)height;
297  bitmap->pitch = pitch;
298 
299  /* translate outline to render it into the bitmap */
300  if ( x_shift || y_shift )
301  {
302  FT_Outline_Translate( outline, x_shift, y_shift );
303  have_outline_shifted = TRUE;
304  }
305 
306  /* set up parameters */
307  params.target = bitmap;
308  params.source = outline;
309  params.flags = FT_RASTER_FLAG_AA;
310 
311 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
312 
313  /* implode outline if needed */
314  {
315  FT_Vector* points = outline->points;
316  FT_Vector* points_end = points + outline->n_points;
317  FT_Vector* vec;
318 
319 
320  if ( hmul )
321  for ( vec = points; vec < points_end; vec++ )
322  vec->x *= 3;
323 
324  if ( vmul )
325  for ( vec = points; vec < points_end; vec++ )
326  vec->y *= 3;
327  }
328 
329  /* render outline into the bitmap */
330  error = render->raster_render( render->raster, &params );
331 
332  /* deflate outline if needed */
333  {
334  FT_Vector* points = outline->points;
335  FT_Vector* points_end = points + outline->n_points;
336  FT_Vector* vec;
337 
338 
339  if ( hmul )
340  for ( vec = points; vec < points_end; vec++ )
341  vec->x /= 3;
342 
343  if ( vmul )
344  for ( vec = points; vec < points_end; vec++ )
345  vec->y /= 3;
346  }
347 
348  if ( error )
349  goto Exit;
350 
351  if ( lcd_filter_func )
352  lcd_filter_func( bitmap, mode, lcd_weights );
353 
354 #else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
355 
356  /* render outline into bitmap */
357  error = render->raster_render( render->raster, &params );
358  if ( error )
359  goto Exit;
360 
361  /* expand it horizontally */
362  if ( hmul )
363  {
364  FT_Byte* line = bitmap->buffer;
365  FT_UInt hh;
366 
367 
368  for ( hh = height_org; hh > 0; hh--, line += pitch )
369  {
370  FT_UInt xx;
371  FT_Byte* end = line + width;
372 
373 
374  for ( xx = width_org; xx > 0; xx-- )
375  {
376  FT_UInt pixel = line[xx-1];
377 
378 
379  end[-3] = (FT_Byte)pixel;
380  end[-2] = (FT_Byte)pixel;
381  end[-1] = (FT_Byte)pixel;
382  end -= 3;
383  }
384  }
385  }
386 
387  /* expand it vertically */
388  if ( vmul )
389  {
390  FT_Byte* read = bitmap->buffer + ( height - height_org ) * pitch;
391  FT_Byte* write = bitmap->buffer;
392  FT_UInt hh;
393 
394 
395  for ( hh = height_org; hh > 0; hh-- )
396  {
397  ft_memcpy( write, read, pitch );
398  write += pitch;
399 
400  ft_memcpy( write, read, pitch );
401  write += pitch;
402 
403  ft_memcpy( write, read, pitch );
404  write += pitch;
405  read += pitch;
406  }
407  }
408 
409 #endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
410 
411  /* everything is fine; don't deallocate buffer */
412  have_buffer = FALSE;
413 
414  error = FT_Err_Ok;
415 
416  Exit:
417  if ( have_outline_shifted )
418  FT_Outline_Translate( outline, -x_shift, -y_shift );
419  if ( have_buffer )
420  {
421  FT_FREE( bitmap->buffer );
423  }
424 
425  return error;
426  }
427 
428 
429  /* convert a slot's glyph image into a bitmap */
430  static FT_Error
434  const FT_Vector* origin )
435  {
436  if ( mode == FT_RENDER_MODE_LIGHT )
437  mode = FT_RENDER_MODE_NORMAL;
438 
439  return ft_smooth_render_generic( render, slot, mode, origin,
441  }
442 
443 
444  /* convert a slot's glyph image into a horizontal LCD bitmap */
445  static FT_Error
449  const FT_Vector* origin )
450  {
451  FT_Error error;
452 
453  error = ft_smooth_render_generic( render, slot, mode, origin,
455  if ( !error )
457 
458  return error;
459  }
460 
461 
462  /* convert a slot's glyph image into a vertical LCD bitmap */
463  static FT_Error
467  const FT_Vector* origin )
468  {
469  FT_Error error;
470 
471  error = ft_smooth_render_generic( render, slot, mode, origin,
473  if ( !error )
475 
476  return error;
477  }
478 
479 
481  ft_smooth_renderer_class,
482 
484  sizeof ( FT_RendererRec ),
485 
486  "smooth",
487  0x10000L,
488  0x20000L,
489 
490  NULL, /* module specific interface */
491 
492  (FT_Module_Constructor)ft_smooth_init, /* module_init */
493  (FT_Module_Destructor) NULL, /* module_done */
494  (FT_Module_Requester) NULL, /* get_interface */
495 
497 
498  (FT_Renderer_RenderFunc) ft_smooth_render, /* render_glyph */
499  (FT_Renderer_TransformFunc)ft_smooth_transform, /* transform_glyph */
500  (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox, /* get_glyph_cbox */
502 
503  (FT_Raster_Funcs*)&FT_GRAYS_RASTER_GET /* raster_class */
504  )
505 
506 
508  ft_smooth_lcd_renderer_class,
509 
512 
513  "smooth-lcd",
514  0x10000L,
515  0x20000L,
516 
517  NULL, /* module specific interface */
518 
519  (FT_Module_Constructor)ft_smooth_init, /* module_init */
520  (FT_Module_Destructor) NULL, /* module_done */
521  (FT_Module_Requester) NULL, /* get_interface */
522 
524 
525  (FT_Renderer_RenderFunc) ft_smooth_render_lcd, /* render_glyph */
526  (FT_Renderer_TransformFunc)ft_smooth_transform, /* transform_glyph */
527  (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox, /* get_glyph_cbox */
528  (FT_Renderer_SetModeFunc) ft_smooth_set_mode, /* set_mode */
529 
530  (FT_Raster_Funcs*)&FT_GRAYS_RASTER_GET /* raster_class */
531  )
532 
533 
535  ft_smooth_lcdv_renderer_class,
536 
538  sizeof ( FT_RendererRec ),
539 
540  "smooth-lcdv",
541  0x10000L,
542  0x20000L,
543 
544  NULL, /* module specific interface */
545 
546  (FT_Module_Constructor)ft_smooth_init, /* module_init */
547  (FT_Module_Destructor) NULL, /* module_done */
548  (FT_Module_Requester) NULL, /* get_interface */
549 
550  FT_GLYPH_FORMAT_OUTLINE,
551 
552  (FT_Renderer_RenderFunc) ft_smooth_render_lcd_v, /* render_glyph */
553  (FT_Renderer_TransformFunc)ft_smooth_transform, /* transform_glyph */
554  (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox, /* get_glyph_cbox */
555  (FT_Renderer_SetModeFunc) ft_smooth_set_mode, /* set_mode */
556 
557  (FT_Raster_Funcs*)&FT_GRAYS_RASTER_GET /* raster_class */
558  )
559 
560 
561 /* END */
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:303
#define FT_PIX_CEIL(x)
Definition: ftobjs.h:93
int FT_Error
Definition: fttypes.h:300
FT_Face_Internal internal
Definition: freetype.h:1106
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:496
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:513
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:513
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:727
GLuint GLuint end
Definition: gl.h:1545
smooth lcd
Definition: ftsmooth.c:513
FT_Library library
Definition: cffdrivr.c:568
return FT_Err_Ok
Definition: ftbbox.c:511
#define FT_LCD_FILTER_FIVE_TAPS
Definition: ftlcdfil.h:308
#define FT_GLYPH_OWN_BITMAP
Definition: ftobjs.h:422
static FT_Error ft_smooth_render(FT_Renderer render, FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin)
Definition: ftsmooth.c:431
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
#define write
Definition: acwin.h:73
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:99
FT_Raster_ResetFunc raster_reset
Definition: ftimage.h:1185
FT_Vector * points
Definition: ftimage.h:339
FT_Renderer_Class * clazz
Definition: ftobjs.h:726
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:89
#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:513
FT_Pos yMax
Definition: ftimage.h:118
FT_Int bitmap_left
Definition: freetype.h:1832
void(* FT_Bitmap_LcdFilterFunc)(FT_Bitmap *bitmap, FT_Render_Mode render_mode, FT_Byte *weights)
Definition: ftobjs.h:807
#define FT_PIX_FLOOR(x)
Definition: ftobjs.h:91
Definition: parser.c:48
#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:1833
smooth FT_Module_Constructor ft_smooth_init
Definition: ftsmooth.c:513
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:513
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:513
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:1263
static void render(void)
Definition: ssstars.c:272
#define FT_MODULE_LIBRARY(x)
Definition: ftobjs.h:504
FT_Pos xMax
Definition: ftimage.h:118
int xx
Definition: npserver.c:29
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:310
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:513
FT_Outline outline
Definition: freetype.h:1835
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
FT_Bitmap bitmap
Definition: freetype.h:1831
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:464
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:1829
short n_points
Definition: ftimage.h:337
unsigned int FT_UInt
Definition: fttypes.h:231
FT_Library library
Definition: freetype.h:1818
FT_Pos yMin
Definition: ftimage.h:117
FT_ULong raster_pool_size
Definition: ftobjs.h:908
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:731
int pitch
Definition: ftimage.h:265
FT_MODULE_RENDERER
Definition: ftsmooth.c:510
FT_Byte * raster_pool
Definition: ftobjs.h:906
ft_lcd_filter_fir(FT_Bitmap *bitmap, FT_Render_Mode mode, FT_LcdFiveTapFilter weights)
Definition: ftlcdfil.c:363
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
Definition: ftoutln.c:528
FT_Slot_Internal internal
Definition: freetype.h:1848
#define FT_INT_MAX
Definition: ftstdlib.h:63
static HBITMAP bitmap
Definition: clipboard.c:1621
FT_ModuleRec root
Definition: ftobjs.h:725
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:730
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
unsigned int width
Definition: ftimage.h:264
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29