20 #include FT_INTERNAL_DEBUG_H 21 #include FT_INTERNAL_OBJECTS_H 69 error =
FT_THROW( 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;
128 error =
FT_THROW( Invalid_Argument );
133 if ( mode != required_mode )
135 error =
FT_THROW( Cannot_Render_Glyph );
145 have_translated_origin =
TRUE;
158 FT_ERROR((
"ft_smooth_render_generic: glyph too large:" 159 " xMin = %d, xMax = %d\n",
161 error =
FT_THROW( Raster_Overflow );
165 width = ( cbox.
xMax - cbox.
xMin ) >> 6;
169 FT_ERROR((
"ft_smooth_render_generic: glyph too large:" 170 " yMin = %d, yMax = %d\n",
172 error =
FT_THROW( Raster_Overflow );
176 height = ( cbox.
yMax - cbox.
yMin ) >> 6;
181 #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING 209 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING 211 if ( slot->
library->lcd_filter_func )
218 x_shift -= 64 * ( extra >> 1 );
221 x_left -= extra >> 1;
226 y_shift -= 64 * ( extra >> 1 );
234 #if FT_UINT_MAX > 0xFFFFU 238 if ( width > 0x7FFF || height > 0x7FFF )
240 FT_ERROR((
"ft_smooth_render_generic: glyph too large: %u x %u\n",
242 error =
FT_THROW( Raster_Overflow );
252 bitmap->
pitch = pitch;
256 have_outline_shifted =
TRUE;
270 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING 280 for ( vec = points; vec < points_end; vec++ )
284 for ( vec = points; vec < points_end; vec++ )
299 for ( vec = points; vec < points_end; vec++ )
303 for ( vec = points; vec < points_end; vec++ )
310 if ( slot->
library->lcd_filter_func )
327 for ( hh = height_org; hh > 0; hh--, line += pitch )
333 for ( xx = width_org; xx > 0; xx-- )
354 for ( hh = height_org; hh > 0; hh-- )
376 error =
FT_THROW( Invalid_Pixel_Size );
380 slot->
format = FT_GLYPH_FORMAT_BITMAP;
390 if ( have_outline_shifted )
392 if ( have_translated_origin )
414 return ft_smooth_render_generic( render, slot, mode, origin,
428 error = ft_smooth_render_generic( render, slot, mode, origin,
446 error = ft_smooth_render_generic( render, slot, mode, origin,
#define FT_ALLOC(ptr, size)
GLint GLint GLsizei GLsizei height
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_Error(* FT_Module_Constructor)(FT_Module module)
FT_BEGIN_HEADER typedef signed long FT_Pos
GLsizei const GLfloat * points
int write(int fd, const char *buf, int nbytes)
int read(int fd, char *buf, int nbytes)
#define FT_MEM_ZERO(dest, count)
smooth FT_Module_Constructor FT_GLYPH_FORMAT_OUTLINE
enum FT_Render_Mode_ FT_Render_Mode
return FT_THROW(Missing_Property)
#define FT_RASTER_FLAG_AA
GLint GLint GLsizei width
smooth FT_Module_Constructor FT_Renderer_RenderFunc FT_Renderer_TransformFunc FT_Renderer_GetCBoxFunc ft_smooth_get_cbox
#define FT_GLYPH_OWN_BITMAP
FT_BEGIN_HEADER typedef unsigned char FT_Bool
void(* FT_Renderer_GetCBoxFunc)(FT_Renderer renderer, FT_GlyphSlot slot, FT_BBox *cbox)
#define FT_ERROR(varformat)
#define FT_PAD_CEIL(x, n)
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
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
FT_DEFINE_RENDERER(ft_smooth_renderer_class, FT_MODULE_RENDERER, sizeof(FT_RendererRec), "smooth", 0x10000L, 0x20000L, 0,(FT_Module_Constructor) ft_smooth_init,(FT_Module_Destructor) 0,(FT_Module_Requester) 0, 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
GLsizei GLsizei GLenum GLenum const GLvoid * data
FT_Raster_SetModeFunc raster_set_mode
#define FT_MODULE_LIBRARY(x)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_Glyph_Format glyph_format
if(!abbox) return FT_THROW(Invalid_Argument)
GLenum const GLfloat * params
FT_Error(* FT_Renderer_SetModeFunc)(FT_Renderer renderer, FT_ULong mode_tag, FT_Pointer mode_ptr)
FT_Slot_Internal internal
#define FT_GRAYS_RASTER_GET
FT_Error(* FT_Renderer_TransformFunc)(FT_Renderer renderer, FT_GlyphSlot slot, const FT_Matrix *matrix, const FT_Vector *delta)
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
smooth FT_Module_Constructor FT_Module_Destructor
smooth FT_Module_Constructor FT_Module_Requester
FT_Renderer_Class * clazz
FT_Error(* FT_Renderer_RenderFunc)(FT_Renderer renderer, FT_GlyphSlot slot, FT_UInt mode, const FT_Vector *origin)