2000-07-02 02:27:53 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* ftsmooth.c */
|
|
|
|
/* */
|
|
|
|
/* Anti-aliasing renderer interface (body). */
|
|
|
|
/* */
|
2018-01-02 09:33:57 +01:00
|
|
|
/* Copyright 2000-2018 by */
|
2000-07-02 02:27:53 +02:00
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
|
|
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
|
|
|
/* this file you indicate that you have read the license and */
|
|
|
|
/* understand and accept it fully. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2000-12-08 17:17:16 +01:00
|
|
|
|
2000-12-08 03:42:29 +01:00
|
|
|
#include <ft2build.h>
|
2009-03-20 21:08:29 +01:00
|
|
|
#include FT_INTERNAL_DEBUG_H
|
2000-12-08 03:42:29 +01:00
|
|
|
#include FT_INTERNAL_OBJECTS_H
|
|
|
|
#include FT_OUTLINE_H
|
2001-03-20 12:14:24 +01:00
|
|
|
#include "ftsmooth.h"
|
|
|
|
#include "ftgrays.h"
|
2000-07-02 02:27:53 +02:00
|
|
|
|
Complete redesign of error codes. Please check ftmoderr.h for more
details.
* include/freetype/internal/cfferrs.h,
include/freetype/internal/tterrors.h,
include/freetype/internal/t1errors.h: Removed. Replaced with files
local to the module. All extra error codes have been moved to
`fterrors.h'.
* src/sfnt/ttpost.h: Move error codes to `fterrors.h'.
* src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h,
src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.h,
src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h,
src/smooth/ftsmerrs.h, src/truetype/tterrors.h,
src/type1/t1errors.h, src/winfonts/fnterrs.h: New files defining the
error names for the module it belongs to.
* include/freetype/ftmoderr.h: New file, defining the module error
offsets. Its structure is similar to `fterrors.h'.
* include/freetype/fterrors.h (FT_NOERRORDEF): New macro.
(FT_ERRORDEF): Redefined to use module error offsets.
All internal error codes are now public; unused error codes have
been removed, some are new.
* include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New
macro.
* include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro.
All other source files have been updated to use the new error codes;
some already existing (internal) error codes local to a module have
been renamed to give them the same name as in the base module.
All make files have been updated to include the local error files.
* src/cid/cidtokens.h: Replaced with...
* src/cid/cidtoken.h: This file for 8+3 consistency.
* src/raster/ftraster.c: Use macros for header file names.
2001-06-06 19:30:41 +02:00
|
|
|
#include "ftsmerrs.h"
|
|
|
|
|
2000-12-08 17:17:16 +01:00
|
|
|
|
2000-07-02 02:27:53 +02:00
|
|
|
/* initialize renderer -- init its raster */
|
2001-06-28 01:25:46 +02:00
|
|
|
static FT_Error
|
|
|
|
ft_smooth_init( FT_Renderer render )
|
2000-06-28 01:18:39 +02:00
|
|
|
{
|
2018-05-25 04:38:24 +02:00
|
|
|
|
|
|
|
#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
|
|
|
|
|
|
|
FT_Vector* sub = render->root.library->lcd_geometry;
|
|
|
|
|
|
|
|
|
|
|
|
/* set up default subpixel geometry for striped RGB panels. */
|
|
|
|
sub[0].x = -21;
|
|
|
|
sub[0].y = 0;
|
|
|
|
sub[1].x = 0;
|
|
|
|
sub[1].y = 0;
|
|
|
|
sub[2].x = 21;
|
|
|
|
sub[2].y = 0;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2017-05-14 21:57:27 +02:00
|
|
|
render->clazz->raster_class->raster_reset( render->raster, NULL, 0 );
|
2000-06-28 01:18:39 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2000-06-28 01:18:39 +02:00
|
|
|
|
2000-07-02 02:27:53 +02:00
|
|
|
/* sets render-specific mode */
|
2001-06-28 01:25:46 +02:00
|
|
|
static FT_Error
|
|
|
|
ft_smooth_set_mode( FT_Renderer render,
|
|
|
|
FT_ULong mode_tag,
|
|
|
|
FT_Pointer data )
|
2000-06-28 01:18:39 +02:00
|
|
|
{
|
|
|
|
/* we simply pass it to the raster */
|
2000-07-02 02:27:53 +02:00
|
|
|
return render->clazz->raster_class->raster_set_mode( render->raster,
|
|
|
|
mode_tag,
|
|
|
|
data );
|
2000-07-09 21:15:30 +02:00
|
|
|
}
|
2000-06-28 01:18:39 +02:00
|
|
|
|
2000-07-02 02:27:53 +02:00
|
|
|
/* transform a given glyph image */
|
2001-06-28 01:25:46 +02:00
|
|
|
static FT_Error
|
* include/freetype/ftimage.h (FT_Raster_RenderFunc),
include/freetype/ftrender.h (FT_Glyph_TransformFunc,
FT_Renderer_Render_Func, FT_Renderer_TransformFunc),
src/base/ftglyph.c (ft_outline_glyph_transform),
src/raster/ftrend1.c (ft_raster1_transform, ft_raster1_render),
src/smooth/ftgrays.c (FT_Outline_Decompose, gray_raster_render),
src/smooth/ftsmooth.c (ft_smooth_transform,
ft_smooth_render_generic, ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Decorate parameters with `const' where
appropriate.
* src/raster/ftraster.c (RASTER_RENDER_POOL): Removed. Obsolete.
(ft_black_render): Decorate parameters with `const' where
appropriate.
* src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT ->
FT_PEEK_USHORT) which caused crashes. Reported by Ismail Donmez
<ismail@kde.org.tr>.
2005-05-11 22:04:35 +02:00
|
|
|
ft_smooth_transform( FT_Renderer render,
|
|
|
|
FT_GlyphSlot slot,
|
|
|
|
const FT_Matrix* matrix,
|
|
|
|
const FT_Vector* delta )
|
2000-06-28 01:18:39 +02:00
|
|
|
{
|
2013-03-14 11:21:17 +01:00
|
|
|
FT_Error error = FT_Err_Ok;
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2000-07-02 02:27:53 +02:00
|
|
|
|
|
|
|
if ( slot->format != render->glyph_format )
|
2000-06-28 01:18:39 +02:00
|
|
|
{
|
2013-03-14 10:27:35 +01:00
|
|
|
error = FT_THROW( Invalid_Argument );
|
2000-06-28 01:18:39 +02:00
|
|
|
goto Exit;
|
|
|
|
}
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2000-07-02 02:27:53 +02:00
|
|
|
if ( matrix )
|
2000-06-28 01:18:39 +02:00
|
|
|
FT_Outline_Transform( &slot->outline, matrix );
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2000-07-02 02:27:53 +02:00
|
|
|
if ( delta )
|
2000-06-28 01:18:39 +02:00
|
|
|
FT_Outline_Translate( &slot->outline, delta->x, delta->y );
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2000-06-28 01:18:39 +02:00
|
|
|
Exit:
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
2000-07-02 02:27:53 +02:00
|
|
|
|
|
|
|
/* return the glyph's control box */
|
2001-06-28 01:25:46 +02:00
|
|
|
static void
|
|
|
|
ft_smooth_get_cbox( FT_Renderer render,
|
|
|
|
FT_GlyphSlot slot,
|
|
|
|
FT_BBox* cbox )
|
2000-06-28 01:18:39 +02:00
|
|
|
{
|
2016-09-28 19:10:52 +02:00
|
|
|
FT_ZERO( cbox );
|
2000-06-28 01:18:39 +02:00
|
|
|
|
2000-07-02 02:27:53 +02:00
|
|
|
if ( slot->format == render->glyph_format )
|
2000-06-28 01:18:39 +02:00
|
|
|
FT_Outline_Get_CBox( &slot->outline, cbox );
|
2000-07-09 21:15:30 +02:00
|
|
|
}
|
|
|
|
|
2000-06-28 01:18:39 +02:00
|
|
|
|
2000-07-02 02:27:53 +02:00
|
|
|
/* convert a slot's glyph image into a bitmap */
|
2001-06-28 01:25:46 +02:00
|
|
|
static FT_Error
|
* include/freetype/ftimage.h (FT_Raster_RenderFunc),
include/freetype/ftrender.h (FT_Glyph_TransformFunc,
FT_Renderer_Render_Func, FT_Renderer_TransformFunc),
src/base/ftglyph.c (ft_outline_glyph_transform),
src/raster/ftrend1.c (ft_raster1_transform, ft_raster1_render),
src/smooth/ftgrays.c (FT_Outline_Decompose, gray_raster_render),
src/smooth/ftsmooth.c (ft_smooth_transform,
ft_smooth_render_generic, ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Decorate parameters with `const' where
appropriate.
* src/raster/ftraster.c (RASTER_RENDER_POOL): Removed. Obsolete.
(ft_black_render): Decorate parameters with `const' where
appropriate.
* src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT ->
FT_PEEK_USHORT) which caused crashes. Reported by Ismail Donmez
<ismail@kde.org.tr>.
2005-05-11 22:04:35 +02:00
|
|
|
ft_smooth_render_generic( FT_Renderer render,
|
|
|
|
FT_GlyphSlot slot,
|
|
|
|
FT_Render_Mode mode,
|
|
|
|
const FT_Vector* origin,
|
2006-09-27 09:52:48 +02:00
|
|
|
FT_Render_Mode required_mode )
|
2000-06-28 01:18:39 +02:00
|
|
|
{
|
2017-09-29 04:59:31 +02:00
|
|
|
FT_Error error = FT_Err_Ok;
|
2014-11-01 03:12:37 +01:00
|
|
|
FT_Outline* outline = &slot->outline;
|
|
|
|
FT_Bitmap* bitmap = &slot->bitmap;
|
|
|
|
FT_Memory memory = render->root.memory;
|
|
|
|
FT_Pos x_shift = 0;
|
|
|
|
FT_Pos y_shift = 0;
|
2016-12-25 22:55:25 +01:00
|
|
|
FT_Int hmul = ( mode == FT_RENDER_MODE_LCD );
|
|
|
|
FT_Int vmul = ( mode == FT_RENDER_MODE_LCD_V );
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2000-06-28 01:18:39 +02:00
|
|
|
FT_Raster_Params params;
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2000-07-02 02:27:53 +02:00
|
|
|
|
2000-06-28 01:18:39 +02:00
|
|
|
/* check glyph image format */
|
2000-07-02 02:27:53 +02:00
|
|
|
if ( slot->format != render->glyph_format )
|
2000-06-28 01:18:39 +02:00
|
|
|
{
|
2013-03-14 10:27:35 +01:00
|
|
|
error = FT_THROW( Invalid_Argument );
|
2000-06-28 01:18:39 +02:00
|
|
|
goto Exit;
|
|
|
|
}
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2000-06-28 01:18:39 +02:00
|
|
|
/* check mode */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
if ( mode != required_mode )
|
2012-07-11 12:05:58 +02:00
|
|
|
{
|
2013-03-14 10:27:35 +01:00
|
|
|
error = FT_THROW( Cannot_Render_Glyph );
|
2012-07-11 12:05:58 +02:00
|
|
|
goto Exit;
|
|
|
|
}
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2014-10-30 04:45:23 +01:00
|
|
|
/* release old bitmap buffer */
|
|
|
|
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
|
|
|
|
{
|
|
|
|
FT_FREE( bitmap->buffer );
|
|
|
|
slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
|
|
|
|
}
|
2006-09-27 09:52:48 +02:00
|
|
|
|
2017-09-28 06:20:50 +02:00
|
|
|
ft_glyphslot_preset_bitmap( slot, mode, origin );
|
|
|
|
|
2014-10-30 04:45:23 +01:00
|
|
|
/* allocate new one */
|
2017-09-28 06:20:50 +02:00
|
|
|
if ( FT_ALLOC_MULT( bitmap->buffer, bitmap->rows, bitmap->pitch ) )
|
2000-06-28 01:18:39 +02:00
|
|
|
goto Exit;
|
|
|
|
|
2003-06-18 08:59:57 +02:00
|
|
|
slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2017-09-28 06:20:50 +02:00
|
|
|
x_shift = 64 * -slot->bitmap_left;
|
|
|
|
y_shift = 64 * -slot->bitmap_top;
|
|
|
|
if ( bitmap->pixel_mode == FT_PIXEL_MODE_LCD_V )
|
2017-09-30 20:28:58 +02:00
|
|
|
y_shift += 64 * (FT_Int)bitmap->rows / 3;
|
2017-09-28 06:20:50 +02:00
|
|
|
else
|
2017-09-30 20:28:58 +02:00
|
|
|
y_shift += 64 * (FT_Int)bitmap->rows;
|
2014-11-01 03:12:37 +01:00
|
|
|
|
2017-09-28 06:20:50 +02:00
|
|
|
if ( origin )
|
|
|
|
{
|
|
|
|
x_shift += origin->x;
|
|
|
|
y_shift += origin->y;
|
|
|
|
}
|
2014-11-01 03:12:37 +01:00
|
|
|
|
2014-10-30 04:45:23 +01:00
|
|
|
/* translate outline to render it into the bitmap */
|
2014-10-31 05:07:14 +01:00
|
|
|
if ( x_shift || y_shift )
|
|
|
|
FT_Outline_Translate( outline, x_shift, y_shift );
|
2014-10-30 04:45:23 +01:00
|
|
|
|
2000-06-28 01:18:39 +02:00
|
|
|
/* set up parameters */
|
|
|
|
params.target = bitmap;
|
|
|
|
params.source = outline;
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
params.flags = FT_RASTER_FLAG_AA;
|
|
|
|
|
CHANGES BETWEEN 2.2.1 and 2.2.2
I. IMPORTANT BUG FIXES
- Various integer overflows have been fixed.
- PFB fonts with MacOS resource fork weren't handled correctly on
non-MacOS platforms.
- The PCF font loarder has been seriously hardened against malformed
font files.
II. IMPORTANT CHANGES
- the unpatented hinter is now part of the default build of the
library, and we added code to automatically support "tricky"
fonts that need it.
what this means is that FreeType should "just work" with certain
Asian fonts, like MingLiu, which cannot properly load without a
bytecode interpreter, but fortunately do not use any of the
patented bytecode opcodes.
Note that the API didn't change, so you can still force
unpatented hinting with a special parameter to FT_Open_Face
as well.
if you're an embedded systems developer, you might want to
*disable* the feature to save code space by undefining
TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.
- LCD-optimized rendering is now disabled in all default builds
of the library, mainly due to patent reasons. For more information
see:
http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has
been introduced in ftoption.h; manually define it in this file
if you want to re-enable the feature.
the change only affects the implementation, not the FreeType API.
This means that clients don't need to be modified, because the
library still generates LCD decimated bitmaps, but with the added
constraint that R=G=B on each triplet.
- Some computation bugs in the TrueType bytecode interpreter were found,
which allow us to get rid of very subtle and rare differences we had
with the Windows renderer.
III. MISCELLANEOUS
- TrueType glyph loading is now about 25% faster.
- the anti-aliased rasterizer has been optimized and is now 15% to 25%
percent faster than the previous one, depending on content
- the Type 1 loader has been improved; as an example, it now skips
over top-level dictionaries properly
======================================================================
2006-09-26 18:58:21 +02:00
|
|
|
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
2006-09-26 23:55:44 +02:00
|
|
|
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* implode outline if needed */
|
|
|
|
{
|
2006-11-10 17:49:42 +01:00
|
|
|
FT_Vector* points = outline->points;
|
|
|
|
FT_Vector* points_end = points + outline->n_points;
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
FT_Vector* vec;
|
|
|
|
|
2002-09-05 17:10:54 +02:00
|
|
|
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
if ( hmul )
|
2006-11-10 17:49:42 +01:00
|
|
|
for ( vec = points; vec < points_end; vec++ )
|
2006-09-27 09:52:48 +02:00
|
|
|
vec->x *= 3;
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
|
|
|
if ( vmul )
|
2006-11-10 17:49:42 +01:00
|
|
|
for ( vec = points; vec < points_end; vec++ )
|
2006-09-27 09:52:48 +02:00
|
|
|
vec->y *= 3;
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
}
|
2000-06-28 01:18:39 +02:00
|
|
|
|
|
|
|
/* render outline into the bitmap */
|
|
|
|
error = render->raster_render( render->raster, ¶ms );
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
|
|
|
/* deflate outline if needed */
|
|
|
|
{
|
2006-11-10 17:49:42 +01:00
|
|
|
FT_Vector* points = outline->points;
|
|
|
|
FT_Vector* points_end = points + outline->n_points;
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
FT_Vector* vec;
|
|
|
|
|
2002-09-05 17:10:54 +02:00
|
|
|
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
if ( hmul )
|
2006-11-10 17:49:42 +01:00
|
|
|
for ( vec = points; vec < points_end; vec++ )
|
2006-09-27 09:52:48 +02:00
|
|
|
vec->x /= 3;
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
|
|
|
if ( vmul )
|
2006-11-10 17:49:42 +01:00
|
|
|
for ( vec = points; vec < points_end; vec++ )
|
2006-09-27 09:52:48 +02:00
|
|
|
vec->y /= 3;
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
}
|
2006-09-26 23:55:44 +02:00
|
|
|
|
2012-07-11 12:05:58 +02:00
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
|
|
|
|
2017-09-28 06:20:50 +02:00
|
|
|
/* finally apply filtering */
|
|
|
|
if ( hmul || vmul )
|
|
|
|
{
|
|
|
|
FT_Byte* lcd_weights;
|
|
|
|
FT_Bitmap_LcdFilterFunc lcd_filter_func;
|
|
|
|
|
|
|
|
|
|
|
|
/* Per-face LCD filtering takes priority if set up. */
|
|
|
|
if ( slot->face && slot->face->internal->lcd_filter_func )
|
|
|
|
{
|
|
|
|
lcd_weights = slot->face->internal->lcd_weights;
|
|
|
|
lcd_filter_func = slot->face->internal->lcd_filter_func;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
lcd_weights = slot->library->lcd_weights;
|
|
|
|
lcd_filter_func = slot->library->lcd_filter_func;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( lcd_filter_func )
|
|
|
|
lcd_filter_func( bitmap, mode, lcd_weights );
|
|
|
|
}
|
2006-09-27 09:52:48 +02:00
|
|
|
|
CHANGES BETWEEN 2.2.1 and 2.2.2
I. IMPORTANT BUG FIXES
- Various integer overflows have been fixed.
- PFB fonts with MacOS resource fork weren't handled correctly on
non-MacOS platforms.
- The PCF font loarder has been seriously hardened against malformed
font files.
II. IMPORTANT CHANGES
- the unpatented hinter is now part of the default build of the
library, and we added code to automatically support "tricky"
fonts that need it.
what this means is that FreeType should "just work" with certain
Asian fonts, like MingLiu, which cannot properly load without a
bytecode interpreter, but fortunately do not use any of the
patented bytecode opcodes.
Note that the API didn't change, so you can still force
unpatented hinting with a special parameter to FT_Open_Face
as well.
if you're an embedded systems developer, you might want to
*disable* the feature to save code space by undefining
TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.
- LCD-optimized rendering is now disabled in all default builds
of the library, mainly due to patent reasons. For more information
see:
http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has
been introduced in ftoption.h; manually define it in this file
if you want to re-enable the feature.
the change only affects the implementation, not the FreeType API.
This means that clients don't need to be modified, because the
library still generates LCD decimated bitmaps, but with the added
constraint that R=G=B on each triplet.
- Some computation bugs in the TrueType bytecode interpreter were found,
which allow us to get rid of very subtle and rare differences we had
with the Windows renderer.
III. MISCELLANEOUS
- TrueType glyph loading is now about 25% faster.
- the anti-aliased rasterizer has been optimized and is now 15% to 25%
percent faster than the previous one, depending on content
- the Type 1 loader has been improved; as an example, it now skips
over top-level dictionaries properly
======================================================================
2006-09-26 18:58:21 +02:00
|
|
|
#else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
|
2006-09-26 23:55:44 +02:00
|
|
|
|
2017-03-09 06:08:38 +01:00
|
|
|
if ( hmul ) /* lcd */
|
CHANGES BETWEEN 2.2.1 and 2.2.2
I. IMPORTANT BUG FIXES
- Various integer overflows have been fixed.
- PFB fonts with MacOS resource fork weren't handled correctly on
non-MacOS platforms.
- The PCF font loarder has been seriously hardened against malformed
font files.
II. IMPORTANT CHANGES
- the unpatented hinter is now part of the default build of the
library, and we added code to automatically support "tricky"
fonts that need it.
what this means is that FreeType should "just work" with certain
Asian fonts, like MingLiu, which cannot properly load without a
bytecode interpreter, but fortunately do not use any of the
patented bytecode opcodes.
Note that the API didn't change, so you can still force
unpatented hinting with a special parameter to FT_Open_Face
as well.
if you're an embedded systems developer, you might want to
*disable* the feature to save code space by undefining
TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.
- LCD-optimized rendering is now disabled in all default builds
of the library, mainly due to patent reasons. For more information
see:
http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has
been introduced in ftoption.h; manually define it in this file
if you want to re-enable the feature.
the change only affects the implementation, not the FreeType API.
This means that clients don't need to be modified, because the
library still generates LCD decimated bitmaps, but with the added
constraint that R=G=B on each triplet.
- Some computation bugs in the TrueType bytecode interpreter were found,
which allow us to get rid of very subtle and rare differences we had
with the Windows renderer.
III. MISCELLANEOUS
- TrueType glyph loading is now about 25% faster.
- the anti-aliased rasterizer has been optimized and is now 15% to 25%
percent faster than the previous one, depending on content
- the Type 1 loader has been improved; as an example, it now skips
over top-level dictionaries properly
======================================================================
2006-09-26 18:58:21 +02:00
|
|
|
{
|
2017-03-09 06:08:38 +01:00
|
|
|
FT_Byte* line;
|
2017-12-07 14:49:03 +01:00
|
|
|
FT_Byte* temp = NULL;
|
2017-10-05 14:26:33 +02:00
|
|
|
FT_UInt i, j;
|
CHANGES BETWEEN 2.2.1 and 2.2.2
I. IMPORTANT BUG FIXES
- Various integer overflows have been fixed.
- PFB fonts with MacOS resource fork weren't handled correctly on
non-MacOS platforms.
- The PCF font loarder has been seriously hardened against malformed
font files.
II. IMPORTANT CHANGES
- the unpatented hinter is now part of the default build of the
library, and we added code to automatically support "tricky"
fonts that need it.
what this means is that FreeType should "just work" with certain
Asian fonts, like MingLiu, which cannot properly load without a
bytecode interpreter, but fortunately do not use any of the
patented bytecode opcodes.
Note that the API didn't change, so you can still force
unpatented hinting with a special parameter to FT_Open_Face
as well.
if you're an embedded systems developer, you might want to
*disable* the feature to save code space by undefining
TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.
- LCD-optimized rendering is now disabled in all default builds
of the library, mainly due to patent reasons. For more information
see:
http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has
been introduced in ftoption.h; manually define it in this file
if you want to re-enable the feature.
the change only affects the implementation, not the FreeType API.
This means that clients don't need to be modified, because the
library still generates LCD decimated bitmaps, but with the added
constraint that R=G=B on each triplet.
- Some computation bugs in the TrueType bytecode interpreter were found,
which allow us to get rid of very subtle and rare differences we had
with the Windows renderer.
III. MISCELLANEOUS
- TrueType glyph loading is now about 25% faster.
- the anti-aliased rasterizer has been optimized and is now 15% to 25%
percent faster than the previous one, depending on content
- the Type 1 loader has been improved; as an example, it now skips
over top-level dictionaries properly
======================================================================
2006-09-26 18:58:21 +02:00
|
|
|
|
2017-10-01 09:23:42 +02:00
|
|
|
unsigned int height = bitmap->rows;
|
|
|
|
unsigned int width = bitmap->width;
|
|
|
|
int pitch = bitmap->pitch;
|
2017-09-28 06:20:50 +02:00
|
|
|
|
2018-05-25 04:38:24 +02:00
|
|
|
FT_Vector* sub = slot->library->lcd_geometry;
|
* Version 2.8.1 released.
=========================
Tag sources with `VER-2-8-1'.
* docs/VERSION.TXT: Add entry for version 2.8.1.
* docs/CHANGES: Updated.
* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.8/2.8.1/, s/28/281/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
* builds/unix/configure.raw (version_info): Set to 21:0:15.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
2017-09-16 19:08:17 +02:00
|
|
|
|
2006-09-26 23:55:44 +02:00
|
|
|
|
2018-05-25 04:38:24 +02:00
|
|
|
/* Render 3 separate monochrome bitmaps, shifting the outline. */
|
|
|
|
width /= 3;
|
CHANGES BETWEEN 2.2.1 and 2.2.2
I. IMPORTANT BUG FIXES
- Various integer overflows have been fixed.
- PFB fonts with MacOS resource fork weren't handled correctly on
non-MacOS platforms.
- The PCF font loarder has been seriously hardened against malformed
font files.
II. IMPORTANT CHANGES
- the unpatented hinter is now part of the default build of the
library, and we added code to automatically support "tricky"
fonts that need it.
what this means is that FreeType should "just work" with certain
Asian fonts, like MingLiu, which cannot properly load without a
bytecode interpreter, but fortunately do not use any of the
patented bytecode opcodes.
Note that the API didn't change, so you can still force
unpatented hinting with a special parameter to FT_Open_Face
as well.
if you're an embedded systems developer, you might want to
*disable* the feature to save code space by undefining
TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.
- LCD-optimized rendering is now disabled in all default builds
of the library, mainly due to patent reasons. For more information
see:
http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has
been introduced in ftoption.h; manually define it in this file
if you want to re-enable the feature.
the change only affects the implementation, not the FreeType API.
This means that clients don't need to be modified, because the
library still generates LCD decimated bitmaps, but with the added
constraint that R=G=B on each triplet.
- Some computation bugs in the TrueType bytecode interpreter were found,
which allow us to get rid of very subtle and rare differences we had
with the Windows renderer.
III. MISCELLANEOUS
- TrueType glyph loading is now about 25% faster.
- the anti-aliased rasterizer has been optimized and is now 15% to 25%
percent faster than the previous one, depending on content
- the Type 1 loader has been improved; as an example, it now skips
over top-level dictionaries properly
======================================================================
2006-09-26 18:58:21 +02:00
|
|
|
|
2018-05-25 04:38:24 +02:00
|
|
|
FT_Outline_Translate( outline, -sub[0].x, -sub[0].y );
|
2017-03-09 06:08:38 +01:00
|
|
|
error = render->raster_render( render->raster, ¶ms );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
2006-09-26 23:55:44 +02:00
|
|
|
|
2017-03-09 06:08:38 +01:00
|
|
|
bitmap->buffer += width;
|
2018-05-25 04:38:24 +02:00
|
|
|
FT_Outline_Translate( outline, sub[0].x - sub[1].x, sub[0].y - sub[1].y );
|
2017-03-09 06:08:38 +01:00
|
|
|
error = render->raster_render( render->raster, ¶ms );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
CHANGES BETWEEN 2.2.1 and 2.2.2
I. IMPORTANT BUG FIXES
- Various integer overflows have been fixed.
- PFB fonts with MacOS resource fork weren't handled correctly on
non-MacOS platforms.
- The PCF font loarder has been seriously hardened against malformed
font files.
II. IMPORTANT CHANGES
- the unpatented hinter is now part of the default build of the
library, and we added code to automatically support "tricky"
fonts that need it.
what this means is that FreeType should "just work" with certain
Asian fonts, like MingLiu, which cannot properly load without a
bytecode interpreter, but fortunately do not use any of the
patented bytecode opcodes.
Note that the API didn't change, so you can still force
unpatented hinting with a special parameter to FT_Open_Face
as well.
if you're an embedded systems developer, you might want to
*disable* the feature to save code space by undefining
TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.
- LCD-optimized rendering is now disabled in all default builds
of the library, mainly due to patent reasons. For more information
see:
http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has
been introduced in ftoption.h; manually define it in this file
if you want to re-enable the feature.
the change only affects the implementation, not the FreeType API.
This means that clients don't need to be modified, because the
library still generates LCD decimated bitmaps, but with the added
constraint that R=G=B on each triplet.
- Some computation bugs in the TrueType bytecode interpreter were found,
which allow us to get rid of very subtle and rare differences we had
with the Windows renderer.
III. MISCELLANEOUS
- TrueType glyph loading is now about 25% faster.
- the anti-aliased rasterizer has been optimized and is now 15% to 25%
percent faster than the previous one, depending on content
- the Type 1 loader has been improved; as an example, it now skips
over top-level dictionaries properly
======================================================================
2006-09-26 18:58:21 +02:00
|
|
|
|
2018-05-25 04:38:24 +02:00
|
|
|
bitmap->buffer += width;
|
|
|
|
FT_Outline_Translate( outline, sub[1].x - sub[2].x, sub[1].y - sub[2].y );
|
2017-03-09 06:08:38 +01:00
|
|
|
error = render->raster_render( render->raster, ¶ms );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
|
|
|
|
2018-05-25 04:38:24 +02:00
|
|
|
x_shift -= sub[2].x;
|
|
|
|
y_shift -= sub[2].y;
|
|
|
|
bitmap->buffer -= 2 * width;
|
|
|
|
|
2017-03-09 06:08:38 +01:00
|
|
|
/* XXX: Rearrange the bytes according to FT_PIXEL_MODE_LCD. */
|
|
|
|
/* XXX: It is more efficient to render every third byte above. */
|
|
|
|
|
|
|
|
if ( FT_ALLOC( temp, (FT_ULong)pitch ) )
|
|
|
|
goto Exit;
|
|
|
|
|
|
|
|
for ( i = 0; i < height; i++ )
|
|
|
|
{
|
2017-10-05 14:26:33 +02:00
|
|
|
line = bitmap->buffer + i * (FT_ULong)pitch;
|
2017-03-09 06:08:38 +01:00
|
|
|
for ( j = 0; j < width; j++ )
|
|
|
|
{
|
|
|
|
temp[3 * j ] = line[j];
|
|
|
|
temp[3 * j + 1] = line[j + width];
|
|
|
|
temp[3 * j + 2] = line[j + width + width];
|
CHANGES BETWEEN 2.2.1 and 2.2.2
I. IMPORTANT BUG FIXES
- Various integer overflows have been fixed.
- PFB fonts with MacOS resource fork weren't handled correctly on
non-MacOS platforms.
- The PCF font loarder has been seriously hardened against malformed
font files.
II. IMPORTANT CHANGES
- the unpatented hinter is now part of the default build of the
library, and we added code to automatically support "tricky"
fonts that need it.
what this means is that FreeType should "just work" with certain
Asian fonts, like MingLiu, which cannot properly load without a
bytecode interpreter, but fortunately do not use any of the
patented bytecode opcodes.
Note that the API didn't change, so you can still force
unpatented hinting with a special parameter to FT_Open_Face
as well.
if you're an embedded systems developer, you might want to
*disable* the feature to save code space by undefining
TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.
- LCD-optimized rendering is now disabled in all default builds
of the library, mainly due to patent reasons. For more information
see:
http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has
been introduced in ftoption.h; manually define it in this file
if you want to re-enable the feature.
the change only affects the implementation, not the FreeType API.
This means that clients don't need to be modified, because the
library still generates LCD decimated bitmaps, but with the added
constraint that R=G=B on each triplet.
- Some computation bugs in the TrueType bytecode interpreter were found,
which allow us to get rid of very subtle and rare differences we had
with the Windows renderer.
III. MISCELLANEOUS
- TrueType glyph loading is now about 25% faster.
- the anti-aliased rasterizer has been optimized and is now 15% to 25%
percent faster than the previous one, depending on content
- the Type 1 loader has been improved; as an example, it now skips
over top-level dictionaries properly
======================================================================
2006-09-26 18:58:21 +02:00
|
|
|
}
|
2017-03-09 06:08:38 +01:00
|
|
|
FT_MEM_COPY( line, temp, pitch );
|
CHANGES BETWEEN 2.2.1 and 2.2.2
I. IMPORTANT BUG FIXES
- Various integer overflows have been fixed.
- PFB fonts with MacOS resource fork weren't handled correctly on
non-MacOS platforms.
- The PCF font loarder has been seriously hardened against malformed
font files.
II. IMPORTANT CHANGES
- the unpatented hinter is now part of the default build of the
library, and we added code to automatically support "tricky"
fonts that need it.
what this means is that FreeType should "just work" with certain
Asian fonts, like MingLiu, which cannot properly load without a
bytecode interpreter, but fortunately do not use any of the
patented bytecode opcodes.
Note that the API didn't change, so you can still force
unpatented hinting with a special parameter to FT_Open_Face
as well.
if you're an embedded systems developer, you might want to
*disable* the feature to save code space by undefining
TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.
- LCD-optimized rendering is now disabled in all default builds
of the library, mainly due to patent reasons. For more information
see:
http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has
been introduced in ftoption.h; manually define it in this file
if you want to re-enable the feature.
the change only affects the implementation, not the FreeType API.
This means that clients don't need to be modified, because the
library still generates LCD decimated bitmaps, but with the added
constraint that R=G=B on each triplet.
- Some computation bugs in the TrueType bytecode interpreter were found,
which allow us to get rid of very subtle and rare differences we had
with the Windows renderer.
III. MISCELLANEOUS
- TrueType glyph loading is now about 25% faster.
- the anti-aliased rasterizer has been optimized and is now 15% to 25%
percent faster than the previous one, depending on content
- the Type 1 loader has been improved; as an example, it now skips
over top-level dictionaries properly
======================================================================
2006-09-26 18:58:21 +02:00
|
|
|
}
|
|
|
|
|
2017-03-09 06:08:38 +01:00
|
|
|
FT_FREE( temp );
|
|
|
|
}
|
|
|
|
else if ( vmul ) /* lcd_v */
|
CHANGES BETWEEN 2.2.1 and 2.2.2
I. IMPORTANT BUG FIXES
- Various integer overflows have been fixed.
- PFB fonts with MacOS resource fork weren't handled correctly on
non-MacOS platforms.
- The PCF font loarder has been seriously hardened against malformed
font files.
II. IMPORTANT CHANGES
- the unpatented hinter is now part of the default build of the
library, and we added code to automatically support "tricky"
fonts that need it.
what this means is that FreeType should "just work" with certain
Asian fonts, like MingLiu, which cannot properly load without a
bytecode interpreter, but fortunately do not use any of the
patented bytecode opcodes.
Note that the API didn't change, so you can still force
unpatented hinting with a special parameter to FT_Open_Face
as well.
if you're an embedded systems developer, you might want to
*disable* the feature to save code space by undefining
TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.
- LCD-optimized rendering is now disabled in all default builds
of the library, mainly due to patent reasons. For more information
see:
http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has
been introduced in ftoption.h; manually define it in this file
if you want to re-enable the feature.
the change only affects the implementation, not the FreeType API.
This means that clients don't need to be modified, because the
library still generates LCD decimated bitmaps, but with the added
constraint that R=G=B on each triplet.
- Some computation bugs in the TrueType bytecode interpreter were found,
which allow us to get rid of very subtle and rare differences we had
with the Windows renderer.
III. MISCELLANEOUS
- TrueType glyph loading is now about 25% faster.
- the anti-aliased rasterizer has been optimized and is now 15% to 25%
percent faster than the previous one, depending on content
- the Type 1 loader has been improved; as an example, it now skips
over top-level dictionaries properly
======================================================================
2006-09-26 18:58:21 +02:00
|
|
|
{
|
2017-10-01 09:23:42 +02:00
|
|
|
int pitch = bitmap->pitch;
|
2017-09-28 06:20:50 +02:00
|
|
|
|
2018-05-25 04:38:24 +02:00
|
|
|
FT_Vector* sub = slot->library->lcd_geometry;
|
2017-09-28 06:20:50 +02:00
|
|
|
|
2018-05-25 04:38:24 +02:00
|
|
|
|
|
|
|
/* Render 3 separate monochrome bitmaps, shifting the outline. */
|
|
|
|
/* Notice that the subpixel geometry vectors are rotated. */
|
|
|
|
/* Triple the pitch to render on each third row. */
|
2017-03-09 06:08:38 +01:00
|
|
|
bitmap->pitch *= 3;
|
|
|
|
bitmap->rows /= 3;
|
2006-09-26 23:55:44 +02:00
|
|
|
|
2018-05-25 04:38:24 +02:00
|
|
|
FT_Outline_Translate( outline, -sub[0].y, sub[0].x );
|
2017-03-09 06:08:38 +01:00
|
|
|
error = render->raster_render( render->raster, ¶ms );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
CHANGES BETWEEN 2.2.1 and 2.2.2
I. IMPORTANT BUG FIXES
- Various integer overflows have been fixed.
- PFB fonts with MacOS resource fork weren't handled correctly on
non-MacOS platforms.
- The PCF font loarder has been seriously hardened against malformed
font files.
II. IMPORTANT CHANGES
- the unpatented hinter is now part of the default build of the
library, and we added code to automatically support "tricky"
fonts that need it.
what this means is that FreeType should "just work" with certain
Asian fonts, like MingLiu, which cannot properly load without a
bytecode interpreter, but fortunately do not use any of the
patented bytecode opcodes.
Note that the API didn't change, so you can still force
unpatented hinting with a special parameter to FT_Open_Face
as well.
if you're an embedded systems developer, you might want to
*disable* the feature to save code space by undefining
TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.
- LCD-optimized rendering is now disabled in all default builds
of the library, mainly due to patent reasons. For more information
see:
http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has
been introduced in ftoption.h; manually define it in this file
if you want to re-enable the feature.
the change only affects the implementation, not the FreeType API.
This means that clients don't need to be modified, because the
library still generates LCD decimated bitmaps, but with the added
constraint that R=G=B on each triplet.
- Some computation bugs in the TrueType bytecode interpreter were found,
which allow us to get rid of very subtle and rare differences we had
with the Windows renderer.
III. MISCELLANEOUS
- TrueType glyph loading is now about 25% faster.
- the anti-aliased rasterizer has been optimized and is now 15% to 25%
percent faster than the previous one, depending on content
- the Type 1 loader has been improved; as an example, it now skips
over top-level dictionaries properly
======================================================================
2006-09-26 18:58:21 +02:00
|
|
|
|
2017-09-29 04:59:31 +02:00
|
|
|
bitmap->buffer += pitch;
|
2018-05-25 04:38:24 +02:00
|
|
|
FT_Outline_Translate( outline, sub[0].y - sub[1].y, sub[1].x - sub[0].x );
|
2017-03-09 06:08:38 +01:00
|
|
|
error = render->raster_render( render->raster, ¶ms );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
|
|
|
|
2018-05-25 04:38:24 +02:00
|
|
|
bitmap->buffer += pitch;
|
|
|
|
FT_Outline_Translate( outline, sub[1].y - sub[2].y, sub[2].x - sub[1].x );
|
2017-03-09 06:08:38 +01:00
|
|
|
error = render->raster_render( render->raster, ¶ms );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
|
|
|
|
2018-05-25 04:38:24 +02:00
|
|
|
x_shift -= sub[2].y;
|
|
|
|
y_shift += sub[2].x;
|
|
|
|
bitmap->buffer -= 2 * pitch;
|
|
|
|
|
2017-03-09 06:08:38 +01:00
|
|
|
bitmap->pitch /= 3;
|
|
|
|
bitmap->rows *= 3;
|
|
|
|
}
|
|
|
|
else /* grayscale */
|
|
|
|
error = render->raster_render( render->raster, ¶ms );
|
CHANGES BETWEEN 2.2.1 and 2.2.2
I. IMPORTANT BUG FIXES
- Various integer overflows have been fixed.
- PFB fonts with MacOS resource fork weren't handled correctly on
non-MacOS platforms.
- The PCF font loarder has been seriously hardened against malformed
font files.
II. IMPORTANT CHANGES
- the unpatented hinter is now part of the default build of the
library, and we added code to automatically support "tricky"
fonts that need it.
what this means is that FreeType should "just work" with certain
Asian fonts, like MingLiu, which cannot properly load without a
bytecode interpreter, but fortunately do not use any of the
patented bytecode opcodes.
Note that the API didn't change, so you can still force
unpatented hinting with a special parameter to FT_Open_Face
as well.
if you're an embedded systems developer, you might want to
*disable* the feature to save code space by undefining
TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.
- LCD-optimized rendering is now disabled in all default builds
of the library, mainly due to patent reasons. For more information
see:
http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
a new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has
been introduced in ftoption.h; manually define it in this file
if you want to re-enable the feature.
the change only affects the implementation, not the FreeType API.
This means that clients don't need to be modified, because the
library still generates LCD decimated bitmaps, but with the added
constraint that R=G=B on each triplet.
- Some computation bugs in the TrueType bytecode interpreter were found,
which allow us to get rid of very subtle and rare differences we had
with the Windows renderer.
III. MISCELLANEOUS
- TrueType glyph loading is now about 25% faster.
- the anti-aliased rasterizer has been optimized and is now 15% to 25%
percent faster than the previous one, depending on content
- the Type 1 loader has been improved; as an example, it now skips
over top-level dictionaries properly
======================================================================
2006-09-26 18:58:21 +02:00
|
|
|
|
|
|
|
#endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
2000-06-28 01:18:39 +02:00
|
|
|
Exit:
|
2017-09-29 04:59:31 +02:00
|
|
|
if ( !error )
|
2017-10-01 09:23:42 +02:00
|
|
|
{
|
2017-09-29 04:59:31 +02:00
|
|
|
/* everything is fine; the glyph is now officially a bitmap */
|
|
|
|
slot->format = FT_GLYPH_FORMAT_BITMAP;
|
2017-10-01 09:23:42 +02:00
|
|
|
}
|
2017-09-29 04:59:31 +02:00
|
|
|
else if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
|
2012-07-11 12:05:58 +02:00
|
|
|
{
|
|
|
|
FT_FREE( bitmap->buffer );
|
|
|
|
slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
|
|
|
|
}
|
2001-12-05 18:24:34 +01:00
|
|
|
|
2017-09-29 04:59:31 +02:00
|
|
|
if ( x_shift || y_shift )
|
|
|
|
FT_Outline_Translate( outline, -x_shift, -y_shift );
|
|
|
|
|
2000-06-28 01:18:39 +02:00
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
/* convert a slot's glyph image into a bitmap */
|
|
|
|
static FT_Error
|
* include/freetype/ftimage.h (FT_Raster_RenderFunc),
include/freetype/ftrender.h (FT_Glyph_TransformFunc,
FT_Renderer_Render_Func, FT_Renderer_TransformFunc),
src/base/ftglyph.c (ft_outline_glyph_transform),
src/raster/ftrend1.c (ft_raster1_transform, ft_raster1_render),
src/smooth/ftgrays.c (FT_Outline_Decompose, gray_raster_render),
src/smooth/ftsmooth.c (ft_smooth_transform,
ft_smooth_render_generic, ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Decorate parameters with `const' where
appropriate.
* src/raster/ftraster.c (RASTER_RENDER_POOL): Removed. Obsolete.
(ft_black_render): Decorate parameters with `const' where
appropriate.
* src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT ->
FT_PEEK_USHORT) which caused crashes. Reported by Ismail Donmez
<ismail@kde.org.tr>.
2005-05-11 22:04:35 +02:00
|
|
|
ft_smooth_render( FT_Renderer render,
|
|
|
|
FT_GlyphSlot slot,
|
|
|
|
FT_Render_Mode mode,
|
|
|
|
const FT_Vector* origin )
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
{
|
2017-05-02 12:32:19 +02:00
|
|
|
if ( mode == FT_RENDER_MODE_LIGHT )
|
2004-02-19 22:39:58 +01:00
|
|
|
mode = FT_RENDER_MODE_NORMAL;
|
|
|
|
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
return ft_smooth_render_generic( render, slot, mode, origin,
|
2006-09-27 09:52:48 +02:00
|
|
|
FT_RENDER_MODE_NORMAL );
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* convert a slot's glyph image into a horizontal LCD bitmap */
|
|
|
|
static FT_Error
|
* include/freetype/ftimage.h (FT_Raster_RenderFunc),
include/freetype/ftrender.h (FT_Glyph_TransformFunc,
FT_Renderer_Render_Func, FT_Renderer_TransformFunc),
src/base/ftglyph.c (ft_outline_glyph_transform),
src/raster/ftrend1.c (ft_raster1_transform, ft_raster1_render),
src/smooth/ftgrays.c (FT_Outline_Decompose, gray_raster_render),
src/smooth/ftsmooth.c (ft_smooth_transform,
ft_smooth_render_generic, ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Decorate parameters with `const' where
appropriate.
* src/raster/ftraster.c (RASTER_RENDER_POOL): Removed. Obsolete.
(ft_black_render): Decorate parameters with `const' where
appropriate.
* src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT ->
FT_PEEK_USHORT) which caused crashes. Reported by Ismail Donmez
<ismail@kde.org.tr>.
2005-05-11 22:04:35 +02:00
|
|
|
ft_smooth_render_lcd( FT_Renderer render,
|
|
|
|
FT_GlyphSlot slot,
|
|
|
|
FT_Render_Mode mode,
|
|
|
|
const FT_Vector* origin )
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
{
|
2017-09-28 06:20:50 +02:00
|
|
|
return ft_smooth_render_generic( render, slot, mode, origin,
|
|
|
|
FT_RENDER_MODE_LCD );
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* convert a slot's glyph image into a vertical LCD bitmap */
|
|
|
|
static FT_Error
|
* include/freetype/ftimage.h (FT_Raster_RenderFunc),
include/freetype/ftrender.h (FT_Glyph_TransformFunc,
FT_Renderer_Render_Func, FT_Renderer_TransformFunc),
src/base/ftglyph.c (ft_outline_glyph_transform),
src/raster/ftrend1.c (ft_raster1_transform, ft_raster1_render),
src/smooth/ftgrays.c (FT_Outline_Decompose, gray_raster_render),
src/smooth/ftsmooth.c (ft_smooth_transform,
ft_smooth_render_generic, ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Decorate parameters with `const' where
appropriate.
* src/raster/ftraster.c (RASTER_RENDER_POOL): Removed. Obsolete.
(ft_black_render): Decorate parameters with `const' where
appropriate.
* src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT ->
FT_PEEK_USHORT) which caused crashes. Reported by Ismail Donmez
<ismail@kde.org.tr>.
2005-05-11 22:04:35 +02:00
|
|
|
ft_smooth_render_lcd_v( FT_Renderer render,
|
|
|
|
FT_GlyphSlot slot,
|
|
|
|
FT_Render_Mode mode,
|
|
|
|
const FT_Vector* origin )
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
{
|
2017-09-28 06:20:50 +02:00
|
|
|
return ft_smooth_render_generic( render, slot, mode, origin,
|
|
|
|
FT_RENDER_MODE_LCD_V );
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-09-17 17:12:50 +02:00
|
|
|
FT_DEFINE_RENDERER(
|
|
|
|
ft_smooth_renderer_class,
|
2009-04-05 17:14:04 +02:00
|
|
|
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_RENDERER,
|
2011-11-30 10:46:53 +01:00
|
|
|
sizeof ( FT_RendererRec ),
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2000-06-28 01:18:39 +02:00
|
|
|
"smooth",
|
2000-07-02 02:27:53 +02:00
|
|
|
0x10000L,
|
|
|
|
0x20000L,
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2016-09-17 17:12:50 +02:00
|
|
|
NULL, /* module specific interface */
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2016-09-17 17:12:50 +02:00
|
|
|
(FT_Module_Constructor)ft_smooth_init, /* module_init */
|
|
|
|
(FT_Module_Destructor) NULL, /* module_done */
|
|
|
|
(FT_Module_Requester) NULL, /* get_interface */
|
2000-06-28 01:18:39 +02:00
|
|
|
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
FT_GLYPH_FORMAT_OUTLINE,
|
|
|
|
|
2016-09-17 17:12:50 +02:00
|
|
|
(FT_Renderer_RenderFunc) ft_smooth_render, /* render_glyph */
|
|
|
|
(FT_Renderer_TransformFunc)ft_smooth_transform, /* transform_glyph */
|
|
|
|
(FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox, /* get_glyph_cbox */
|
|
|
|
(FT_Renderer_SetModeFunc) ft_smooth_set_mode, /* set_mode */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
Remove FT_CONFIG_OPTION_PIC and related code.
*/* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this
preprocessor symbol.
*/*: Replace `XXX_GET' macros (which could be either a function in
PIC mode or an array in non-PIC mode) with `xxx' arrays.
* include/freetype/internal/ftpic.h, src/autofit/afpic.c,
src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h,
src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h,
src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c,
src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h,
src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c,
src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h:
Removed.
2018-05-02 20:27:48 +02:00
|
|
|
(FT_Raster_Funcs*)&ft_grays_raster /* raster_class */
|
2009-04-05 17:14:04 +02:00
|
|
|
)
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
|
|
|
|
2016-09-17 17:12:50 +02:00
|
|
|
FT_DEFINE_RENDERER(
|
|
|
|
ft_smooth_lcd_renderer_class,
|
2012-01-16 18:00:24 +01:00
|
|
|
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_RENDERER,
|
2011-11-30 10:46:53 +01:00
|
|
|
sizeof ( FT_RendererRec ),
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
|
|
|
"smooth-lcd",
|
|
|
|
0x10000L,
|
|
|
|
0x20000L,
|
|
|
|
|
2016-09-17 17:12:50 +02:00
|
|
|
NULL, /* module specific interface */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
2016-09-17 17:12:50 +02:00
|
|
|
(FT_Module_Constructor)ft_smooth_init, /* module_init */
|
|
|
|
(FT_Module_Destructor) NULL, /* module_done */
|
|
|
|
(FT_Module_Requester) NULL, /* get_interface */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
|
|
|
FT_GLYPH_FORMAT_OUTLINE,
|
|
|
|
|
2016-09-17 17:12:50 +02:00
|
|
|
(FT_Renderer_RenderFunc) ft_smooth_render_lcd, /* render_glyph */
|
|
|
|
(FT_Renderer_TransformFunc)ft_smooth_transform, /* transform_glyph */
|
|
|
|
(FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox, /* get_glyph_cbox */
|
|
|
|
(FT_Renderer_SetModeFunc) ft_smooth_set_mode, /* set_mode */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
Remove FT_CONFIG_OPTION_PIC and related code.
*/* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this
preprocessor symbol.
*/*: Replace `XXX_GET' macros (which could be either a function in
PIC mode or an array in non-PIC mode) with `xxx' arrays.
* include/freetype/internal/ftpic.h, src/autofit/afpic.c,
src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h,
src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h,
src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c,
src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h,
src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c,
src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h:
Removed.
2018-05-02 20:27:48 +02:00
|
|
|
(FT_Raster_Funcs*)&ft_grays_raster /* raster_class */
|
2009-04-05 17:14:04 +02:00
|
|
|
)
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
2016-09-17 17:12:50 +02:00
|
|
|
|
|
|
|
FT_DEFINE_RENDERER(
|
|
|
|
ft_smooth_lcdv_renderer_class,
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
* include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.
* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 12:42:27 +02:00
|
|
|
FT_MODULE_RENDERER,
|
2011-11-30 10:46:53 +01:00
|
|
|
sizeof ( FT_RendererRec ),
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
|
|
|
"smooth-lcdv",
|
|
|
|
0x10000L,
|
|
|
|
0x20000L,
|
|
|
|
|
2016-09-17 17:12:50 +02:00
|
|
|
NULL, /* module specific interface */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
2016-09-17 17:12:50 +02:00
|
|
|
(FT_Module_Constructor)ft_smooth_init, /* module_init */
|
|
|
|
(FT_Module_Destructor) NULL, /* module_done */
|
|
|
|
(FT_Module_Requester) NULL, /* get_interface */
|
* massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
2002-08-27 22:20:29 +02:00
|
|
|
|
|
|
|
FT_GLYPH_FORMAT_OUTLINE,
|
2000-07-09 21:15:30 +02:00
|
|
|
|
2016-09-17 17:12:50 +02:00
|
|
|
(FT_Renderer_RenderFunc) ft_smooth_render_lcd_v, /* render_glyph */
|
|
|
|
(FT_Renderer_TransformFunc)ft_smooth_transform, /* transform_glyph */
|
|
|
|
(FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox, /* get_glyph_cbox */
|
|
|
|
(FT_Renderer_SetModeFunc) ft_smooth_set_mode, /* set_mode */
|
2000-07-09 21:15:30 +02:00
|
|
|
|
Remove FT_CONFIG_OPTION_PIC and related code.
*/* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this
preprocessor symbol.
*/*: Replace `XXX_GET' macros (which could be either a function in
PIC mode or an array in non-PIC mode) with `xxx' arrays.
* include/freetype/internal/ftpic.h, src/autofit/afpic.c,
src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h,
src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h,
src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c,
src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h,
src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c,
src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h:
Removed.
2018-05-02 20:27:48 +02:00
|
|
|
(FT_Raster_Funcs*)&ft_grays_raster /* raster_class */
|
2009-04-05 17:14:04 +02:00
|
|
|
)
|
2000-06-28 01:18:39 +02:00
|
|
|
|
2000-07-02 02:27:53 +02:00
|
|
|
|
|
|
|
/* END */
|