20 #include FT_INTERNAL_DEBUG_H
21 #include FT_INTERNAL_OBJECTS_H
69 error = Smooth_Err_Invalid_Argument;
109 #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
110 FT_Pos height_org, width_org;
116 FT_Pos x_shift, y_shift, x_left, y_top;
124 error = Smooth_Err_Invalid_Argument;
129 if ( mode != required_mode )
130 return Smooth_Err_Cannot_Render_Glyph;
148 FT_ERROR((
"ft_smooth_render_generic: glyph too large:"
149 " xMin = %d, xMax = %d\n",
151 return Smooth_Err_Raster_Overflow;
154 width = ( cbox.
xMax - cbox.
xMin ) >> 6;
158 FT_ERROR((
"ft_smooth_render_generic: glyph too large:"
159 " yMin = %d, yMax = %d\n",
161 return Smooth_Err_Raster_Overflow;
164 height = ( cbox.
yMax - cbox.
yMin ) >> 6;
169 #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
197 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
199 if ( slot->
library->lcd_filter_func )
206 x_shift -= 64 * ( extra >> 1 );
209 x_left -= extra >> 1;
214 y_shift -= 64 * ( extra >> 1 );
222 #if FT_UINT_MAX > 0xFFFFU
226 if ( width > 0x7FFF || height > 0x7FFF )
228 FT_ERROR((
"ft_smooth_render_generic: glyph too large: %u x %u\n",
230 return Smooth_Err_Raster_Overflow;
239 bitmap->
pitch = pitch;
254 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
264 for ( vec = points; vec < points_end; vec++ )
268 for ( vec = points; vec < points_end; vec++ )
283 for ( vec = points; vec < points_end; vec++ )
287 for ( vec = points; vec < points_end; vec++ )
291 if ( slot->
library->lcd_filter_func )
306 for ( hh = height_org; hh > 0; hh--, line += pitch )
312 for ( xx = width_org; xx > 0; xx-- )
328 FT_Byte* read = bitmap->
buffer + ( height - height_org ) * pitch;
333 for ( hh = height_org; hh > 0; hh-- )
356 return Smooth_Err_Invalid_Pixel_Size;
361 slot->
format = FT_GLYPH_FORMAT_BITMAP;
366 if ( outline && origin )
480 sizeof ( FT_RendererRec ),
489 (FT_Module_Destructor) 0,
490 (FT_Module_Requester) 0
493 FT_GLYPH_FORMAT_OUTLINE,
#define FT_ALLOC(ptr, size)
FT_ULong raster_pool_size
FT_Raster_Render_Func raster_render
smooth FT_Module_Constructor FT_Renderer_RenderFunc FT_Renderer_TransformFunc ft_smooth_transform
FT_BEGIN_HEADER typedef signed long FT_Pos
#define FT_MEM_ZERO(dest, count)
enum FT_Render_Mode_ FT_Render_Mode
FT_Module_Interface(* FT_Module_Requester)(FT_Module module, const char *name)
static void render(const Vertex_Buffer_Macrorenderer ¯orenderer, std::vector< Vertex_Buffer::Vertex_Buffer_Range * > &descriptors)
#define FT_RASTER_FLAG_AA
EGLSurface EGLint EGLint EGLint EGLint height
smooth FT_Module_Constructor FT_Renderer_RenderFunc FT_Renderer_TransformFunc FT_Renderer_GetCBoxFunc ft_smooth_get_cbox
#define FT_GLYPH_OWN_BITMAP
static FT_Error ft_smooth_render(FT_Renderer render, FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin)
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)
#define FT_ERROR(varformat)
#define FT_PAD_CEIL(x, n)
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
#define FT_MODULE_RENDERER
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
FT_Raster_Funcs * raster_class
smooth FT_Module_Constructor FT_Renderer_RenderFunc ft_smooth_render_lcd
smooth FT_Module_Constructor ft_smooth_init
smooth FT_Module_Constructor FT_Renderer_RenderFunc FT_Renderer_TransformFunc FT_Renderer_GetCBoxFunc FT_Renderer_SetModeFunc ft_smooth_set_mode
FT_Raster_ResetFunc raster_reset
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
EGLSurface EGLint EGLint EGLint width
void(* FT_Module_Destructor)(FT_Module module)
FT_Raster_SetModeFunc raster_set_mode
#define FT_MODULE_LIBRARY(x)
void(* FT_Renderer_GetCBoxFunc)(FT_Renderer renderer, FT_GlyphSlot slot, FT_BBox *cbox)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
#define FT_DEFINE_RENDERER(class_,flags_, size_, name_, version_, requires_,interface_, init_, done_, get_interface_,glyph_format_, render_glyph_, transform_glyph_,get_glyph_cbox_, set_mode_, raster_class_)
FT_Glyph_Format glyph_format
FT_Error(* FT_Renderer_SetModeFunc)(FT_Renderer renderer, FT_ULong mode_tag, FT_Pointer mode_ptr)
static FT_Error ft_smooth_render_lcd_v(FT_Renderer render, FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin)
FT_Error(* FT_Module_Constructor)(FT_Module module)
FT_Slot_Internal internal
FT_Error(* FT_Renderer_TransformFunc)(FT_Renderer renderer, FT_GlyphSlot slot, const FT_Matrix *matrix, const FT_Vector *delta)
#define FT_GRAYS_RASTER_GET
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
GLsizei GLfixed GLfixed GLfixed GLfixed const GLubyte * bitmap
GLuint GLdouble GLdouble GLint GLint const GLdouble * points
FT_Renderer_Class * clazz
FT_Error(* FT_Renderer_RenderFunc)(FT_Renderer renderer, FT_GlyphSlot slot, FT_UInt mode, const FT_Vector *origin)
FT_Module_Constructor FT_GLYPH_FORMAT_OUTLINE