summaryrefslogtreecommitdiff
path: root/src/autofit
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2018-06-03 09:01:17 +0200
committerWerner Lemberg <wl@gnu.org>2018-06-03 09:08:41 +0200
commit9ac9060df00010a3eec234a8fea9cded9b8282a1 (patch)
tree1841cacd6774bb0bfdfe83b40067ae3ef2c14ff6 /src/autofit
parentae248034106b600e8e3fa9ccc17f63db44b04db3 (diff)
downloadfreetype2-9ac9060df00010a3eec234a8fea9cded9b8282a1.tar.gz
[GSoC] src/*.*: Convert block comments to `light' style.
This monster commit was created by applying Nikhil's scripts `docconverter.py' and `markify.py' to all C header and source files, followed up by minor manual clean-up. No change in functionality, of course. I used commit f7419907bc6044b9b7057f9789866426c804ba82 from https://github.com/nikramakrishnan/freetype-docs.git.
Diffstat (limited to 'src/autofit')
-rw-r--r--src/autofit/afangles.c52
-rw-r--r--src/autofit/afangles.h6
-rw-r--r--src/autofit/afblue.c32
-rw-r--r--src/autofit/afblue.cin32
-rw-r--r--src/autofit/afblue.h32
-rw-r--r--src/autofit/afblue.hin32
-rw-r--r--src/autofit/afcjk.c138
-rw-r--r--src/autofit/afcjk.h38
-rw-r--r--src/autofit/afcover.h32
-rw-r--r--src/autofit/afdummy.c34
-rw-r--r--src/autofit/afdummy.h34
-rw-r--r--src/autofit/aferrors.h48
-rw-r--r--src/autofit/afglobal.c52
-rw-r--r--src/autofit/afglobal.h46
-rw-r--r--src/autofit/afhints.c110
-rw-r--r--src/autofit/afhints.h232
-rw-r--r--src/autofit/afindic.c32
-rw-r--r--src/autofit/afindic.h34
-rw-r--r--src/autofit/aflatin.c172
-rw-r--r--src/autofit/aflatin.h44
-rw-r--r--src/autofit/aflatin2.c134
-rw-r--r--src/autofit/aflatin2.h34
-rw-r--r--src/autofit/afloader.c132
-rw-r--r--src/autofit/afloader.h42
-rw-r--r--src/autofit/afmodule.c44
-rw-r--r--src/autofit/afmodule.h36
-rw-r--r--src/autofit/afranges.c32
-rw-r--r--src/autofit/afranges.h32
-rw-r--r--src/autofit/afscript.h32
-rw-r--r--src/autofit/afshaper.c44
-rw-r--r--src/autofit/afshaper.h32
-rw-r--r--src/autofit/afstyles.h32
-rw-r--r--src/autofit/aftypes.h170
-rw-r--r--src/autofit/afwarp.c52
-rw-r--r--src/autofit/afwarp.h32
-rw-r--r--src/autofit/afwrtsys.h32
-rw-r--r--src/autofit/autofit.c32
37 files changed, 1089 insertions, 1087 deletions
diff --git a/src/autofit/afangles.c b/src/autofit/afangles.c
index c65a3ae23..f7b1c2ca8 100644
--- a/src/autofit/afangles.c
+++ b/src/autofit/afangles.c
@@ -1,28 +1,28 @@
-/***************************************************************************/
-/* */
-/* afangles.c */
-/* */
-/* Routines used to compute vector angles with limited accuracy */
-/* and very high speed. It also contains sorting routines (body). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afangles.c
+ *
+ * Routines used to compute vector angles with limited accuracy
+ * and very high speed. It also contains sorting routines (body).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#include "aftypes.h"
/*
- * We are not using `af_angle_atan' anymore, but we keep the source
- * code below just in case...
+ * We are not using `af_angle_atan' anymore, but we keep the source
+ * code below just in case...
*/
@@ -30,16 +30,16 @@
/*
- * The trick here is to realize that we don't need a very accurate angle
- * approximation. We are going to use the result of `af_angle_atan' to
- * only compare the sign of angle differences, or check whether its
- * magnitude is very small.
+ * The trick here is to realize that we don't need a very accurate angle
+ * approximation. We are going to use the result of `af_angle_atan' to
+ * only compare the sign of angle differences, or check whether its
+ * magnitude is very small.
*
- * The approximation
+ * The approximation
*
- * dy * PI / (|dx|+|dy|)
+ * dy * PI / (|dx|+|dy|)
*
- * should be enough, and much faster to compute.
+ * should be enough, and much faster to compute.
*/
FT_LOCAL_DEF( AF_Angle )
af_angle_atan( FT_Fixed dx,
diff --git a/src/autofit/afangles.h b/src/autofit/afangles.h
index f33f9e108..18d7dae3a 100644
--- a/src/autofit/afangles.h
+++ b/src/autofit/afangles.h
@@ -1,7 +1,7 @@
/*
- * afangles.h
+ * afangles.h
*
- * This is a dummy file, used to please the build system. It is never
- * included by the auto-fitter sources.
+ * This is a dummy file, used to please the build system. It is never
+ * included by the auto-fitter sources.
*
*/
diff --git a/src/autofit/afblue.c b/src/autofit/afblue.c
index e4078fd04..9b0ac1329 100644
--- a/src/autofit/afblue.c
+++ b/src/autofit/afblue.c
@@ -1,22 +1,22 @@
/* This file has been generated by the Perl script `afblue.pl', */
/* using data from file `afblue.dat'. */
-/***************************************************************************/
-/* */
-/* afblue.c */
-/* */
-/* Auto-fitter data for blue strings (body). */
-/* */
-/* Copyright 2013-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afblue.c
+ *
+ * Auto-fitter data for blue strings (body).
+ *
+ * Copyright 2013-2018 by
+ * 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.
+ *
+ */
#include "aftypes.h"
diff --git a/src/autofit/afblue.cin b/src/autofit/afblue.cin
index 4913e2eb6..b7437e3bc 100644
--- a/src/autofit/afblue.cin
+++ b/src/autofit/afblue.cin
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afblue.c */
-/* */
-/* Auto-fitter data for blue strings (body). */
-/* */
-/* Copyright 2013-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afblue.c
+ *
+ * Auto-fitter data for blue strings (body).
+ *
+ * Copyright 2013-2018 by
+ * 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.
+ *
+ */
#include "aftypes.h"
diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h
index de31e259c..1fbadbeea 100644
--- a/src/autofit/afblue.h
+++ b/src/autofit/afblue.h
@@ -1,22 +1,22 @@
/* This file has been generated by the Perl script `afblue.pl', */
/* using data from file `afblue.dat'. */
-/***************************************************************************/
-/* */
-/* afblue.h */
-/* */
-/* Auto-fitter data for blue strings (specification). */
-/* */
-/* Copyright 2013-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afblue.h
+ *
+ * Auto-fitter data for blue strings (specification).
+ *
+ * Copyright 2013-2018 by
+ * 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.
+ *
+ */
#ifndef AFBLUE_H_
diff --git a/src/autofit/afblue.hin b/src/autofit/afblue.hin
index 682147cb3..3f1d31195 100644
--- a/src/autofit/afblue.hin
+++ b/src/autofit/afblue.hin
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afblue.h */
-/* */
-/* Auto-fitter data for blue strings (specification). */
-/* */
-/* Copyright 2013-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afblue.h
+ *
+ * Auto-fitter data for blue strings (specification).
+ *
+ * Copyright 2013-2018 by
+ * 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.
+ *
+ */
#ifndef AFBLUE_H_
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index e93e8a709..dc3815339 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -1,24 +1,24 @@
-/***************************************************************************/
-/* */
-/* afcjk.c */
-/* */
-/* Auto-fitter hinting routines for CJK writing system (body). */
-/* */
-/* Copyright 2006-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afcjk.c
+ *
+ * Auto-fitter hinting routines for CJK writing system (body).
+ *
+ * Copyright 2006-2018 by
+ * 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.
+ *
+ */
/*
- * The algorithm is based on akito's autohint patch, archived at
+ * The algorithm is based on akito's autohint patch, archived at
*
- * https://web.archive.org/web/20051219160454/http://www.kde.gr.jp:80/~akito/patch/freetype2/2.1.7/
+ * https://web.archive.org/web/20051219160454/http://www.kde.gr.jp:80/~akito/patch/freetype2/2.1.7/
*
*/
@@ -43,12 +43,12 @@
#endif
- /*************************************************************************/
- /* */
- /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
- /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
- /* messages during execution. */
- /* */
+ /**************************************************************************
+ *
+ * The macro FT_COMPONENT is used in trace mode. It is an implicit
+ * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
+ * messages during execution.
+ */
#undef FT_COMPONENT
#define FT_COMPONENT trace_afcjk
@@ -198,10 +198,10 @@
goto Exit;
/*
- * We assume that the glyphs selected for the stem width
- * computation are `featureless' enough so that the linking
- * algorithm works fine without adjustments of its scoring
- * function.
+ * We assume that the glyphs selected for the stem width
+ * computation are `featureless' enough so that the linking
+ * algorithm works fine without adjustments of its scoring
+ * function.
*/
af_latin_hints_link_segments( hints,
0,
@@ -497,8 +497,8 @@
if ( num_flats == 0 && num_fills == 0 )
{
/*
- * we couldn't find a single glyph to compute this blue zone,
- * we will simply ignore it then
+ * we couldn't find a single glyph to compute this blue zone,
+ * we will simply ignore it then
*/
FT_TRACE5(( " empty\n" ));
continue;
@@ -914,11 +914,11 @@
}
/*
- * now compute the `serif' segments
+ * now compute the `serif' segments
*
- * In Hanzi, some strokes are wider on one or both of the ends.
- * We either identify the stems on the ends as serifs or remove
- * the linkage, depending on the length of the stems.
+ * In Hanzi, some strokes are wider on one or both of the ends.
+ * We either identify the stems on the ends as serifs or remove
+ * the linkage, depending on the length of the stems.
*
*/
@@ -1024,21 +1024,21 @@
scale = ( dim == AF_DIMENSION_HORZ ) ? hints->x_scale
: hints->y_scale;
- /*********************************************************************/
- /* */
- /* We begin by generating a sorted table of edges for the current */
- /* direction. To do so, we simply scan each segment and try to find */
- /* an edge in our table that corresponds to its position. */
- /* */
- /* If no edge is found, we create and insert a new edge in the */
- /* sorted table. Otherwise, we simply add the segment to the edge's */
- /* list which is then processed in the second step to compute the */
- /* edge's properties. */
- /* */
- /* Note that the edges table is sorted along the segment/edge */
- /* position. */
- /* */
- /*********************************************************************/
+ /**********************************************************************
+ *
+ * We begin by generating a sorted table of edges for the current
+ * direction. To do so, we simply scan each segment and try to find
+ * an edge in our table that corresponds to its position.
+ *
+ * If no edge is found, we create and insert a new edge in the
+ * sorted table. Otherwise, we simply add the segment to the edge's
+ * list which is then processed in the second step to compute the
+ * edge's properties.
+ *
+ * Note that the edges table is sorted along the segment/edge
+ * position.
+ *
+ */
edge_distance_threshold = FT_MulFix( laxis->edge_distance_threshold,
scale );
@@ -1138,17 +1138,17 @@
}
}
- /******************************************************************/
- /* */
- /* Good, we now compute each edge's properties according to the */
- /* segments found on its position. Basically, these are */
- /* */
- /* - the edge's main direction */
- /* - stem edge, serif edge or both (which defaults to stem then) */
- /* - rounded edge, straight or both (which defaults to straight) */
- /* - link for edge */
- /* */
- /******************************************************************/
+ /*******************************************************************
+ *
+ * Good, we now compute each edge's properties according to the
+ * segments found on its position. Basically, these are
+ *
+ * - the edge's main direction
+ * - stem edge, serif edge or both (which defaults to stem then)
+ * - rounded edge, straight or both (which defaults to straight)
+ * - link for edge
+ *
+ */
/* first of all, set the `edge' field in each segment -- this is */
/* required in order to compute edge links */
@@ -1388,8 +1388,8 @@
af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics );
/*
- * correct x_scale and y_scale when needed, since they may have
- * been modified af_cjk_scale_dim above
+ * correct x_scale and y_scale when needed, since they may have
+ * been modified af_cjk_scale_dim above
*/
hints->x_scale = metrics->axis[AF_DIMENSION_HORZ].scale;
hints->x_delta = metrics->axis[AF_DIMENSION_HORZ].delta;
@@ -1408,21 +1408,21 @@
other_flags = 0;
/*
- * We snap the width of vertical stems for the monochrome and
- * horizontal LCD rendering targets only.
+ * We snap the width of vertical stems for the monochrome and
+ * horizontal LCD rendering targets only.
*/
if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
/*
- * We snap the width of horizontal stems for the monochrome and
- * vertical LCD rendering targets only.
+ * We snap the width of horizontal stems for the monochrome and
+ * vertical LCD rendering targets only.
*/
if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
other_flags |= AF_LATIN_HINTS_VERT_SNAP;
/*
- * We adjust stems to full pixels unless in `light' or `lcd' mode.
+ * We adjust stems to full pixels unless in `light' or `lcd' mode.
*/
if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD )
other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
@@ -2118,8 +2118,8 @@
goto Exit;
/*
- * now hint the remaining edges (serifs and single) in order
- * to complete our processing
+ * now hint the remaining edges (serifs and single) in order
+ * to complete our processing
*/
for ( edge = edges; edge < edge_limit; edge++ )
{
diff --git a/src/autofit/afcjk.h b/src/autofit/afcjk.h
index d229c0c9c..707271bf0 100644
--- a/src/autofit/afcjk.h
+++ b/src/autofit/afcjk.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afcjk.h */
-/* */
-/* Auto-fitter hinting routines for CJK writing system (specification). */
-/* */
-/* Copyright 2006-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afcjk.h
+ *
+ * Auto-fitter hinting routines for CJK writing system (specification).
+ *
+ * Copyright 2006-2018 by
+ * 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.
+ *
+ */
#ifndef AFCJK_H_
@@ -41,9 +41,9 @@ FT_BEGIN_HEADER
/*
- * CJK glyphs tend to fill the square. So we have both vertical and
- * horizontal blue zones. But some glyphs have flat bounding strokes that
- * leave some space between neighbour glyphs.
+ * CJK glyphs tend to fill the square. So we have both vertical and
+ * horizontal blue zones. But some glyphs have flat bounding strokes that
+ * leave some space between neighbour glyphs.
*/
#define AF_CJK_IS_TOP_BLUE( b ) \
diff --git a/src/autofit/afcover.h b/src/autofit/afcover.h
index 6eeb8fc9f..47f3e476d 100644
--- a/src/autofit/afcover.h
+++ b/src/autofit/afcover.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afcover.h */
-/* */
-/* Auto-fitter coverages (specification only). */
-/* */
-/* Copyright 2013-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afcover.h
+ *
+ * Auto-fitter coverages (specification only).
+ *
+ * Copyright 2013-2018 by
+ * 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.
+ *
+ */
/* This header file can be included multiple times. */
diff --git a/src/autofit/afdummy.c b/src/autofit/afdummy.c
index f30c517cb..abd9509e3 100644
--- a/src/autofit/afdummy.c
+++ b/src/autofit/afdummy.c
@@ -1,20 +1,20 @@
-/***************************************************************************/
-/* */
-/* afdummy.c */
-/* */
-/* Auto-fitter dummy routines to be used if no hinting should be */
-/* performed (body). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afdummy.c
+ *
+ * Auto-fitter dummy routines to be used if no hinting should be
+ * performed (body).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#include "afdummy.h"
diff --git a/src/autofit/afdummy.h b/src/autofit/afdummy.h
index b382acd92..e01c49cad 100644
--- a/src/autofit/afdummy.h
+++ b/src/autofit/afdummy.h
@@ -1,20 +1,20 @@
-/***************************************************************************/
-/* */
-/* afdummy.h */
-/* */
-/* Auto-fitter dummy routines to be used if no hinting should be */
-/* performed (specification). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afdummy.h
+ *
+ * Auto-fitter dummy routines to be used if no hinting should be
+ * performed (specification).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#ifndef AFDUMMY_H_
diff --git a/src/autofit/aferrors.h b/src/autofit/aferrors.h
index e5de54360..56e00cc60 100644
--- a/src/autofit/aferrors.h
+++ b/src/autofit/aferrors.h
@@ -1,27 +1,27 @@
-/***************************************************************************/
-/* */
-/* aferrors.h */
-/* */
-/* Autofitter error codes (specification only). */
-/* */
-/* Copyright 2005-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
-
-
- /*************************************************************************/
- /* */
- /* This file is used to define the Autofitter error enumeration */
- /* constants. */
- /* */
- /*************************************************************************/
+/****************************************************************************
+ *
+ * aferrors.h
+ *
+ * Autofitter error codes (specification only).
+ *
+ * Copyright 2005-2018 by
+ * 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.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * This file is used to define the Autofitter error enumeration
+ * constants.
+ *
+ */
#ifndef AFERRORS_H_
#define AFERRORS_H_
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index 28742b8b2..9e7764b43 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afglobal.c */
-/* */
-/* Auto-fitter routines to compute global hinting values (body). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afglobal.c
+ *
+ * Auto-fitter routines to compute global hinting values (body).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#include "afglobal.h"
@@ -22,12 +22,12 @@
#include FT_INTERNAL_DEBUG_H
- /*************************************************************************/
- /* */
- /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
- /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
- /* messages during execution. */
- /* */
+ /**************************************************************************
+ *
+ * The macro FT_COMPONENT is used in trace mode. It is an implicit
+ * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
+ * messages during execution.
+ */
#undef FT_COMPONENT
#define FT_COMPONENT trace_afglobal
@@ -167,8 +167,8 @@
continue;
/*
- * Scan all Unicode points in the range and set the corresponding
- * glyph style index.
+ * Scan all Unicode points in the range and set the corresponding
+ * glyph style index.
*/
if ( style_class->coverage == AF_COVERAGE_DEFAULT )
{
@@ -265,8 +265,8 @@
Exit:
/*
- * By default, all uncovered glyphs are set to the fallback style.
- * XXX: Shouldn't we disable hinting or do something similar?
+ * By default, all uncovered glyphs are set to the fallback style.
+ * XXX: Shouldn't we disable hinting or do something similar?
*/
if ( globals->module->fallback_style != AF_STYLE_UNASSIGNED )
{
diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h
index 489ed46d9..e26ea2f94 100644
--- a/src/autofit/afglobal.h
+++ b/src/autofit/afglobal.h
@@ -1,20 +1,20 @@
-/***************************************************************************/
-/* */
-/* afglobal.h */
-/* */
-/* Auto-fitter routines to compute global hinting values */
-/* (specification). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afglobal.h
+ *
+ * Auto-fitter routines to compute global hinting values
+ * (specification).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#ifndef AFGLOBAL_H_
@@ -60,8 +60,8 @@ FT_BEGIN_HEADER
/*
- * Default values and flags for both autofitter globals (found in
- * AF_ModuleRec) and face globals (in AF_FaceGlobalsRec).
+ * Default values and flags for both autofitter globals (found in
+ * AF_ModuleRec) and face globals (in AF_FaceGlobalsRec).
*/
/* index of fallback style in `af_style_classes' */
@@ -98,8 +98,8 @@ FT_BEGIN_HEADER
/*
- * Note that glyph_styles[] maps each glyph to an index into the
- * `af_style_classes' array.
+ * Note that glyph_styles[] maps each glyph to an index into the
+ * `af_style_classes' array.
*
*/
typedef struct AF_FaceGlobalsRec_
@@ -140,8 +140,8 @@ FT_BEGIN_HEADER
/*
- * model the global hints data for a given face, decomposed into
- * style-specific items
+ * model the global hints data for a given face, decomposed into
+ * style-specific items
*/
FT_LOCAL( FT_Error )
diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c
index 0666dbc8e..65f0e85f8 100644
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afhints.c */
-/* */
-/* Auto-fitter hinting routines (body). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afhints.c
+ *
+ * Auto-fitter hinting routines (body).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#include "afhints.h"
@@ -22,12 +22,12 @@
#include FT_INTERNAL_DEBUG_H
- /*************************************************************************/
- /* */
- /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
- /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
- /* messages during execution. */
- /* */
+ /**************************************************************************
+ *
+ * The macro FT_COMPONENT is used in trace mode. It is an implicit
+ * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
+ * messages during execution.
+ */
#undef FT_COMPONENT
#define FT_COMPONENT trace_afhints
@@ -558,8 +558,8 @@
/*
- * note: AF_DIMENSION_HORZ corresponds to _vertical_ edges
- * since they have a constant X coordinate.
+ * note: AF_DIMENSION_HORZ corresponds to _vertical_ edges
+ * since they have a constant X coordinate.
*/
if ( dimension == AF_DIMENSION_HORZ )
AF_DUMP(( "Table of %s edges (1px=%.2fu, 10u=%.2fpx):\n",
@@ -681,8 +681,8 @@
memory = hints->memory;
/*
- * note that we don't need to free the segment and edge
- * buffers since they are really within the hints->points array
+ * note that we don't need to free the segment and edge
+ * buffers since they are really within the hints->points array
*/
for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
{
@@ -776,9 +776,9 @@
}
/*
- * then reallocate the points arrays if necessary --
- * note that we reserve two additional point positions, used to
- * hint metrics appropriately
+ * then reallocate the points arrays if necessary --
+ * note that we reserve two additional point positions, used to
+ * hint metrics appropriately
*/
new_max = (FT_UInt)( outline->n_points + 2 );
old_max = (FT_UInt)hints->max_points;
@@ -918,15 +918,15 @@
{
/*
- * Compute directions of `in' and `out' vectors.
+ * Compute directions of `in' and `out' vectors.
*
- * Note that distances between points that are very near to each
- * other are accumulated. In other words, the auto-hinter either
- * prepends the small vectors between near points to the first
- * non-near vector, or the sum of small vector lengths exceeds a
- * threshold, thus `grouping' the small vectors. All intermediate
- * points are tagged as weak; the directions are adjusted also to
- * be equal to the accumulated one.
+ * Note that distances between points that are very near to each
+ * other are accumulated. In other words, the auto-hinter either
+ * prepends the small vectors between near points to the first
+ * non-near vector, or the sum of small vector lengths exceeds a
+ * threshold, thus `grouping' the small vectors. All intermediate
+ * points are tagged as weak; the directions are adjusted also to
+ * be equal to the accumulated one.
*/
FT_Int near_limit2 = 2 * near_limit - 1;
@@ -956,12 +956,12 @@
out_y = point->fy - prev->fy;
/*
- * We use Taxicab metrics to measure the vector length.
+ * We use Taxicab metrics to measure the vector length.
*
- * Note that the accumulated distances so far could have the
- * opposite direction of the distance measured here. For this
- * reason we use `near_limit2' for the comparison to get a
- * non-near point even in the worst case.
+ * Note that the accumulated distances so far could have the
+ * opposite direction of the distance measured here. For this
+ * reason we use `near_limit2' for the comparison to get a
+ * non-near point even in the worst case.
*/
if ( FT_ABS( out_x ) + FT_ABS( out_y ) >= near_limit2 )
break;
@@ -979,11 +979,11 @@
curr = first;
/*
- * We abuse the `u' and `v' fields to store index deltas to the
- * next and previous non-near point, respectively.
+ * We abuse the `u' and `v' fields to store index deltas to the
+ * next and previous non-near point, respectively.
*
- * To avoid problems with not having non-near points, we point to
- * `first' by default as the next non-near point.
+ * To avoid problems with not having non-near points, we point to
+ * `first' by default as the next non-near point.
*
*/
curr->u = (FT_Pos)( first - curr );
@@ -1035,12 +1035,12 @@
}
/*
- * The next step is to `simplify' an outline's topology so that we
- * can identify local extrema more reliably: A series of
- * non-horizontal or non-vertical vectors pointing into the same
- * quadrant are handled as a single, long vector. From a
- * topological point of the view, the intermediate points are of no
- * interest and thus tagged as weak.
+ * The next step is to `simplify' an outline's topology so that we
+ * can identify local extrema more reliably: A series of
+ * non-horizontal or non-vertical vectors pointing into the same
+ * quadrant are handled as a single, long vector. From a
+ * topological point of the view, the intermediate points are of no
+ * interest and thus tagged as weak.
*/
for ( point = points; point < point_limit; point++ )
@@ -1080,9 +1080,9 @@
}
/*
- * Finally, check for remaining weak points. Everything else not
- * collected in edges so far is then implicitly classified as strong
- * points.
+ * Finally, check for remaining weak points. Everything else not
+ * collected in edges so far is then implicitly classified as strong
+ * points.
*/
for ( point = points; point < point_limit; point++ )
diff --git a/src/autofit/afhints.h b/src/autofit/afhints.h
index 3326ebc44..aee9d468f 100644
--- a/src/autofit/afhints.h
+++ b/src/autofit/afhints.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afhints.h */
-/* */
-/* Auto-fitter hinting routines (specification). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afhints.h
+ *
+ * Auto-fitter hinting routines (specification).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#ifndef AFHINTS_H_
@@ -26,8 +26,8 @@
FT_BEGIN_HEADER
/*
- * The definition of outline glyph hints. These are shared by all
- * writing system analysis routines (until now).
+ * The definition of outline glyph hints. These are shared by all
+ * writing system analysis routines (until now).
*/
typedef enum AF_Dimension_
@@ -56,153 +56,153 @@ FT_BEGIN_HEADER
/*
- * The following explanations are mostly taken from the article
+ * The following explanations are mostly taken from the article
*
- * Real-Time Grid Fitting of Typographic Outlines
+ * Real-Time Grid Fitting of Typographic Outlines
*
- * by David Turner and Werner Lemberg
+ * by David Turner and Werner Lemberg
*
- * https://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf
+ * https://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf
*
- * with appropriate updates.
+ * with appropriate updates.
*
*
- * Segments
+ * Segments
*
- * `af_{cjk,latin,...}_hints_compute_segments' are the functions to
- * find segments in an outline.
+ * `af_{cjk,latin,...}_hints_compute_segments' are the functions to
+ * find segments in an outline.
*
- * A segment is a series of at least two consecutive points that are
- * approximately aligned along a coordinate axis. The analysis to do
- * so is specific to a writing system.
+ * A segment is a series of at least two consecutive points that are
+ * approximately aligned along a coordinate axis. The analysis to do
+ * so is specific to a writing system.
*
*
- * Edges
+ * Edges
*
- * `af_{cjk,latin,...}_hints_compute_edges' are the functions to find
- * edges.
+ * `af_{cjk,latin,...}_hints_compute_edges' are the functions to find
+ * edges.
*
- * As soon as segments are defined, the auto-hinter groups them into
- * edges. An edge corresponds to a single position on the main
- * dimension that collects one or more segments (allowing for a small
- * threshold).
+ * As soon as segments are defined, the auto-hinter groups them into
+ * edges. An edge corresponds to a single position on the main
+ * dimension that collects one or more segments (allowing for a small
+ * threshold).
*
- * As an example, the `latin' writing system first tries to grid-fit
- * edges, then to align segments on the edges unless it detects that
- * they form a serif.
+ * As an example, the `latin' writing system first tries to grid-fit
+ * edges, then to align segments on the edges unless it detects that
+ * they form a serif.
*
*
- * A H
- * | |
- * | |
- * | |
- * | |
- * C | | F
- * +------<-----+ +-----<------+
- * | B G |
- * | |
- * | |
- * +--------------->------------------+
- * D E
+ * A H
+ * | |
+ * | |
+ * | |
+ * | |
+ * C | | F
+ * +------<-----+ +-----<------+
+ * | B G |
+ * | |
+ * | |
+ * +--------------->------------------+
+ * D E
*
*
- * Stems
+ * Stems
*
- * Stems are detected by `af_{cjk,latin,...}_hint_edges'.
+ * Stems are detected by `af_{cjk,latin,...}_hint_edges'.
*
- * Segments need to be `linked' to other ones in order to detect stems.
- * A stem is made of two segments that face each other in opposite
- * directions and that are sufficiently close to each other. Using
- * vocabulary from the TrueType specification, stem segments form a
- * `black distance'.
+ * Segments need to be `linked' to other ones in order to detect stems.
+ * A stem is made of two segments that face each other in opposite
+ * directions and that are sufficiently close to each other. Using
+ * vocabulary from the TrueType specification, stem segments form a
+ * `black distance'.
*
- * In the above ASCII drawing, the horizontal segments are BC, DE, and
- * FG; the vertical segments are AB, CD, EF, and GH.
+ * In the above ASCII drawing, the horizontal segments are BC, DE, and
+ * FG; the vertical segments are AB, CD, EF, and GH.
*
- * Each segment has at most one `best' candidate to form a black
- * distance, or no candidate at all. Notice that two distinct segments
- * can have the same candidate, which frequently means a serif.
+ * Each segment has at most one `best' candidate to form a black
+ * distance, or no candidate at all. Notice that two distinct segments
+ * can have the same candidate, which frequently means a serif.
*
- * A stem is recognized by the following condition:
+ * A stem is recognized by the following condition:
*
- * best segment_1 = segment_2 && best segment_2 = segment_1
+ * best segment_1 = segment_2 && best segment_2 = segment_1
*
- * The best candidate is stored in field `link' in structure
- * `AF_Segment'.
+ * The best candidate is stored in field `link' in structure
+ * `AF_Segment'.
*
- * In the above ASCII drawing, the best candidate for both AB and CD is
- * GH, while the best candidate for GH is AB. Similarly, the best
- * candidate for EF and GH is AB, while the best candidate for AB is
- * GH.
+ * In the above ASCII drawing, the best candidate for both AB and CD is
+ * GH, while the best candidate for GH is AB. Similarly, the best
+ * candidate for EF and GH is AB, while the best candidate for AB is
+ * GH.
*
- * The detection and handling of stems is dependent on the writing
- * system.
+ * The detection and handling of stems is dependent on the writing
+ * system.
*
*
- * Serifs
+ * Serifs
*
- * Serifs are detected by `af_{cjk,latin,...}_hint_edges'.
+ * Serifs are detected by `af_{cjk,latin,...}_hint_edges'.
*
- * In comparison to a stem, a serif (as handled by the auto-hinter
- * module that takes care of the `latin' writing system) has
+ * In comparison to a stem, a serif (as handled by the auto-hinter
+ * module that takes care of the `latin' writing system) has
*
- * best segment_1 = segment_2 && best segment_2 != segment_1
+ * best segment_1 = segment_2 && best segment_2 != segment_1
*
- * where segment_1 corresponds to the serif segment (CD and EF in the
- * above ASCII drawing).
+ * where segment_1 corresponds to the serif segment (CD and EF in the
+ * above ASCII drawing).
*
- * The best candidate is stored in field `serif' in structure
- * `AF_Segment' (and `link' is set to NULL).
+ * The best candidate is stored in field `serif' in structure
+ * `AF_Segment' (and `link' is set to NULL).
*
*
- * Touched points
+ * Touched points
*
- * A point is called `touched' if it has been processed somehow by the
- * auto-hinter. It basically means that it shouldn't be moved again
- * (or moved only under certain constraints to preserve the already
- * applied processing).
+ * A point is called `touched' if it has been processed somehow by the
+ * auto-hinter. It basically means that it shouldn't be moved again
+ * (or moved only under certain constraints to preserve the already
+ * applied processing).
*
*
- * Flat and round segments
+ * Flat and round segments
*
- * Segments are `round' or `flat', depending on the series of points
- * that define them. A segment is round if the next and previous point
- * of an extremum (which can be either a single point or sequence of
- * points) are both conic or cubic control points. Otherwise, a
- * segment with an extremum is flat.
+ * Segments are `round' or `flat', depending on the series of points
+ * that define them. A segment is round if the next and previous point
+ * of an extremum (which can be either a single point or sequence of
+ * points) are both conic or cubic control points. Otherwise, a
+ * segment with an extremum is flat.
*
*
- * Strong Points
+ * Strong Points
*
- * Experience has shown that points not part of an edge need to be
- * interpolated linearly between their two closest edges, even if these
- * are not part of the contour of those particular points. Typical
- * candidates for this are
+ * Experience has shown that points not part of an edge need to be
+ * interpolated linearly between their two closest edges, even if these
+ * are not part of the contour of those particular points. Typical
+ * candidates for this are
*
- * - angle points (i.e., points where the `in' and `out' direction
- * differ greatly)
+ * - angle points (i.e., points where the `in' and `out' direction
+ * differ greatly)
*
- * - inflection points (i.e., where the `in' and `out' angles are the
- * same, but the curvature changes sign) [currently, such points
- * aren't handled specially in the auto-hinter]
+ * - inflection points (i.e., where the `in' and `out' angles are the
+ * same, but the curvature changes sign) [currently, such points
+ * aren't handled specially in the auto-hinter]
*
- * `af_glyph_hints_align_strong_points' is the function that takes
- * care of such situations; it is equivalent to the TrueType `IP'
- * hinting instruction.
+ * `af_glyph_hints_align_strong_points' is the function that takes
+ * care of such situations; it is equivalent to the TrueType `IP'
+ * hinting instruction.
*
*
- * Weak Points
+ * Weak Points
*
- * Other points in the outline must be interpolated using the
- * coordinates of their previous and next unfitted contour neighbours.
- * These are called `weak points' and are touched by the function
- * `af_glyph_hints_align_weak_points', equivalent to the TrueType `IUP'
- * hinting instruction. Typical candidates are control points and
- * points on the contour without a major direction.
+ * Other points in the outline must be interpolated using the
+ * coordinates of their previous and next unfitted contour neighbours.
+ * These are called `weak points' and are touched by the function
+ * `af_glyph_hints_align_weak_points', equivalent to the TrueType `IUP'
+ * hinting instruction. Typical candidates are control points and
+ * points on the contour without a major direction.
*
- * The major effect is to reduce possible distortion caused by
- * alignment of edges and strong points, thus weak points are processed
- * after strong points.
+ * The major effect is to reduce possible distortion caused by
+ * alignment of edges and strong points, thus weak points are processed
+ * after strong points.
*/
diff --git a/src/autofit/afindic.c b/src/autofit/afindic.c
index dfbea5f34..45c1a107e 100644
--- a/src/autofit/afindic.c
+++ b/src/autofit/afindic.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afindic.c */
-/* */
-/* Auto-fitter hinting routines for Indic writing system (body). */
-/* */
-/* Copyright 2007-2018 by */
-/* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afindic.c
+ *
+ * Auto-fitter hinting routines for Indic writing system (body).
+ *
+ * Copyright 2007-2018 by
+ * Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>.
+ *
+ * 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.
+ *
+ */
#include "aftypes.h"
diff --git a/src/autofit/afindic.h b/src/autofit/afindic.h
index 5688738e6..94ff764e0 100644
--- a/src/autofit/afindic.h
+++ b/src/autofit/afindic.h
@@ -1,20 +1,20 @@
-/***************************************************************************/
-/* */
-/* afindic.h */
-/* */
-/* Auto-fitter hinting routines for Indic writing system */
-/* (specification). */
-/* */
-/* Copyright 2007-2018 by */
-/* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */
-/* */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afindic.h
+ *
+ * Auto-fitter hinting routines for Indic writing system
+ * (specification).
+ *
+ * Copyright 2007-2018 by
+ * Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>.
+ *
+ * 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.
+ *
+ */
#ifndef AFINDIC_H_
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index 9b2d2b04a..a90fc1ca7 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* aflatin.c */
-/* */
-/* Auto-fitter hinting routines for latin writing system (body). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * aflatin.c
+ *
+ * Auto-fitter hinting routines for latin writing system (body).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#include <ft2build.h>
@@ -30,12 +30,12 @@
#endif
- /*************************************************************************/
- /* */
- /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
- /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
- /* messages during execution. */
- /* */
+ /**************************************************************************
+ *
+ * The macro FT_COMPONENT is used in trace mode. It is an implicit
+ * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
+ * messages during execution.
+ */
#undef FT_COMPONENT
#define FT_COMPONENT trace_aflatin
@@ -191,10 +191,10 @@
goto Exit;
/*
- * We assume that the glyphs selected for the stem width
- * computation are `featureless' enough so that the linking
- * algorithm works fine without adjustments of its scoring
- * function.
+ * We assume that the glyphs selected for the stem width
+ * computation are `featureless' enough so that the linking
+ * algorithm works fine without adjustments of its scoring
+ * function.
*/
af_latin_hints_link_segments( hints,
0,
@@ -898,8 +898,8 @@
if ( num_flats == 0 && num_rounds == 0 )
{
/*
- * we couldn't find a single glyph to compute this blue zone,
- * we will simply ignore it then
+ * we couldn't find a single glyph to compute this blue zone,
+ * we will simply ignore it then
*/
FT_TRACE5(( " empty\n" ));
continue;
@@ -1991,17 +1991,17 @@
if ( len >= len_threshold )
{
/*
- * The score is the sum of two demerits indicating the
- * `badness' of a fit, measured along the segments' main axis
- * and orthogonal to it, respectively.
+ * The score is the sum of two demerits indicating the
+ * `badness' of a fit, measured along the segments' main axis
+ * and orthogonal to it, respectively.
*
- * o The less overlapping along the main axis, the worse it
- * is, causing a larger demerit.
+ * - The less overlapping along the main axis, the worse it
+ * is, causing a larger demerit.
*
- * o The nearer the orthogonal distance to a stem width, the
- * better it is, causing a smaller demerit. For simplicity,
- * however, we only increase the demerit for values that
- * exceed the largest stem width.
+ * - The nearer the orthogonal distance to a stem width, the
+ * better it is, causing a smaller demerit. For simplicity,
+ * however, we only increase the demerit for values that
+ * exceed the largest stem width.
*/
FT_Pos dist = pos2 - pos1;
@@ -2105,9 +2105,9 @@
top_to_bottom_hinting = script_class->top_to_bottom_hinting;
/*
- * We ignore all segments that are less than 1 pixel in length
- * to avoid many problems with serif fonts. We compute the
- * corresponding threshold in font units.
+ * We ignore all segments that are less than 1 pixel in length
+ * to avoid many problems with serif fonts. We compute the
+ * corresponding threshold in font units.
*/
if ( dim == AF_DIMENSION_HORZ )
segment_length_threshold = FT_DivFix( 64, hints->y_scale );
@@ -2115,26 +2115,26 @@
segment_length_threshold = 0;
/*
- * Similarly, we ignore segments that have a width delta
- * larger than 0.5px (i.e., a width larger than 1px).
+ * Similarly, we ignore segments that have a width delta
+ * larger than 0.5px (i.e., a width larger than 1px).
*/
segment_width_threshold = FT_DivFix( 32, scale );
- /*********************************************************************/
- /* */
- /* We begin by generating a sorted table of edges for the current */
- /* direction. To do so, we simply scan each segment and try to find */
- /* an edge in our table that corresponds to its position. */
- /* */
- /* If no edge is found, we create and insert a new edge in the */
- /* sorted table. Otherwise, we simply add the segment to the edge's */
- /* list which gets processed in the second step to compute the */
- /* edge's properties. */
- /* */
- /* Note that the table of edges is sorted along the segment/edge */
- /* position. */
- /* */
- /*********************************************************************/
+ /**********************************************************************
+ *
+ * We begin by generating a sorted table of edges for the current
+ * direction. To do so, we simply scan each segment and try to find
+ * an edge in our table that corresponds to its position.
+ *
+ * If no edge is found, we create and insert a new edge in the
+ * sorted table. Otherwise, we simply add the segment to the edge's
+ * list which gets processed in the second step to compute the
+ * edge's properties.
+ *
+ * Note that the table of edges is sorted along the segment/edge
+ * position.
+ *
+ */
/* assure that edge distance threshold is at most 0.25px */
edge_distance_threshold = FT_MulFix( laxis->edge_distance_threshold,
@@ -2256,17 +2256,17 @@
}
- /******************************************************************/
- /* */
- /* Good, we now compute each edge's properties according to the */
- /* segments found on its position. Basically, these are */
- /* */
- /* - the edge's main direction */
- /* - stem edge, serif edge or both (which defaults to stem then) */
- /* - rounded edge, straight or both (which defaults to straight) */
- /* - link for edge */
- /* */
- /******************************************************************/
+ /*******************************************************************
+ *
+ * Good, we now compute each edge's properties according to the
+ * segments found on its position. Basically, these are
+ *
+ * - the edge's main direction
+ * - stem edge, serif edge or both (which defaults to stem then)
+ * - rounded edge, straight or both (which defaults to straight)
+ * - link for edge
+ *
+ */
/* first of all, set the `edge' field in each segment -- this is */
/* required in order to compute edge links */
@@ -2565,8 +2565,8 @@
af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics );
/*
- * correct x_scale and y_scale if needed, since they may have
- * been modified by `af_latin_metrics_scale_dim' above
+ * correct x_scale and y_scale if needed, since they may have
+ * been modified by `af_latin_metrics_scale_dim' above
*/
hints->x_scale = metrics->axis[AF_DIMENSION_HORZ].scale;
hints->x_delta = metrics->axis[AF_DIMENSION_HORZ].delta;
@@ -2585,21 +2585,21 @@
other_flags = 0;
/*
- * We snap the width of vertical stems for the monochrome and
- * horizontal LCD rendering targets only.
+ * We snap the width of vertical stems for the monochrome and
+ * horizontal LCD rendering targets only.
*/
if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
/*
- * We snap the width of horizontal stems for the monochrome and
- * vertical LCD rendering targets only.
+ * We snap the width of horizontal stems for the monochrome and
+ * vertical LCD rendering targets only.
*/
if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
other_flags |= AF_LATIN_HINTS_VERT_SNAP;
/*
- * We adjust stems to full pixels unless in `light' or `lcd' mode.
+ * We adjust stems to full pixels unless in `light' or `lcd' mode.
*/
if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD )
other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
@@ -2608,11 +2608,11 @@
other_flags |= AF_LATIN_HINTS_MONO;
/*
- * In `light' or `lcd' mode we disable horizontal hinting completely.
- * We also do it if the face is italic.
+ * In `light' or `lcd' mode we disable horizontal hinting completely.
+ * We also do it if the face is italic.
*
- * However, if warping is enabled (which only works in `light' hinting
- * mode), advance widths get adjusted, too.
+ * However, if warping is enabled (which only works in `light' hinting
+ * mode), advance widths get adjusted, too.
*/
if ( mode == FT_RENDER_MODE_LIGHT || mode == FT_RENDER_MODE_LCD ||
( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )
@@ -2990,12 +2990,12 @@
edge2 = edge->link;
/*
- * If a stem contains both a neutral and a non-neutral blue zone,
- * skip the neutral one. Otherwise, outlines with different
- * directions might be incorrectly aligned at the same vertical
- * position.
+ * If a stem contains both a neutral and a non-neutral blue zone,
+ * skip the neutral one. Otherwise, outlines with different
+ * directions might be incorrectly aligned at the same vertical
+ * position.
*
- * If we have two neutral blue zones, skip one of them.
+ * If we have two neutral blue zones, skip one of them.
*
*/
if ( edge->blue_edge && edge2 && edge2->blue_edge )
@@ -3358,8 +3358,8 @@
if ( has_serifs || !anchor )
{
/*
- * now hint the remaining edges (serifs and single) in order
- * to complete our processing
+ * now hint the remaining edges (serifs and single) in order
+ * to complete our processing
*/
for ( edge = edges; edge < edge_limit; edge++ )
{
diff --git a/src/autofit/aflatin.h b/src/autofit/aflatin.h
index 432cccce4..6b429bddd 100644
--- a/src/autofit/aflatin.h
+++ b/src/autofit/aflatin.h
@@ -1,20 +1,20 @@
-/***************************************************************************/
-/* */
-/* aflatin.h */
-/* */
-/* Auto-fitter hinting routines for latin writing system */
-/* (specification). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * aflatin.h
+ *
+ * Auto-fitter hinting routines for latin writing system
+ * (specification).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#ifndef AFLATIN_H_
@@ -45,9 +45,9 @@ FT_BEGIN_HEADER
/*
- * The following declarations could be embedded in the file `aflatin.c';
- * they have been made semi-public to allow alternate writing system
- * hinters to re-use some of them.
+ * The following declarations could be embedded in the file `aflatin.c';
+ * they have been made semi-public to allow alternate writing system
+ * hinters to re-use some of them.
*/
@@ -161,8 +161,8 @@ FT_BEGIN_HEADER
/*
- * The next functions shouldn't normally be exported. However, other
- * writing systems might like to use these functions as-is.
+ * The next functions shouldn't normally be exported. However, other
+ * writing systems might like to use these functions as-is.
*/
FT_LOCAL( FT_Error )
af_latin_hints_compute_segments( AF_GlyphHints hints,
diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c
index 5c7137811..c5ce0439e 100644
--- a/src/autofit/aflatin2.c
+++ b/src/autofit/aflatin2.c
@@ -3,22 +3,22 @@
/* marked as experimental. */
-/***************************************************************************/
-/* */
-/* aflatin2.c */
-/* */
-/* Auto-fitter hinting routines for latin writing system (body). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * aflatin2.c
+ *
+ * Auto-fitter hinting routines for latin writing system (body).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#include FT_ADVANCES_H
@@ -37,12 +37,12 @@
#endif
- /*************************************************************************/
- /* */
- /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
- /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
- /* messages during execution. */
- /* */
+ /**************************************************************************
+ *
+ * The macro FT_COMPONENT is used in trace mode. It is an implicit
+ * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
+ * messages during execution.
+ */
#undef FT_COMPONENT
#define FT_COMPONENT trace_aflatin2
@@ -358,8 +358,8 @@
if ( num_flats == 0 && num_rounds == 0 )
{
/*
- * we couldn't find a single glyph to compute this blue zone,
- * we will simply ignore it then
+ * we couldn't find a single glyph to compute this blue zone,
+ * we will simply ignore it then
*/
FT_TRACE5(( " empty\n" ));
continue;
@@ -1108,13 +1108,13 @@
: AF_DIR_RIGHT;
/*
- * We want to ignore very small (mostly serif) segments, we do that
- * by ignoring those that whose length is less than a given fraction
- * of the standard width. If there is no standard width, we ignore
- * those that are less than a given size in pixels
+ * We want to ignore very small (mostly serif) segments, we do that
+ * by ignoring those that whose length is less than a given fraction
+ * of the standard width. If there is no standard width, we ignore
+ * those that are less than a given size in pixels
*
- * also, unlink serif segments that are linked to segments farther
- * than 50% of the standard width
+ * also, unlink serif segments that are linked to segments farther
+ * than 50% of the standard width
*/
if ( dim == AF_DIMENSION_HORZ )
{
@@ -1126,21 +1126,21 @@
else
segment_length_threshold = 0;
- /*********************************************************************/
- /* */
- /* We will begin by generating a sorted table of edges for the */
- /* current direction. To do so, we simply scan each segment and try */
- /* to find an edge in our table that corresponds to its position. */
- /* */
- /* If no edge is found, we create and insert a new edge in the */
- /* sorted table. Otherwise, we simply add the segment to the edge's */
- /* list which will be processed in the second step to compute the */
- /* edge's properties. */
- /* */
- /* Note that the edges table is sorted along the segment/edge */
- /* position. */
- /* */
- /*********************************************************************/
+ /**********************************************************************
+ *
+ * We will begin by generating a sorted table of edges for the
+ * current direction. To do so, we simply scan each segment and try
+ * to find an edge in our table that corresponds to its position.
+ *
+ * If no edge is found, we create and insert a new edge in the
+ * sorted table. Otherwise, we simply add the segment to the edge's
+ * list which will be processed in the second step to compute the
+ * edge's properties.
+ *
+ * Note that the edges table is sorted along the segment/edge
+ * position.
+ *
+ */
edge_distance_threshold = FT_MulFix( laxis->edge_distance_threshold,
scale );
@@ -1230,17 +1230,17 @@
}
- /*********************************************************************/
- /* */
- /* Good, we will now compute each edge's properties according to */
- /* segments found on its position. Basically, these are: */
- /* */
- /* - edge's main direction */
- /* - stem edge, serif edge or both (which defaults to stem then) */
- /* - rounded edge, straight or both (which defaults to straight) */
- /* - link for edge */
- /* */
- /*********************************************************************/
+ /**********************************************************************
+ *
+ * Good, we will now compute each edge's properties according to
+ * segments found on its position. Basically, these are:
+ *
+ * - edge's main direction
+ * - stem edge, serif edge or both (which defaults to stem then)
+ * - rounded edge, straight or both (which defaults to straight)
+ * - link for edge
+ *
+ */
/* first of all, set the `edge' field in each segment -- this is */
/* required in order to compute edge links */
@@ -1524,8 +1524,8 @@
af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics );
/*
- * correct x_scale and y_scale if needed, since they may have
- * been modified `af_latin2_metrics_scale_dim' above
+ * correct x_scale and y_scale if needed, since they may have
+ * been modified `af_latin2_metrics_scale_dim' above
*/
hints->x_scale = metrics->axis[AF_DIMENSION_HORZ].scale;
hints->x_delta = metrics->axis[AF_DIMENSION_HORZ].delta;
@@ -1544,21 +1544,21 @@
other_flags = 0;
/*
- * We snap the width of vertical stems for the monochrome and
- * horizontal LCD rendering targets only.
+ * We snap the width of vertical stems for the monochrome and
+ * horizontal LCD rendering targets only.
*/
if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
/*
- * We snap the width of horizontal stems for the monochrome and
- * vertical LCD rendering targets only.
+ * We snap the width of horizontal stems for the monochrome and
+ * vertical LCD rendering targets only.
*/
if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
other_flags |= AF_LATIN_HINTS_VERT_SNAP;
/*
- * We adjust stems to full pixels unless in `light' or `lcd' mode.
+ * We adjust stems to full pixels unless in `light' or `lcd' mode.
*/
if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD )
other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
@@ -1567,8 +1567,8 @@
other_flags |= AF_LATIN_HINTS_MONO;
/*
- * In `light' or `lcd' mode we disable horizontal hinting completely.
- * We also do it if the face is italic.
+ * In `light' or `lcd' mode we disable horizontal hinting completely.
+ * We also do it if the face is italic.
*/
if ( mode == FT_RENDER_MODE_LIGHT || mode == FT_RENDER_MODE_LCD ||
( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )
@@ -2233,8 +2233,8 @@
if ( has_serifs || !anchor )
{
/*
- * now hint the remaining edges (serifs and single) in order
- * to complete our processing
+ * now hint the remaining edges (serifs and single) in order
+ * to complete our processing
*/
for ( edge = edges; edge < edge_limit; edge++ )
{
diff --git a/src/autofit/aflatin2.h b/src/autofit/aflatin2.h
index 0129dc707..e8e738242 100644
--- a/src/autofit/aflatin2.h
+++ b/src/autofit/aflatin2.h
@@ -3,23 +3,23 @@
/* marked as experimental. */
-/***************************************************************************/
-/* */
-/* aflatin2.h */
-/* */
-/* Auto-fitter hinting routines for latin writing system */
-/* (specification). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * aflatin2.h
+ *
+ * Auto-fitter hinting routines for latin writing system
+ * (specification).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#ifndef AFLATIN2_H_
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index 06cf8c35b..301f3772a 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afloader.c */
-/* */
-/* Auto-fitter glyph loading routines (body). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afloader.c
+ *
+ * Auto-fitter glyph loading routines (body).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#include "afglobal.h"
@@ -118,9 +118,9 @@
}
/*
- * 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.
+ * 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.
*/
writing_system_class =
af_writing_system_classes[style_metrics->style_class->writing_system];
@@ -173,22 +173,22 @@
globals->darken_y = af_fixedToInt( darken_y );
/*
- * 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).
+ * 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).
*
- * 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!
+ * 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!
*
- * 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.
+ * 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.
*/
globals->scale_down_factor =
FT_DivFix( em_size - ( darken_by_font_units_y + af_intToFixed( 8 ) ),
@@ -277,13 +277,13 @@
}
/*
- * 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.
+ * 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.
*/
scaler.face = face;
scaler.x_scale = size_internal->autohint_metrics.x_scale;
@@ -307,10 +307,10 @@
#endif
/*
- * 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.
+ * 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.
*/
error = af_face_globals_get_metrics( loader->globals, glyph_index,
style_options, &style_metrics );
@@ -337,11 +337,11 @@
}
/*
- * 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.
+ * 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.
*/
load_flags |= FT_LOAD_NO_SCALE |
FT_LOAD_IGNORE_TRANSFORM |
@@ -353,26 +353,26 @@
goto Exit;
/*
- * 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.
+ * 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.
*
- * 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.
+ * 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.
*
- * 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.
+ * 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.
*
- * Ignore errors and carry on without emboldening.
+ * Ignore errors and carry on without emboldening.
*
*/
diff --git a/src/autofit/afloader.h b/src/autofit/afloader.h
index d4d72d158..773ff604a 100644
--- a/src/autofit/afloader.h
+++ b/src/autofit/afloader.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afloader.h */
-/* */
-/* Auto-fitter glyph loading routines (specification). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afloader.h
+ *
+ * Auto-fitter glyph loading routines (specification).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#ifndef AFLOADER_H_
@@ -27,11 +27,11 @@
FT_BEGIN_HEADER
/*
- * The autofitter module's (global) data structure to communicate with
- * actual fonts. If necessary, `local' data like the current face, the
- * current face's auto-hint data, or the current glyph's parameters
- * relevant to auto-hinting are `swapped in'. Cf. functions like
- * `af_loader_reset' and `af_loader_load_g'.
+ * The autofitter module's (global) data structure to communicate with
+ * actual fonts. If necessary, `local' data like the current face, the
+ * current face's auto-hint data, or the current glyph's parameters
+ * relevant to auto-hinting are `swapped in'. Cf. functions like
+ * `af_loader_reset' and `af_loader_load_g'.
*/
typedef struct AF_LoaderRec_
diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c
index 0439a76b4..7f9f043c5 100644
--- a/src/autofit/afmodule.c
+++ b/src/autofit/afmodule.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afmodule.c */
-/* */
-/* Auto-fitter module implementation (body). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afmodule.c
+ *
+ * Auto-fitter module implementation (body).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#include "afglobal.h"
@@ -59,12 +59,12 @@
#include FT_SERVICE_PROPERTIES_H
- /*************************************************************************/
- /* */
- /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
- /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
- /* messages during execution. */
- /* */
+ /**************************************************************************
+ *
+ * The macro FT_COMPONENT is used in trace mode. It is an implicit
+ * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
+ * messages during execution.
+ */
#undef FT_COMPONENT
#define FT_COMPONENT trace_afmodule
diff --git a/src/autofit/afmodule.h b/src/autofit/afmodule.h
index 56f64eaf2..0db6ef066 100644
--- a/src/autofit/afmodule.h
+++ b/src/autofit/afmodule.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afmodule.h */
-/* */
-/* Auto-fitter module implementation (specification). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afmodule.h
+ *
+ * Auto-fitter module implementation (specification).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#ifndef AFMODULE_H_
@@ -28,8 +28,8 @@ FT_BEGIN_HEADER
/*
- * This is the `extended' FT_Module structure that holds the
- * autofitter's global data.
+ * This is the `extended' FT_Module structure that holds the
+ * autofitter's global data.
*/
typedef struct AF_ModuleRec_
diff --git a/src/autofit/afranges.c b/src/autofit/afranges.c
index cf67fafb1..b904d51cf 100644
--- a/src/autofit/afranges.c
+++ b/src/autofit/afranges.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afranges.c */
-/* */
-/* Auto-fitter Unicode script ranges (body). */
-/* */
-/* Copyright 2013-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afranges.c
+ *
+ * Auto-fitter Unicode script ranges (body).
+ *
+ * Copyright 2013-2018 by
+ * 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.
+ *
+ */
#include "afranges.h"
diff --git a/src/autofit/afranges.h b/src/autofit/afranges.h
index ba3b5e7cc..c137ae204 100644
--- a/src/autofit/afranges.h
+++ b/src/autofit/afranges.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afranges.h */
-/* */
-/* Auto-fitter Unicode script ranges (specification). */
-/* */
-/* Copyright 2013-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afranges.h
+ *
+ * Auto-fitter Unicode script ranges (specification).
+ *
+ * Copyright 2013-2018 by
+ * 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.
+ *
+ */
#ifndef AFRANGES_H_
diff --git a/src/autofit/afscript.h b/src/autofit/afscript.h
index 623a1734a..7dd09839a 100644
--- a/src/autofit/afscript.h
+++ b/src/autofit/afscript.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afscript.h */
-/* */
-/* Auto-fitter scripts (specification only). */
-/* */
-/* Copyright 2013-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afscript.h
+ *
+ * Auto-fitter scripts (specification only).
+ *
+ * Copyright 2013-2018 by
+ * 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.
+ *
+ */
/* The following part can be included multiple times. */
diff --git a/src/autofit/afshaper.c b/src/autofit/afshaper.c
index ce3133fad..b2f5d18bf 100644
--- a/src/autofit/afshaper.c
+++ b/src/autofit/afshaper.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afshaper.c */
-/* */
-/* HarfBuzz interface for accessing OpenType features (body). */
-/* */
-/* Copyright 2013-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afshaper.c
+ *
+ * HarfBuzz interface for accessing OpenType features (body).
+ *
+ * Copyright 2013-2018 by
+ * 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.
+ *
+ */
#include <ft2build.h>
@@ -26,12 +26,12 @@
#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
- /*************************************************************************/
- /* */
- /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
- /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
- /* messages during execution. */
- /* */
+ /**************************************************************************
+ *
+ * The macro FT_COMPONENT is used in trace mode. It is an implicit
+ * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
+ * messages during execution.
+ */
#undef FT_COMPONENT
#define FT_COMPONENT trace_afshaper
diff --git a/src/autofit/afshaper.h b/src/autofit/afshaper.h
index 7efd9f6a4..2665fe258 100644
--- a/src/autofit/afshaper.h
+++ b/src/autofit/afshaper.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afshaper.h */
-/* */
-/* HarfBuzz interface for accessing OpenType features (specification). */
-/* */
-/* Copyright 2013-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afshaper.h
+ *
+ * HarfBuzz interface for accessing OpenType features (specification).
+ *
+ * Copyright 2013-2018 by
+ * 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.
+ *
+ */
#ifndef AFSHAPER_H_
diff --git a/src/autofit/afstyles.h b/src/autofit/afstyles.h
index e2688b3fc..55d8b235b 100644
--- a/src/autofit/afstyles.h
+++ b/src/autofit/afstyles.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afstyles.h */
-/* */
-/* Auto-fitter styles (specification only). */
-/* */
-/* Copyright 2013-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afstyles.h
+ *
+ * Auto-fitter styles (specification only).
+ *
+ * Copyright 2013-2018 by
+ * 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.
+ *
+ */
/* The following part can be included multiple times. */
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index 8769bf12d..affb81b42 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -1,30 +1,30 @@
-/***************************************************************************/
-/* */
-/* aftypes.h */
-/* */
-/* Auto-fitter types (specification only). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * aftypes.h
+ *
+ * Auto-fitter types (specification only).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
/*************************************************************************
*
- * The auto-fitter is a complete rewrite of the old auto-hinter.
- * Its main feature is the ability to differentiate between different
- * writing systems and scripts in order to apply specific rules.
+ * The auto-fitter is a complete rewrite of the old auto-hinter.
+ * Its main feature is the ability to differentiate between different
+ * writing systems and scripts in order to apply specific rules.
*
- * The code has also been compartmentalized into several entities that
- * should make algorithmic experimentation easier than with the old
- * code.
+ * The code has also been compartmentalized into several entities that
+ * should make algorithmic experimentation easier than with the old
+ * code.
*
*************************************************************************/
@@ -102,9 +102,9 @@ extern void* _af_debug_hints;
/*************************************************************************/
/*
- * The auto-fitter doesn't need a very high angular accuracy;
- * this allows us to speed up some computations considerably with a
- * light Cordic algorithm (see afangles.c).
+ * The auto-fitter doesn't need a very high angular accuracy;
+ * this allows us to speed up some computations considerably with a
+ * light Cordic algorithm (see afangles.c).
*/
typedef FT_Int AF_Angle;
@@ -118,7 +118,7 @@ extern void* _af_debug_hints;
#if 0
/*
- * compute the angle of a given 2-D vector
+ * compute the angle of a given 2-D vector
*/
FT_LOCAL( AF_Angle )
af_angle_atan( FT_Pos dx,
@@ -126,8 +126,8 @@ extern void* _af_debug_hints;
/*
- * compute `angle2 - angle1'; the result is always within
- * the range [-AF_ANGLE_PI .. AF_ANGLE_PI - 1]
+ * compute `angle2 - angle1'; the result is always within
+ * the range [-AF_ANGLE_PI .. AF_ANGLE_PI - 1]
*/
FT_LOCAL( AF_Angle )
af_angle_diff( AF_Angle angle1,
@@ -150,8 +150,9 @@ extern void* _af_debug_hints;
FT_END_STMNT
- /* opaque handle to glyph-specific hints -- see `afhints.h' for more
- * details
+ /*
+ * opaque handle to glyph-specific hints -- see `afhints.h' for more
+ * details
*/
typedef struct AF_GlyphHintsRec_* AF_GlyphHints;
@@ -165,8 +166,8 @@ extern void* _af_debug_hints;
/*************************************************************************/
/*
- * A scaler models the target pixel device that will receive the
- * auto-hinted glyph image.
+ * A scaler models the target pixel device that will receive the
+ * auto-hinted glyph image.
*/
#define AF_SCALER_FLAG_NO_HORIZONTAL 1U /* disable horizontal hinting */
@@ -197,8 +198,9 @@ extern void* _af_debug_hints;
typedef struct AF_StyleMetricsRec_* AF_StyleMetrics;
- /* This function parses an FT_Face to compute global metrics for
- * a specific style.
+ /*
+ * This function parses an FT_Face to compute global metrics for
+ * a specific style.
*/
typedef FT_Error
(*AF_WritingSystem_InitMetricsFunc)( AF_StyleMetrics metrics,
@@ -237,22 +239,22 @@ extern void* _af_debug_hints;
/*************************************************************************/
/*
- * For the auto-hinter, a writing system consists of multiple scripts that
- * can be handled similarly *in a typographical way*; the relationship is
- * not based on history. For example, both the Greek and the unrelated
- * Armenian scripts share the same features like ascender, descender,
- * x-height, etc. Essentially, a writing system is covered by a
- * submodule of the auto-fitter; it contains
+ * For the auto-hinter, a writing system consists of multiple scripts that
+ * can be handled similarly *in a typographical way*; the relationship is
+ * not based on history. For example, both the Greek and the unrelated
+ * Armenian scripts share the same features like ascender, descender,
+ * x-height, etc. Essentially, a writing system is covered by a
+ * submodule of the auto-fitter; it contains
*
- * - a specific global analyzer that computes global metrics specific to
- * the script (based on script-specific characters to identify ascender
- * height, x-height, etc.),
+ * - a specific global analyzer that computes global metrics specific to
+ * the script (based on script-specific characters to identify ascender
+ * height, x-height, etc.),
*
- * - a specific glyph analyzer that computes segments and edges for each
- * glyph covered by the script,
+ * - a specific glyph analyzer that computes segments and edges for each
+ * glyph covered by the script,
*
- * - a specific grid-fitting algorithm that distorts the scaled glyph
- * outline according to the results of the glyph analyzer.
+ * - a specific grid-fitting algorithm that distorts the scaled glyph
+ * outline according to the results of the glyph analyzer.
*/
#define AFWRTSYS_H_ /* don't load header files */
@@ -300,12 +302,12 @@ extern void* _af_debug_hints;
/*************************************************************************/
/*
- * Each script is associated with two sets of Unicode ranges to test
- * whether the font face supports the script, and which non-base
- * characters the script contains.
+ * Each script is associated with two sets of Unicode ranges to test
+ * whether the font face supports the script, and which non-base
+ * characters the script contains.
*
- * We use four-letter script tags from the OpenType specification,
- * extended by `NONE', which indicates `no script'.
+ * We use four-letter script tags from the OpenType specification,
+ * extended by `NONE', which indicates `no script'.
*/
#undef SCRIPT
@@ -361,41 +363,41 @@ extern void* _af_debug_hints;
/*************************************************************************/
/*
- * Usually, a font contains more glyphs than can be addressed by its
- * character map.
+ * Usually, a font contains more glyphs than can be addressed by its
+ * character map.
*
- * In the PostScript font world, encoding vectors specific to a given
- * task are used to select such glyphs, and these glyphs can be often
- * recognized by having a suffix in its glyph names. For example, a
- * superscript glyph `A' might be called `A.sup'. Unfortunately, this
- * naming scheme is not standardized and thus unusable for us.
+ * In the PostScript font world, encoding vectors specific to a given
+ * task are used to select such glyphs, and these glyphs can be often
+ * recognized by having a suffix in its glyph names. For example, a
+ * superscript glyph `A' might be called `A.sup'. Unfortunately, this
+ * naming scheme is not standardized and thus unusable for us.
*
- * In the OpenType world, a better solution was invented, namely
- * `features', which cleanly separate a character's input encoding from
- * the corresponding glyph's appearance, and which don't use glyph names
- * at all. For our purposes, and slightly generalized, an OpenType
- * feature is a name of a mapping that maps character codes to
- * non-standard glyph indices (features get used for other things also).
- * For example, the `sups' feature provides superscript glyphs, thus
- * mapping character codes like `A' or `B' to superscript glyph
- * representation forms. How this mapping happens is completely
- * uninteresting to us.
+ * In the OpenType world, a better solution was invented, namely
+ * `features', which cleanly separate a character's input encoding from
+ * the corresponding glyph's appearance, and which don't use glyph names
+ * at all. For our purposes, and slightly generalized, an OpenType
+ * feature is a name of a mapping that maps character codes to
+ * non-standard glyph indices (features get used for other things also).
+ * For example, the `sups' feature provides superscript glyphs, thus
+ * mapping character codes like `A' or `B' to superscript glyph
+ * representation forms. How this mapping happens is completely
+ * uninteresting to us.
*
- * For the auto-hinter, a `coverage' represents all glyphs of an OpenType
- * feature collected in a set (as listed below) that can be hinted
- * together. To continue the above example, superscript glyphs must not
- * be hinted together with normal glyphs because the blue zones
- * completely differ.
+ * For the auto-hinter, a `coverage' represents all glyphs of an OpenType
+ * feature collected in a set (as listed below) that can be hinted
+ * together. To continue the above example, superscript glyphs must not
+ * be hinted together with normal glyphs because the blue zones
+ * completely differ.
*
- * Note that FreeType itself doesn't compute coverages; it only provides
- * the glyphs addressable by the default Unicode character map. Instead,
- * we use the HarfBuzz library (if available), which has many functions
- * exactly for this purpose.
+ * Note that FreeType itself doesn't compute coverages; it only provides
+ * the glyphs addressable by the default Unicode character map. Instead,
+ * we use the HarfBuzz library (if available), which has many functions
+ * exactly for this purpose.
*
- * AF_COVERAGE_DEFAULT is special: It should cover everything that isn't
- * listed separately (including the glyphs addressable by the character
- * map). In case HarfBuzz isn't available, it exactly covers the glyphs
- * addressable by the character map.
+ * AF_COVERAGE_DEFAULT is special: It should cover everything that isn't
+ * listed separately (including the glyphs addressable by the character
+ * map). In case HarfBuzz isn't available, it exactly covers the glyphs
+ * addressable by the character map.
*
*/
@@ -423,8 +425,8 @@ extern void* _af_debug_hints;
/*************************************************************************/
/*
- * The topmost structure for modelling the auto-hinter glyph input data
- * is a `style class', grouping everything together.
+ * The topmost structure for modelling the auto-hinter glyph input data
+ * is a `style class', grouping everything together.
*/
#undef STYLE
diff --git a/src/autofit/afwarp.c b/src/autofit/afwarp.c
index 2a75ea7b3..636f01f6a 100644
--- a/src/autofit/afwarp.c
+++ b/src/autofit/afwarp.c
@@ -1,38 +1,38 @@
-/***************************************************************************/
-/* */
-/* afwarp.c */
-/* */
-/* Auto-fitter warping algorithm (body). */
-/* */
-/* Copyright 2006-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afwarp.c
+ *
+ * Auto-fitter warping algorithm (body).
+ *
+ * Copyright 2006-2018 by
+ * 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.
+ *
+ */
/*
- * The idea of the warping code is to slightly scale and shift a glyph
- * within a single dimension so that as much of its segments are aligned
- * (more or less) on the grid. To find out the optimal scaling and
- * shifting value, various parameter combinations are tried and scored.
+ * The idea of the warping code is to slightly scale and shift a glyph
+ * within a single dimension so that as much of its segments are aligned
+ * (more or less) on the grid. To find out the optimal scaling and
+ * shifting value, various parameter combinations are tried and scored.
*/
#include "afwarp.h"
#ifdef AF_CONFIG_OPTION_USE_WARPER
- /*************************************************************************/
- /* */
- /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
- /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
- /* messages during execution. */
- /* */
+ /**************************************************************************
+ *
+ * The macro FT_COMPONENT is used in trace mode. It is an implicit
+ * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
+ * messages during execution.
+ */
#undef FT_COMPONENT
#define FT_COMPONENT trace_afwarp
diff --git a/src/autofit/afwarp.h b/src/autofit/afwarp.h
index 38b747948..d454dfbb4 100644
--- a/src/autofit/afwarp.h
+++ b/src/autofit/afwarp.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afwarp.h */
-/* */
-/* Auto-fitter warping algorithm (specification). */
-/* */
-/* Copyright 2006-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afwarp.h
+ *
+ * Auto-fitter warping algorithm (specification).
+ *
+ * Copyright 2006-2018 by
+ * 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.
+ *
+ */
#ifndef AFWARP_H_
diff --git a/src/autofit/afwrtsys.h b/src/autofit/afwrtsys.h
index 4675f3242..20311dac9 100644
--- a/src/autofit/afwrtsys.h
+++ b/src/autofit/afwrtsys.h
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* afwrtsys.h */
-/* */
-/* Auto-fitter writing systems (specification only). */
-/* */
-/* Copyright 2013-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * afwrtsys.h
+ *
+ * Auto-fitter writing systems (specification only).
+ *
+ * Copyright 2013-2018 by
+ * 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.
+ *
+ */
#ifndef AFWRTSYS_H_
diff --git a/src/autofit/autofit.c b/src/autofit/autofit.c
index 17106756e..1fba44a05 100644
--- a/src/autofit/autofit.c
+++ b/src/autofit/autofit.c
@@ -1,19 +1,19 @@
-/***************************************************************************/
-/* */
-/* autofit.c */
-/* */
-/* Auto-fitter module (body). */
-/* */
-/* Copyright 2003-2018 by */
-/* 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. */
-/* */
-/***************************************************************************/
+/****************************************************************************
+ *
+ * autofit.c
+ *
+ * Auto-fitter module (body).
+ *
+ * Copyright 2003-2018 by
+ * 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.
+ *
+ */
#define FT_MAKE_OPTION_SINGLE_OBJECT