diff options
Diffstat (limited to 'src/3rdparty/freetype/src/sdf')
-rw-r--r-- | src/3rdparty/freetype/src/sdf/ftbsdf.c | 10 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/sdf/ftsdf.c | 20 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/sdf/ftsdf.h | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/sdf/ftsdfcommon.c | 8 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/sdf/ftsdfcommon.h | 6 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/sdf/ftsdferrs.h | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/sdf/ftsdfrend.c | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/sdf/ftsdfrend.h | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/sdf/module.mk | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/sdf/rules.mk | 2 | ||||
-rw-r--r-- | src/3rdparty/freetype/src/sdf/sdf.c | 2 |
11 files changed, 30 insertions, 28 deletions
diff --git a/src/3rdparty/freetype/src/sdf/ftbsdf.c b/src/3rdparty/freetype/src/sdf/ftbsdf.c index 1328ac4988..901d8b7402 100644 --- a/src/3rdparty/freetype/src/sdf/ftbsdf.c +++ b/src/3rdparty/freetype/src/sdf/ftbsdf.c @@ -4,7 +4,7 @@ * * Signed Distance Field support for bitmap fonts (body only). * - * Copyright (C) 2020-2022 by + * Copyright (C) 2020-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. @@ -1116,13 +1116,13 @@ goto Exit; } - spread = FT_INT_16D16( worker->params.spread ); + spread = (FT_16D16)FT_INT_16D16( worker->params.spread ); #if USE_SQUARED_DISTANCES - sp_sq = FT_INT_16D16( worker->params.spread * - worker->params.spread ); + sp_sq = (FT_16D16)FT_INT_16D16( worker->params.spread * + worker->params.spread ); #else - sp_sq = FT_INT_16D16( worker->params.spread ); + sp_sq = (FT_16D16)FT_INT_16D16( worker->params.spread ); #endif for ( j = 0; j < r; j++ ) diff --git a/src/3rdparty/freetype/src/sdf/ftsdf.c b/src/3rdparty/freetype/src/sdf/ftsdf.c index ffac8bf465..26a6d00e4a 100644 --- a/src/3rdparty/freetype/src/sdf/ftsdf.c +++ b/src/3rdparty/freetype/src/sdf/ftsdf.c @@ -4,7 +4,7 @@ * * Signed Distance Field support for outline fonts (body). * - * Copyright (C) 2020-2022 by + * Copyright (C) 2020-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. @@ -871,7 +871,7 @@ cbox.yMax = edge.control_b.y; is_set = 1; - /* fall through */ + FALL_THROUGH; case SDF_EDGE_CONIC: if ( is_set ) @@ -899,7 +899,7 @@ is_set = 1; } - /* fall through */ + FALL_THROUGH; case SDF_EDGE_LINE: if ( is_set ) @@ -1293,7 +1293,7 @@ /* Calculate the number of necessary bisections. Each */ /* bisection causes a four-fold reduction of the deviation, */ /* hence we bisect the Bezier curve until the deviation */ - /* becomes less than 1/8th of a pixel. For more details */ + /* becomes less than 1/8 of a pixel. For more details */ /* check file `ftgrays.c`. */ num_splits = 1; while ( dx > ONE_PIXEL / 8 ) @@ -1939,7 +1939,7 @@ /* now factor is 16.16 */ factor = FT_DivFix( factor, sq_line_length ); - /* clamp the factor between 0.0 and 1.0 in fixed point */ + /* clamp the factor between 0.0 and 1.0 in fixed-point */ if ( factor > FT_INT_16D16( 1 ) ) factor = FT_INT_16D16( 1 ); if ( factor < 0 ) @@ -2109,7 +2109,8 @@ FT_Error error = FT_Err_Ok; FT_26D6_Vec aA, bB; /* A, B in the above comment */ - FT_26D6_Vec nearest_point; /* point on curve nearest to `point` */ + FT_26D6_Vec nearest_point = { 0, 0 }; + /* point on curve nearest to `point` */ FT_26D6_Vec direction; /* direction of curve at `nearest_point` */ FT_26D6_Vec p0, p1, p2; /* control points of a conic curve */ @@ -2405,7 +2406,8 @@ FT_Error error = FT_Err_Ok; FT_26D6_Vec aA, bB, cC; /* A, B, C in the above comment */ - FT_26D6_Vec nearest_point; /* point on curve nearest to `point` */ + FT_26D6_Vec nearest_point = { 0, 0 }; + /* point on curve nearest to `point` */ FT_26D6_Vec direction; /* direction of curve at `nearest_point` */ FT_26D6_Vec p0, p1, p2; /* control points of a conic curve */ @@ -3164,7 +3166,7 @@ if ( min_dist.distance > sp_sq ) min_dist.distance = sp_sq; - /* square_root the values and fit in a 6.10 fixed point */ + /* square_root the values and fit in a 6.10 fixed-point */ if ( USE_SQUARED_DISTANCES ) min_dist.distance = square_root( min_dist.distance ); @@ -3256,7 +3258,7 @@ /* and also determine the signs properly. */ SDF_Signed_Distance* dists = NULL; - const FT_16D16 fixed_spread = FT_INT_16D16( spread ); + const FT_16D16 fixed_spread = (FT_16D16)FT_INT_16D16( spread ); if ( !shape || !bitmap ) diff --git a/src/3rdparty/freetype/src/sdf/ftsdf.h b/src/3rdparty/freetype/src/sdf/ftsdf.h index 5f6b3f52aa..234c075b0a 100644 --- a/src/3rdparty/freetype/src/sdf/ftsdf.h +++ b/src/3rdparty/freetype/src/sdf/ftsdf.h @@ -4,7 +4,7 @@ * * Signed Distance Field support (specification). * - * Copyright (C) 2020-2022 by + * Copyright (C) 2020-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/3rdparty/freetype/src/sdf/ftsdfcommon.c b/src/3rdparty/freetype/src/sdf/ftsdfcommon.c index 072a36ea6c..5052201e22 100644 --- a/src/3rdparty/freetype/src/sdf/ftsdfcommon.c +++ b/src/3rdparty/freetype/src/sdf/ftsdfcommon.c @@ -4,7 +4,7 @@ * * Auxiliary data for Signed Distance Field support (body). * - * Copyright (C) 2020-2022 by + * Copyright (C) 2020-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. @@ -33,7 +33,7 @@ * * https://github.com/chmike/fpsqrt * - * Use this to compute the square root of a 16.16 fixed point number. + * Use this to compute the square root of a 16.16 fixed-point number. */ FT_LOCAL_DEF( FT_16D16 ) square_root( FT_16D16 val ) @@ -72,8 +72,8 @@ */ /* - * Convert 16.16 fixed point values to the desired output format. - * In this case we reduce 16.16 fixed point values to normalized + * Convert 16.16 fixed-point values to the desired output format. + * In this case we reduce 16.16 fixed-point values to normalized * 8-bit values. * * The `max_value` in the parameter is the maximum value in the diff --git a/src/3rdparty/freetype/src/sdf/ftsdfcommon.h b/src/3rdparty/freetype/src/sdf/ftsdfcommon.h index af4490bbca..60ca9773e3 100644 --- a/src/3rdparty/freetype/src/sdf/ftsdfcommon.h +++ b/src/3rdparty/freetype/src/sdf/ftsdfcommon.h @@ -4,7 +4,7 @@ * * Auxiliary data for Signed Distance Field support (specification). * - * Copyright (C) 2020-2022 by + * Copyright (C) 2020-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. @@ -115,8 +115,8 @@ FT_BEGIN_HEADER typedef FT_Vector FT_26D6_Vec; /* with 26.6 fixed-point components */ typedef FT_Vector FT_16D16_Vec; /* with 16.16 fixed-point components */ - typedef FT_Fixed FT_16D16; /* 16.16 fixed-point representation */ - typedef FT_Fixed FT_26D6; /* 26.6 fixed-point representation */ + typedef FT_Int32 FT_16D16; /* 16.16 fixed-point representation */ + typedef FT_Int32 FT_26D6; /* 26.6 fixed-point representation */ typedef FT_Byte FT_SDFFormat; /* format to represent SDF data */ typedef FT_BBox FT_CBox; /* control box of a curve */ diff --git a/src/3rdparty/freetype/src/sdf/ftsdferrs.h b/src/3rdparty/freetype/src/sdf/ftsdferrs.h index b28867609a..519db0fc26 100644 --- a/src/3rdparty/freetype/src/sdf/ftsdferrs.h +++ b/src/3rdparty/freetype/src/sdf/ftsdferrs.h @@ -4,7 +4,7 @@ * * Signed Distance Field error codes (specification only). * - * Copyright (C) 2020-2022 by + * Copyright (C) 2020-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/3rdparty/freetype/src/sdf/ftsdfrend.c b/src/3rdparty/freetype/src/sdf/ftsdfrend.c index b0213a40d3..9ac7d6f620 100644 --- a/src/3rdparty/freetype/src/sdf/ftsdfrend.c +++ b/src/3rdparty/freetype/src/sdf/ftsdfrend.c @@ -4,7 +4,7 @@ * * Signed Distance Field renderer interface (body). * - * Copyright (C) 2020-2022 by + * Copyright (C) 2020-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/3rdparty/freetype/src/sdf/ftsdfrend.h b/src/3rdparty/freetype/src/sdf/ftsdfrend.h index cdb9c5f02f..571ac833d3 100644 --- a/src/3rdparty/freetype/src/sdf/ftsdfrend.h +++ b/src/3rdparty/freetype/src/sdf/ftsdfrend.h @@ -4,7 +4,7 @@ * * Signed Distance Field renderer interface (specification). * - * Copyright (C) 2020-2022 by + * Copyright (C) 2020-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/src/3rdparty/freetype/src/sdf/module.mk b/src/3rdparty/freetype/src/sdf/module.mk index 772bc48bf7..e896d20e66 100644 --- a/src/3rdparty/freetype/src/sdf/module.mk +++ b/src/3rdparty/freetype/src/sdf/module.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2020-2022 by +# Copyright (C) 2020-2023 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/3rdparty/freetype/src/sdf/rules.mk b/src/3rdparty/freetype/src/sdf/rules.mk index 5239d643ff..d7742413c3 100644 --- a/src/3rdparty/freetype/src/sdf/rules.mk +++ b/src/3rdparty/freetype/src/sdf/rules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2020-2022 by +# Copyright (C) 2020-2023 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/3rdparty/freetype/src/sdf/sdf.c b/src/3rdparty/freetype/src/sdf/sdf.c index 297ba9ab02..c159b08128 100644 --- a/src/3rdparty/freetype/src/sdf/sdf.c +++ b/src/3rdparty/freetype/src/sdf/sdf.c @@ -4,7 +4,7 @@ * * FreeType Signed Distance Field renderer module component (body only). * - * Copyright (C) 2020-2022 by + * Copyright (C) 2020-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. |