2018-06-03 09:01:17 +02:00
|
|
|
/****************************************************************************
|
|
|
|
*
|
|
|
|
* afloader.c
|
|
|
|
*
|
|
|
|
* Auto-fitter glyph loading routines (body).
|
|
|
|
*
|
2023-01-17 09:18:25 +01:00
|
|
|
* Copyright (C) 2003-2023 by
|
2018-06-03 09:01:17 +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.
|
|
|
|
*
|
|
|
|
*/
|
2005-03-03 18:09:08 +01:00
|
|
|
|
|
|
|
|
2012-10-20 08:34:57 +02:00
|
|
|
#include "afglobal.h"
|
2004-03-27 09:43:17 +01:00
|
|
|
#include "afloader.h"
|
|
|
|
#include "afhints.h"
|
2005-03-23 17:45:24 +01:00
|
|
|
#include "aferrors.h"
|
2012-09-14 12:26:57 +02:00
|
|
|
#include "afmodule.h"
|
2004-03-27 09:43:17 +01:00
|
|
|
|
2020-06-08 13:31:55 +02:00
|
|
|
#include <freetype/internal/ftcalc.h>
|
2015-11-28 19:05:36 +01:00
|
|
|
|
2005-03-02 12:24:23 +01:00
|
|
|
|
2011-02-26 17:32:38 +01:00
|
|
|
/* Initialize glyph loader. */
|
|
|
|
|
2015-01-14 19:07:54 +01:00
|
|
|
FT_LOCAL_DEF( void )
|
2015-01-14 19:16:12 +01:00
|
|
|
af_loader_init( AF_Loader loader,
|
|
|
|
AF_GlyphHints hints )
|
2004-03-27 09:43:17 +01:00
|
|
|
{
|
|
|
|
FT_ZERO( loader );
|
|
|
|
|
2015-01-14 19:16:12 +01:00
|
|
|
loader->hints = hints;
|
2004-03-27 09:43:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-02-26 17:32:38 +01:00
|
|
|
/* Reset glyph loader and compute globals if necessary. */
|
|
|
|
|
2004-03-27 09:43:17 +01:00
|
|
|
FT_LOCAL_DEF( FT_Error )
|
2015-01-14 16:01:19 +01:00
|
|
|
af_loader_reset( AF_Loader loader,
|
|
|
|
AF_Module module,
|
2005-03-02 12:24:23 +01:00
|
|
|
FT_Face face )
|
2004-03-27 09:43:17 +01:00
|
|
|
{
|
2015-01-14 16:01:19 +01:00
|
|
|
FT_Error error = FT_Err_Ok;
|
2005-03-02 12:24:23 +01:00
|
|
|
|
2004-03-27 09:43:17 +01:00
|
|
|
|
|
|
|
loader->face = face;
|
2005-03-02 12:24:23 +01:00
|
|
|
loader->globals = (AF_FaceGlobals)face->autohint.data;
|
2004-03-27 09:43:17 +01:00
|
|
|
|
2016-12-26 17:08:17 +01:00
|
|
|
if ( !loader->globals )
|
2004-03-27 09:43:17 +01:00
|
|
|
{
|
2012-09-18 15:23:41 +02:00
|
|
|
error = af_face_globals_new( face, &loader->globals, module );
|
2004-03-27 09:43:17 +01:00
|
|
|
if ( !error )
|
|
|
|
{
|
2023-05-07 19:54:46 +02:00
|
|
|
face->autohint.data = (FT_Pointer)loader->globals;
|
|
|
|
face->autohint.finalizer = af_face_globals_free;
|
2004-03-27 09:43:17 +01:00
|
|
|
}
|
|
|
|
}
|
2005-03-02 12:24:23 +01:00
|
|
|
|
2004-03-27 09:43:17 +01:00
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-02-26 17:32:38 +01:00
|
|
|
/* Finalize glyph loader. */
|
|
|
|
|
2004-03-27 09:43:17 +01:00
|
|
|
FT_LOCAL_DEF( void )
|
2015-01-14 16:01:19 +01:00
|
|
|
af_loader_done( AF_Loader loader )
|
2004-03-27 09:43:17 +01:00
|
|
|
{
|
|
|
|
loader->face = NULL;
|
|
|
|
loader->globals = NULL;
|
2015-01-14 19:16:12 +01:00
|
|
|
loader->hints = NULL;
|
2004-03-27 09:43:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-11-03 10:40:58 +01:00
|
|
|
#define af_intToFixed( i ) \
|
|
|
|
( (FT_Fixed)( (FT_UInt32)(i) << 16 ) )
|
|
|
|
#define af_fixedToInt( x ) \
|
|
|
|
( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) )
|
|
|
|
#define af_floatToFixed( f ) \
|
|
|
|
( (FT_Fixed)( (f) * 65536.0 + 0.5 ) )
|
|
|
|
|
|
|
|
|
2004-03-27 09:43:17 +01:00
|
|
|
static FT_Error
|
2016-11-27 16:30:53 +01:00
|
|
|
af_loader_embolden_glyph_in_slot( AF_Loader loader,
|
|
|
|
FT_Face face,
|
|
|
|
AF_StyleMetrics style_metrics )
|
2004-03-27 09:43:17 +01:00
|
|
|
{
|
2016-11-27 16:30:53 +01:00
|
|
|
FT_Error error = FT_Err_Ok;
|
2015-11-03 10:40:58 +01:00
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
FT_GlyphSlot slot = face->glyph;
|
|
|
|
AF_FaceGlobals globals = loader->globals;
|
|
|
|
AF_WritingSystemClass writing_system_class;
|
2004-03-27 09:43:17 +01:00
|
|
|
|
2017-04-22 13:27:21 +02:00
|
|
|
FT_Size_Metrics* size_metrics = &face->size->internal->autohint_metrics;
|
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
FT_Pos stdVW = 0;
|
|
|
|
FT_Pos stdHW = 0;
|
2005-03-02 12:24:23 +01:00
|
|
|
|
2017-04-22 13:27:21 +02:00
|
|
|
FT_Bool size_changed = size_metrics->x_ppem !=
|
|
|
|
globals->stem_darkening_for_ppem;
|
2016-11-27 16:30:53 +01:00
|
|
|
|
|
|
|
FT_Fixed em_size = af_intToFixed( face->units_per_EM );
|
|
|
|
|
|
|
|
FT_Matrix scale_down_matrix = { 0x10000L, 0, 0, 0x10000L };
|
|
|
|
|
|
|
|
|
|
|
|
/* Skip stem darkening for broken fonts. */
|
|
|
|
if ( !face->units_per_EM )
|
|
|
|
{
|
2017-01-25 12:53:06 +01:00
|
|
|
error = FT_ERR( Corrupted_Font_Header );
|
2004-03-27 09:43:17 +01:00
|
|
|
goto Exit;
|
2016-11-27 16:30:53 +01:00
|
|
|
}
|
2004-03-27 09:43:17 +01:00
|
|
|
|
2015-11-03 10:40:58 +01:00
|
|
|
/*
|
2018-06-03 09:01:17 +02:00
|
|
|
* We depend on the writing system (script analyzers) to supply
|
|
|
|
* standard widths for the script of the glyph we are looking at. If
|
|
|
|
* it can't deliver, stem darkening is disabled.
|
2015-11-03 10:40:58 +01:00
|
|
|
*/
|
2016-11-27 16:30:53 +01:00
|
|
|
writing_system_class =
|
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
|
|
|
af_writing_system_classes[style_metrics->style_class->writing_system];
|
2016-11-27 16:30:53 +01:00
|
|
|
|
|
|
|
if ( writing_system_class->style_metrics_getstdw )
|
|
|
|
writing_system_class->style_metrics_getstdw( style_metrics,
|
|
|
|
&stdHW,
|
|
|
|
&stdVW );
|
|
|
|
else
|
|
|
|
{
|
2017-01-25 12:53:06 +01:00
|
|
|
error = FT_ERR( Unimplemented_Feature );
|
2016-11-27 16:30:53 +01:00
|
|
|
goto Exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( size_changed ||
|
|
|
|
( stdVW > 0 && stdVW != globals->standard_vertical_width ) )
|
2015-11-03 10:40:58 +01:00
|
|
|
{
|
2016-11-27 16:30:53 +01:00
|
|
|
FT_Fixed darken_by_font_units_x, darken_x;
|
2015-11-03 10:40:58 +01:00
|
|
|
|
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
darken_by_font_units_x =
|
2020-12-19 04:10:30 +01:00
|
|
|
af_loader_compute_darkening( loader,
|
|
|
|
face,
|
|
|
|
stdVW ) ;
|
|
|
|
darken_x = FT_MulFix( darken_by_font_units_x,
|
|
|
|
size_metrics->x_scale );
|
2015-11-03 10:40:58 +01:00
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
globals->standard_vertical_width = stdVW;
|
2017-04-22 13:27:21 +02:00
|
|
|
globals->stem_darkening_for_ppem = size_metrics->x_ppem;
|
2016-11-27 16:30:53 +01:00
|
|
|
globals->darken_x = af_fixedToInt( darken_x );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( size_changed ||
|
|
|
|
( stdHW > 0 && stdHW != globals->standard_horizontal_width ) )
|
|
|
|
{
|
|
|
|
FT_Fixed darken_by_font_units_y, darken_y;
|
2015-11-03 10:40:58 +01:00
|
|
|
|
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
darken_by_font_units_y =
|
2020-12-19 04:10:30 +01:00
|
|
|
af_loader_compute_darkening( loader,
|
|
|
|
face,
|
|
|
|
stdHW ) ;
|
|
|
|
darken_y = FT_MulFix( darken_by_font_units_y,
|
|
|
|
size_metrics->y_scale );
|
2015-11-03 10:40:58 +01:00
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
globals->standard_horizontal_width = stdHW;
|
2017-04-22 13:27:21 +02:00
|
|
|
globals->stem_darkening_for_ppem = size_metrics->x_ppem;
|
2016-11-27 16:30:53 +01:00
|
|
|
globals->darken_y = af_fixedToInt( darken_y );
|
2015-11-03 10:40:58 +01:00
|
|
|
|
|
|
|
/*
|
2018-06-03 09:01:17 +02:00
|
|
|
* Scale outlines down on the Y-axis to keep them inside their blue
|
|
|
|
* zones. The stronger the emboldening, the stronger the downscaling
|
|
|
|
* (plus heuristical padding to prevent outlines still falling out
|
|
|
|
* their zones due to rounding).
|
2016-11-27 16:30:53 +01:00
|
|
|
*
|
2018-06-03 09:01:17 +02:00
|
|
|
* Reason: `FT_Outline_Embolden' works by shifting the rightmost
|
|
|
|
* points of stems farther to the right, and topmost points farther
|
|
|
|
* up. This positions points on the Y-axis outside their
|
|
|
|
* pre-computed blue zones and leads to distortion when applying the
|
|
|
|
* hints in the code further below. Code outside this emboldening
|
|
|
|
* block doesn't know we are presenting it with modified outlines the
|
|
|
|
* analyzer didn't see!
|
2016-11-27 16:30:53 +01:00
|
|
|
*
|
2018-06-03 09:01:17 +02:00
|
|
|
* An unfortunate side effect of downscaling is that the emboldening
|
|
|
|
* effect is slightly decreased. The loss becomes more pronounced
|
|
|
|
* versus the CFF driver at smaller sizes, e.g., at 9ppem and below.
|
2015-11-03 10:40:58 +01:00
|
|
|
*/
|
2016-11-27 16:30:53 +01:00
|
|
|
globals->scale_down_factor =
|
|
|
|
FT_DivFix( em_size - ( darken_by_font_units_y + af_intToFixed( 8 ) ),
|
|
|
|
em_size );
|
|
|
|
}
|
2015-11-03 10:40:58 +01:00
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
FT_Outline_EmboldenXY( &slot->outline,
|
|
|
|
globals->darken_x,
|
|
|
|
globals->darken_y );
|
2015-11-03 10:40:58 +01:00
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
scale_down_matrix.yy = globals->scale_down_factor;
|
|
|
|
FT_Outline_Transform( &slot->outline, &scale_down_matrix );
|
2015-11-03 10:40:58 +01:00
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
Exit:
|
|
|
|
return error;
|
|
|
|
}
|
2015-11-03 10:40:58 +01:00
|
|
|
|
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
/* Load the glyph at index into the current slot of a face and hint it. */
|
2015-11-03 10:40:58 +01:00
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
FT_LOCAL_DEF( FT_Error )
|
|
|
|
af_loader_load_glyph( AF_Loader loader,
|
|
|
|
AF_Module module,
|
|
|
|
FT_Face face,
|
|
|
|
FT_UInt glyph_index,
|
|
|
|
FT_Int32 load_flags )
|
|
|
|
{
|
|
|
|
FT_Error error;
|
2015-11-03 10:40:58 +01:00
|
|
|
|
2017-04-22 13:27:21 +02:00
|
|
|
FT_Size size = face->size;
|
2022-11-21 04:37:08 +01:00
|
|
|
FT_Size_Internal size_internal = size->internal;
|
2017-04-22 13:27:21 +02:00
|
|
|
FT_GlyphSlot slot = face->glyph;
|
|
|
|
FT_Slot_Internal slot_internal = slot->internal;
|
|
|
|
FT_GlyphLoader gloader = slot_internal->loader;
|
2016-11-27 16:30:53 +01:00
|
|
|
|
2017-02-03 21:32:21 +01:00
|
|
|
AF_GlyphHints hints = loader->hints;
|
2016-11-27 16:30:53 +01:00
|
|
|
AF_ScalerRec scaler;
|
|
|
|
AF_StyleMetrics style_metrics;
|
2017-02-03 21:32:21 +01:00
|
|
|
FT_UInt style_options = AF_STYLE_NONE_DFLT;
|
2016-11-27 16:30:53 +01:00
|
|
|
AF_StyleClass style_class;
|
|
|
|
AF_WritingSystemClass writing_system_class;
|
|
|
|
|
|
|
|
|
|
|
|
FT_ZERO( &scaler );
|
|
|
|
|
2017-04-22 13:27:21 +02:00
|
|
|
if ( !size_internal->autohint_metrics.x_scale ||
|
|
|
|
size_internal->autohint_mode != FT_LOAD_TARGET_MODE( load_flags ) )
|
|
|
|
{
|
2017-05-02 12:32:19 +02:00
|
|
|
/* switching between hinting modes usually means different scaling */
|
|
|
|
/* values; this later on enforces recomputation of everything */
|
|
|
|
/* related to the current size */
|
2017-04-22 13:27:21 +02:00
|
|
|
|
|
|
|
size_internal->autohint_mode = FT_LOAD_TARGET_MODE( load_flags );
|
|
|
|
size_internal->autohint_metrics = size->metrics;
|
|
|
|
|
2017-04-27 13:02:24 +02:00
|
|
|
#ifdef AF_CONFIG_OPTION_TT_SIZE_METRICS
|
2017-04-22 13:27:21 +02:00
|
|
|
{
|
|
|
|
FT_Size_Metrics* size_metrics = &size_internal->autohint_metrics;
|
|
|
|
|
|
|
|
|
|
|
|
/* set metrics to integer values and adjust scaling accordingly; */
|
|
|
|
/* this is the same setup as with TrueType fonts, cf. function */
|
|
|
|
/* `tt_size_reset' in file `ttobjs.c' */
|
|
|
|
size_metrics->ascender = FT_PIX_ROUND(
|
|
|
|
FT_MulFix( face->ascender,
|
|
|
|
size_metrics->y_scale ) );
|
|
|
|
size_metrics->descender = FT_PIX_ROUND(
|
|
|
|
FT_MulFix( face->descender,
|
|
|
|
size_metrics->y_scale ) );
|
|
|
|
size_metrics->height = FT_PIX_ROUND(
|
|
|
|
FT_MulFix( face->height,
|
|
|
|
size_metrics->y_scale ) );
|
|
|
|
|
|
|
|
size_metrics->x_scale = FT_DivFix( size_metrics->x_ppem << 6,
|
|
|
|
face->units_per_EM );
|
|
|
|
size_metrics->y_scale = FT_DivFix( size_metrics->y_ppem << 6,
|
|
|
|
face->units_per_EM );
|
|
|
|
size_metrics->max_advance = FT_PIX_ROUND(
|
|
|
|
FT_MulFix( face->max_advance_width,
|
|
|
|
size_metrics->x_scale ) );
|
|
|
|
}
|
2017-04-27 13:02:24 +02:00
|
|
|
#endif /* AF_CONFIG_OPTION_TT_SIZE_METRICS */
|
2017-04-22 13:27:21 +02:00
|
|
|
}
|
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
/*
|
2018-06-03 09:01:17 +02:00
|
|
|
* TODO: This code currently doesn't support fractional advance widths,
|
|
|
|
* i.e., placing hinted glyphs at anything other than integer
|
|
|
|
* x-positions. This is only relevant for the warper code, which
|
|
|
|
* scales and shifts glyphs to optimize blackness of stems (hinting on
|
|
|
|
* the x-axis by nature places things on pixel integers, hinting on the
|
|
|
|
* y-axis only, i.e., LIGHT mode, doesn't touch the x-axis). The delta
|
|
|
|
* values of the scaler would need to be adjusted.
|
2016-11-27 16:30:53 +01:00
|
|
|
*/
|
|
|
|
scaler.face = face;
|
2017-04-22 13:27:21 +02:00
|
|
|
scaler.x_scale = size_internal->autohint_metrics.x_scale;
|
2016-11-27 16:30:53 +01:00
|
|
|
scaler.x_delta = 0;
|
2017-04-22 13:27:21 +02:00
|
|
|
scaler.y_scale = size_internal->autohint_metrics.y_scale;
|
2016-11-27 16:30:53 +01:00
|
|
|
scaler.y_delta = 0;
|
|
|
|
|
|
|
|
scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags );
|
|
|
|
scaler.flags = 0;
|
|
|
|
|
2017-02-03 21:32:21 +01:00
|
|
|
/* note that the fallback style can't be changed anymore */
|
2017-05-03 20:16:24 +02:00
|
|
|
/* after the first call of `af_loader_load_glyph' */
|
2016-11-27 16:30:53 +01:00
|
|
|
error = af_loader_reset( loader, module, face );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
|
|
|
|
|
|
|
/*
|
2018-06-03 09:01:17 +02:00
|
|
|
* Glyphs (really code points) are assigned to scripts. Script
|
|
|
|
* analysis is done lazily: For each glyph that passes through here,
|
|
|
|
* the corresponding script analyzer is called, but returns immediately
|
|
|
|
* if it has been run already.
|
2016-11-27 16:30:53 +01:00
|
|
|
*/
|
|
|
|
error = af_face_globals_get_metrics( loader->globals, glyph_index,
|
|
|
|
style_options, &style_metrics );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
|
|
|
|
|
|
|
style_class = style_metrics->style_class;
|
|
|
|
writing_system_class =
|
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
|
|
|
af_writing_system_classes[style_class->writing_system];
|
2015-11-03 10:40:58 +01:00
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
loader->metrics = style_metrics;
|
2015-11-03 10:40:58 +01:00
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
if ( writing_system_class->style_metrics_scale )
|
|
|
|
writing_system_class->style_metrics_scale( style_metrics, &scaler );
|
|
|
|
else
|
|
|
|
style_metrics->scaler = scaler;
|
|
|
|
|
|
|
|
if ( writing_system_class->style_hints_init )
|
|
|
|
{
|
|
|
|
error = writing_system_class->style_hints_init( hints,
|
|
|
|
style_metrics );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
2015-11-03 10:40:58 +01:00
|
|
|
}
|
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
/*
|
2018-06-03 09:01:17 +02:00
|
|
|
* Do the main work of `af_loader_load_glyph'. Note that we never have
|
|
|
|
* to deal with composite glyphs as those get loaded into
|
|
|
|
* FT_GLYPH_FORMAT_OUTLINE by the recursed `FT_Load_Glyph' function.
|
|
|
|
* In the rare cases where FT_LOAD_NO_RECURSE is set, it implies
|
|
|
|
* FT_LOAD_NO_SCALE and as such the auto-hinter is never called.
|
2016-11-27 16:30:53 +01:00
|
|
|
*/
|
|
|
|
load_flags |= FT_LOAD_NO_SCALE |
|
|
|
|
FT_LOAD_IGNORE_TRANSFORM |
|
|
|
|
FT_LOAD_LINEAR_DESIGN;
|
|
|
|
load_flags &= ~FT_LOAD_RENDER;
|
|
|
|
|
|
|
|
error = FT_Load_Glyph( face, glyph_index, load_flags );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
|
|
|
|
|
|
|
/*
|
2018-06-03 09:01:17 +02:00
|
|
|
* Apply stem darkening (emboldening) here before hints are applied to
|
|
|
|
* the outline. Glyphs are scaled down proportionally to the
|
|
|
|
* emboldening so that curve points don't fall outside their
|
|
|
|
* precomputed blue zones.
|
2016-11-27 16:30:53 +01:00
|
|
|
*
|
2018-06-03 09:01:17 +02:00
|
|
|
* Any emboldening done by the font driver (e.g., the CFF driver)
|
|
|
|
* doesn't reach here because the autohinter loads the unprocessed
|
|
|
|
* glyphs in font units for analysis (functions `af_*_metrics_init_*')
|
|
|
|
* and then above to prepare it for the rasterizers by itself,
|
|
|
|
* independently of the font driver. So emboldening must be done here,
|
|
|
|
* within the autohinter.
|
2016-11-27 16:30:53 +01:00
|
|
|
*
|
2018-06-03 09:01:17 +02:00
|
|
|
* All glyphs to be autohinted pass through here one by one. The
|
|
|
|
* standard widths can therefore change from one glyph to the next,
|
|
|
|
* depending on what script a glyph is assigned to (each script has its
|
|
|
|
* own set of standard widths and other metrics). The darkening amount
|
|
|
|
* must therefore be recomputed for each size and
|
|
|
|
* `standard_{vertical,horizontal}_width' change.
|
2016-11-27 16:30:53 +01:00
|
|
|
*
|
2018-06-03 09:01:17 +02:00
|
|
|
* Ignore errors and carry on without emboldening.
|
2017-02-18 10:42:23 +01:00
|
|
|
*
|
2016-11-27 16:30:53 +01:00
|
|
|
*/
|
2017-02-18 10:42:23 +01:00
|
|
|
|
2017-05-02 12:32:19 +02:00
|
|
|
/* stem darkening only works well in `light' mode */
|
|
|
|
if ( scaler.render_mode == FT_RENDER_MODE_LIGHT &&
|
2017-02-18 10:42:23 +01:00
|
|
|
( !face->internal->no_stem_darkening ||
|
|
|
|
( face->internal->no_stem_darkening < 0 &&
|
2017-05-02 12:32:19 +02:00
|
|
|
!module->no_stem_darkening ) ) )
|
2016-11-27 16:30:53 +01:00
|
|
|
af_loader_embolden_glyph_in_slot( loader, face, style_metrics );
|
|
|
|
|
2017-04-22 13:27:21 +02:00
|
|
|
loader->transformed = slot_internal->glyph_transformed;
|
2004-03-27 09:43:17 +01:00
|
|
|
if ( loader->transformed )
|
|
|
|
{
|
|
|
|
FT_Matrix inverse;
|
|
|
|
|
2005-03-02 12:24:23 +01:00
|
|
|
|
2017-04-22 13:27:21 +02:00
|
|
|
loader->trans_matrix = slot_internal->glyph_matrix;
|
|
|
|
loader->trans_delta = slot_internal->glyph_delta;
|
2004-03-27 09:43:17 +01:00
|
|
|
|
|
|
|
inverse = loader->trans_matrix;
|
[Savannah bug #43682] Properly handle missing return errors.
The functions in this patch *do* return non-trivial errors that must
be taken care of.
* src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c
(FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render),
src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>,
src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode
(t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c
(load_truetype_glyph <subglyph loop>, tt_loader_init,
TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend),
src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it.
2014-11-25 08:53:09 +01:00
|
|
|
if ( !FT_Matrix_Invert( &inverse ) )
|
|
|
|
FT_Vector_Transform( &loader->trans_delta, &inverse );
|
2004-03-27 09:43:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
switch ( slot->format )
|
|
|
|
{
|
2005-03-02 12:24:23 +01:00
|
|
|
case FT_GLYPH_FORMAT_OUTLINE:
|
|
|
|
/* translate the loaded glyph when an internal transform is needed */
|
|
|
|
if ( loader->transformed )
|
|
|
|
FT_Outline_Translate( &slot->outline,
|
|
|
|
loader->trans_delta.x,
|
|
|
|
loader->trans_delta.y );
|
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
/* compute original horizontal phantom points */
|
|
|
|
/* (and ignore vertical ones) */
|
2005-03-02 12:24:23 +01:00
|
|
|
loader->pp1.x = hints->x_delta;
|
|
|
|
loader->pp1.y = hints->y_delta;
|
|
|
|
loader->pp2.x = FT_MulFix( slot->metrics.horiAdvance,
|
|
|
|
hints->x_scale ) + hints->x_delta;
|
|
|
|
loader->pp2.y = hints->y_delta;
|
|
|
|
|
|
|
|
/* be sure to check for spacing glyphs */
|
|
|
|
if ( slot->outline.n_points == 0 )
|
|
|
|
goto Hint_Metrics;
|
|
|
|
|
2016-11-27 16:30:53 +01:00
|
|
|
/* now load the slot image into the auto-outline */
|
|
|
|
/* and run the automatic hinting process */
|
2017-02-02 07:13:29 +01:00
|
|
|
if ( writing_system_class->style_hints_apply )
|
2018-11-02 10:10:10 +01:00
|
|
|
{
|
|
|
|
error = writing_system_class->style_hints_apply(
|
|
|
|
glyph_index,
|
|
|
|
hints,
|
|
|
|
&gloader->base.outline,
|
|
|
|
style_metrics );
|
|
|
|
if ( error )
|
|
|
|
goto Exit;
|
|
|
|
}
|
2005-03-02 12:24:23 +01:00
|
|
|
|
2011-02-26 17:32:38 +01:00
|
|
|
/* we now need to adjust the metrics according to the change in */
|
|
|
|
/* width/positioning that occurred during the hinting process */
|
2017-05-02 12:32:19 +02:00
|
|
|
if ( scaler.render_mode != FT_RENDER_MODE_LIGHT )
|
2005-03-02 12:24:23 +01:00
|
|
|
{
|
2005-03-03 18:09:08 +01:00
|
|
|
AF_AxisHints axis = &hints->axis[AF_DIMENSION_HORZ];
|
2004-06-05 08:27:08 +02:00
|
|
|
|
2006-01-22 08:09:54 +01:00
|
|
|
|
2006-02-09 15:17:04 +01:00
|
|
|
if ( axis->num_edges > 1 && AF_HINTS_DO_ADVANCE( hints ) )
|
2005-03-02 12:24:23 +01:00
|
|
|
{
|
2018-05-30 17:35:39 +02:00
|
|
|
AF_Edge edge1 = axis->edges; /* leftmost edge */
|
|
|
|
AF_Edge edge2 = edge1 +
|
|
|
|
axis->num_edges - 1; /* rightmost edge */
|
2018-05-30 12:37:46 +02:00
|
|
|
|
2018-05-30 17:35:39 +02:00
|
|
|
FT_Pos old_rsb = loader->pp2.x - edge2->opos;
|
2016-11-17 07:37:50 +01:00
|
|
|
/* loader->pp1.x is always zero at this point of time */
|
2018-05-30 17:35:39 +02:00
|
|
|
FT_Pos old_lsb = edge1->opos; /* - loader->pp1.x */
|
|
|
|
FT_Pos new_lsb = edge1->pos;
|
2004-03-27 09:43:17 +01:00
|
|
|
|
2017-02-03 21:32:21 +01:00
|
|
|
/* remember unhinted values to later account */
|
|
|
|
/* for rounding errors */
|
2018-05-30 17:35:39 +02:00
|
|
|
FT_Pos pp1x_uh = new_lsb - old_lsb;
|
|
|
|
FT_Pos pp2x_uh = edge2->pos + old_rsb;
|
|
|
|
|
2004-06-05 08:27:08 +02:00
|
|
|
|
2005-03-02 12:24:23 +01:00
|
|
|
/* prefer too much space over too little space */
|
|
|
|
/* for very small sizes */
|
2004-06-05 08:27:08 +02:00
|
|
|
|
2005-03-02 12:24:23 +01:00
|
|
|
if ( old_lsb < 24 )
|
2007-02-12 22:28:21 +01:00
|
|
|
pp1x_uh -= 8;
|
2004-06-05 08:27:08 +02:00
|
|
|
|
2005-03-02 12:24:23 +01:00
|
|
|
if ( old_rsb < 24 )
|
2007-02-12 22:28:21 +01:00
|
|
|
pp2x_uh += 8;
|
2004-06-05 08:27:08 +02:00
|
|
|
|
2005-03-02 12:24:23 +01:00
|
|
|
loader->pp1.x = FT_PIX_ROUND( pp1x_uh );
|
|
|
|
loader->pp2.x = FT_PIX_ROUND( pp2x_uh );
|
2004-06-05 08:27:08 +02:00
|
|
|
|
2007-02-12 22:28:21 +01:00
|
|
|
if ( loader->pp1.x >= new_lsb && old_lsb > 0 )
|
2006-12-07 22:18:09 +01:00
|
|
|
loader->pp1.x -= 64;
|
|
|
|
|
2007-02-12 22:28:21 +01:00
|
|
|
if ( loader->pp2.x <= edge2->pos && old_rsb > 0 )
|
2006-12-07 22:18:09 +01:00
|
|
|
loader->pp2.x += 64;
|
|
|
|
|
2005-03-02 12:24:23 +01:00
|
|
|
slot->lsb_delta = loader->pp1.x - pp1x_uh;
|
|
|
|
slot->rsb_delta = loader->pp2.x - pp2x_uh;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-27 19:40:35 +02:00
|
|
|
FT_Pos pp1x = loader->pp1.x;
|
|
|
|
FT_Pos pp2x = loader->pp2.x;
|
|
|
|
|
2006-03-23 21:58:20 +01:00
|
|
|
|
2021-07-12 22:11:24 +02:00
|
|
|
loader->pp1.x = FT_PIX_ROUND( pp1x );
|
|
|
|
loader->pp2.x = FT_PIX_ROUND( pp2x );
|
2006-03-23 21:58:20 +01:00
|
|
|
|
|
|
|
slot->lsb_delta = loader->pp1.x - pp1x;
|
|
|
|
slot->rsb_delta = loader->pp2.x - pp2x;
|
2004-03-27 09:43:17 +01:00
|
|
|
}
|
2005-03-02 12:24:23 +01:00
|
|
|
}
|
2017-04-22 13:27:21 +02:00
|
|
|
/* `light' mode uses integer advance widths */
|
2017-05-02 12:32:19 +02:00
|
|
|
/* but sets `lsb_delta' and `rsb_delta' */
|
|
|
|
else
|
2007-01-26 16:05:41 +01:00
|
|
|
{
|
2009-04-27 19:40:35 +02:00
|
|
|
FT_Pos pp1x = loader->pp1.x;
|
|
|
|
FT_Pos pp2x = loader->pp2.x;
|
|
|
|
|
2007-01-26 16:05:41 +01:00
|
|
|
|
2017-05-15 06:25:37 +02:00
|
|
|
loader->pp1.x = FT_PIX_ROUND( pp1x );
|
|
|
|
loader->pp2.x = FT_PIX_ROUND( pp2x );
|
2007-01-26 16:05:41 +01:00
|
|
|
|
|
|
|
slot->lsb_delta = loader->pp1.x - pp1x;
|
|
|
|
slot->rsb_delta = loader->pp2.x - pp2x;
|
|
|
|
}
|
2004-03-27 09:43:17 +01:00
|
|
|
|
2005-03-02 12:24:23 +01:00
|
|
|
break;
|
2004-03-27 09:43:17 +01:00
|
|
|
|
|
|
|
default:
|
|
|
|
/* we don't support other formats (yet?) */
|
2013-03-14 10:27:35 +01:00
|
|
|
error = FT_THROW( Unimplemented_Feature );
|
2004-03-27 09:43:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Hint_Metrics:
|
|
|
|
{
|
2006-02-27 10:18:07 +01:00
|
|
|
FT_BBox bbox;
|
|
|
|
FT_Vector vvector;
|
2004-03-27 09:43:17 +01:00
|
|
|
|
|
|
|
|
2006-02-27 10:18:07 +01:00
|
|
|
vvector.x = slot->metrics.vertBearingX - slot->metrics.horiBearingX;
|
|
|
|
vvector.y = slot->metrics.vertBearingY - slot->metrics.horiBearingY;
|
2016-11-27 16:30:53 +01:00
|
|
|
vvector.x = FT_MulFix( vvector.x, style_metrics->scaler.x_scale );
|
|
|
|
vvector.y = FT_MulFix( vvector.y, style_metrics->scaler.y_scale );
|
2006-02-27 10:18:07 +01:00
|
|
|
|
2004-03-27 09:43:17 +01:00
|
|
|
/* transform the hinted outline if needed */
|
|
|
|
if ( loader->transformed )
|
2006-02-27 10:18:07 +01:00
|
|
|
{
|
2004-03-27 09:43:17 +01:00
|
|
|
FT_Outline_Transform( &gloader->base.outline, &loader->trans_matrix );
|
2006-02-27 10:18:07 +01:00
|
|
|
FT_Vector_Transform( &vvector, &loader->trans_matrix );
|
|
|
|
}
|
2016-11-27 16:30:53 +01:00
|
|
|
|
2004-03-27 09:43:17 +01:00
|
|
|
/* we must translate our final outline by -pp1.x and compute */
|
|
|
|
/* the new metrics */
|
|
|
|
if ( loader->pp1.x )
|
|
|
|
FT_Outline_Translate( &gloader->base.outline, -loader->pp1.x, 0 );
|
2016-11-27 16:30:53 +01:00
|
|
|
|
2004-03-27 09:43:17 +01:00
|
|
|
FT_Outline_Get_CBox( &gloader->base.outline, &bbox );
|
|
|
|
|
2005-03-02 12:24:23 +01:00
|
|
|
bbox.xMin = FT_PIX_FLOOR( bbox.xMin );
|
|
|
|
bbox.yMin = FT_PIX_FLOOR( bbox.yMin );
|
|
|
|
bbox.xMax = FT_PIX_CEIL( bbox.xMax );
|
|
|
|
bbox.yMax = FT_PIX_CEIL( bbox.yMax );
|
2004-03-27 09:43:17 +01:00
|
|
|
|
|
|
|
slot->metrics.width = bbox.xMax - bbox.xMin;
|
|
|
|
slot->metrics.height = bbox.yMax - bbox.yMin;
|
|
|
|
slot->metrics.horiBearingX = bbox.xMin;
|
|
|
|
slot->metrics.horiBearingY = bbox.yMax;
|
|
|
|
|
2006-02-27 10:18:07 +01:00
|
|
|
slot->metrics.vertBearingX = FT_PIX_FLOOR( bbox.xMin + vvector.x );
|
|
|
|
slot->metrics.vertBearingY = FT_PIX_FLOOR( bbox.yMax + vvector.y );
|
|
|
|
|
2004-03-27 09:43:17 +01:00
|
|
|
/* for mono-width fonts (like Andale, Courier, etc.) we need */
|
2009-04-27 19:40:35 +02:00
|
|
|
/* to keep the original rounded advance width; ditto for */
|
|
|
|
/* digits if all have the same advance width */
|
2016-11-27 16:30:53 +01:00
|
|
|
if ( scaler.render_mode != FT_RENDER_MODE_LIGHT &&
|
2012-02-29 13:33:33 +01:00
|
|
|
( FT_IS_FIXED_WIDTH( slot->face ) ||
|
|
|
|
( af_face_globals_is_digit( loader->globals, glyph_index ) &&
|
2016-11-27 16:30:53 +01:00
|
|
|
style_metrics->digits_have_same_width ) ) )
|
2007-03-26 15:37:17 +02:00
|
|
|
{
|
2016-11-27 16:30:53 +01:00
|
|
|
slot->metrics.horiAdvance =
|
|
|
|
FT_MulFix( slot->metrics.horiAdvance,
|
|
|
|
style_metrics->scaler.x_scale );
|
2007-03-26 15:37:17 +02:00
|
|
|
|
2007-03-28 23:17:11 +02:00
|
|
|
/* Set delta values to 0. Otherwise code that uses them is */
|
|
|
|
/* going to ruin the fixed advance width. */
|
2007-03-26 15:37:17 +02:00
|
|
|
slot->lsb_delta = 0;
|
|
|
|
slot->rsb_delta = 0;
|
|
|
|
}
|
2009-04-27 19:40:35 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
/* non-spacing glyphs must stay as-is */
|
|
|
|
if ( slot->metrics.horiAdvance )
|
|
|
|
slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
|
|
|
|
}
|
2004-03-27 09:43:17 +01:00
|
|
|
|
2006-02-27 10:18:07 +01:00
|
|
|
slot->metrics.vertAdvance = FT_MulFix( slot->metrics.vertAdvance,
|
2016-11-27 16:30:53 +01:00
|
|
|
style_metrics->scaler.y_scale );
|
2006-02-27 10:18:07 +01:00
|
|
|
|
2017-05-02 12:32:19 +02:00
|
|
|
slot->metrics.horiAdvance = FT_PIX_ROUND( slot->metrics.horiAdvance );
|
2006-02-27 10:18:07 +01:00
|
|
|
slot->metrics.vertAdvance = FT_PIX_ROUND( slot->metrics.vertAdvance );
|
2004-03-27 09:43:17 +01:00
|
|
|
|
|
|
|
slot->format = FT_GLYPH_FORMAT_OUTLINE;
|
|
|
|
}
|
|
|
|
|
|
|
|
Exit:
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-11-02 13:12:34 +01:00
|
|
|
/*
|
|
|
|
* Compute amount of font units the face should be emboldened by, in
|
|
|
|
* analogy to the CFF driver's `cf2_computeDarkening' function. See there
|
|
|
|
* for details of the algorithm.
|
|
|
|
*
|
|
|
|
* XXX: Currently a crude adaption of the original algorithm. Do better?
|
|
|
|
*/
|
2020-12-19 04:10:30 +01:00
|
|
|
FT_LOCAL_DEF( FT_Fixed )
|
2015-11-02 13:12:34 +01:00
|
|
|
af_loader_compute_darkening( AF_Loader loader,
|
|
|
|
FT_Face face,
|
|
|
|
FT_Pos standard_width )
|
|
|
|
{
|
|
|
|
AF_Module module = loader->globals->module;
|
|
|
|
|
|
|
|
FT_UShort units_per_EM;
|
|
|
|
FT_Fixed ppem, em_ratio;
|
|
|
|
FT_Fixed stem_width, stem_width_per_1000, scaled_stem, darken_amount;
|
|
|
|
FT_Int log_base_2;
|
|
|
|
FT_Int x1, y1, x2, y2, x3, y3, x4, y4;
|
|
|
|
|
|
|
|
|
|
|
|
ppem = FT_MAX( af_intToFixed( 4 ),
|
|
|
|
af_intToFixed( face->size->metrics.x_ppem ) );
|
|
|
|
units_per_EM = face->units_per_EM;
|
|
|
|
|
|
|
|
em_ratio = FT_DivFix( af_intToFixed( 1000 ),
|
|
|
|
af_intToFixed ( units_per_EM ) );
|
|
|
|
if ( em_ratio < af_floatToFixed( .01 ) )
|
|
|
|
{
|
|
|
|
/* If something goes wrong, don't embolden. */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
x1 = module->darken_params[0];
|
|
|
|
y1 = module->darken_params[1];
|
|
|
|
x2 = module->darken_params[2];
|
|
|
|
y2 = module->darken_params[3];
|
|
|
|
x3 = module->darken_params[4];
|
|
|
|
y3 = module->darken_params[5];
|
|
|
|
x4 = module->darken_params[6];
|
|
|
|
y4 = module->darken_params[7];
|
|
|
|
|
|
|
|
if ( standard_width <= 0 )
|
|
|
|
{
|
|
|
|
stem_width = af_intToFixed( 75 ); /* taken from cf2font.c */
|
|
|
|
stem_width_per_1000 = stem_width;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
stem_width = af_intToFixed( standard_width );
|
|
|
|
stem_width_per_1000 = FT_MulFix( stem_width, em_ratio );
|
|
|
|
}
|
|
|
|
|
|
|
|
log_base_2 = FT_MSB( (FT_UInt32)stem_width_per_1000 ) +
|
|
|
|
FT_MSB( (FT_UInt32)ppem );
|
|
|
|
|
|
|
|
if ( log_base_2 >= 46 )
|
|
|
|
{
|
|
|
|
/* possible overflow */
|
|
|
|
scaled_stem = af_intToFixed( x4 );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
scaled_stem = FT_MulFix( stem_width_per_1000, ppem );
|
|
|
|
|
|
|
|
/* now apply the darkening parameters */
|
|
|
|
if ( scaled_stem < af_intToFixed( x1 ) )
|
|
|
|
darken_amount = FT_DivFix( af_intToFixed( y1 ), ppem );
|
|
|
|
|
|
|
|
else if ( scaled_stem < af_intToFixed( x2 ) )
|
|
|
|
{
|
|
|
|
FT_Int xdelta = x2 - x1;
|
|
|
|
FT_Int ydelta = y2 - y1;
|
|
|
|
FT_Int x = stem_width_per_1000 -
|
|
|
|
FT_DivFix( af_intToFixed( x1 ), ppem );
|
|
|
|
|
|
|
|
|
|
|
|
if ( !xdelta )
|
|
|
|
goto Try_x3;
|
|
|
|
|
|
|
|
darken_amount = FT_MulDiv( x, ydelta, xdelta ) +
|
|
|
|
FT_DivFix( af_intToFixed( y1 ), ppem );
|
|
|
|
}
|
|
|
|
|
|
|
|
else if ( scaled_stem < af_intToFixed( x3 ) )
|
|
|
|
{
|
|
|
|
Try_x3:
|
|
|
|
{
|
|
|
|
FT_Int xdelta = x3 - x2;
|
|
|
|
FT_Int ydelta = y3 - y2;
|
|
|
|
FT_Int x = stem_width_per_1000 -
|
|
|
|
FT_DivFix( af_intToFixed( x2 ), ppem );
|
|
|
|
|
|
|
|
|
|
|
|
if ( !xdelta )
|
|
|
|
goto Try_x4;
|
|
|
|
|
|
|
|
darken_amount = FT_MulDiv( x, ydelta, xdelta ) +
|
|
|
|
FT_DivFix( af_intToFixed( y2 ), ppem );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if ( scaled_stem < af_intToFixed( x4 ) )
|
|
|
|
{
|
|
|
|
Try_x4:
|
|
|
|
{
|
|
|
|
FT_Int xdelta = x4 - x3;
|
|
|
|
FT_Int ydelta = y4 - y3;
|
|
|
|
FT_Int x = stem_width_per_1000 -
|
|
|
|
FT_DivFix( af_intToFixed( x3 ), ppem );
|
|
|
|
|
|
|
|
|
|
|
|
if ( !xdelta )
|
|
|
|
goto Use_y4;
|
|
|
|
|
|
|
|
darken_amount = FT_MulDiv( x, ydelta, xdelta ) +
|
|
|
|
FT_DivFix( af_intToFixed( y3 ), ppem );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Use_y4:
|
|
|
|
darken_amount = FT_DivFix( af_intToFixed( y4 ), ppem );
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Convert darken_amount from per 1000 em to true character space. */
|
2020-12-19 04:10:30 +01:00
|
|
|
return FT_DivFix( darken_amount, em_ratio );
|
2015-11-02 13:12:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-03-02 12:24:23 +01:00
|
|
|
/* END */
|