[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master bdab657: [truetype] Minor code beautification.
From: |
Werner LEMBERG |
Subject: |
[freetype2] master bdab657: [truetype] Minor code beautification. |
Date: |
Mon, 18 Dec 2017 14:46:40 -0500 (EST) |
branch: master
commit bdab6578af27719a613488d46acc5d69653943f8
Author: Matthias Clasen <address@hidden>
Commit: Werner Lemberg <address@hidden>
[truetype] Minor code beautification.
* src/truetype/ttgxvar.c (ft_var_to_normalized): Trace number of
design coordinates.
Simplify code.
---
ChangeLog | 8 ++++++++
src/truetype/ttgxvar.c | 8 +++++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dc9b685..c0920a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-12-18 Matthias Clasen <address@hidden>
+
+ [truetype] Minor code beautification.
+
+ * src/truetype/ttgxvar.c (ft_var_to_normalized): Trace number of
+ design coordinates.
+ Simplify code.
+
2017-12-18 Werner Lemberg <address@hidden>
* src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff.
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 221f572..529c35b 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -1733,7 +1733,9 @@
/* based on the [min,def,max] values for the axis to be [-1,0,1]. */
/* Then, if there's an `avar' table, we renormalize this range. */
- FT_TRACE5(( "design coordinates:\n" ));
+ FT_TRACE5(( "%d design coordinate%s:\n",
+ num_coords,
+ num_coords == 1 ? "" : "s" ));
a = mmvar->axis;
for ( i = 0; i < num_coords; i++, a++ )
@@ -1758,10 +1760,10 @@
}
if ( coord < a->def )
- normalized[i] = -FT_DivFix( coords[i] - a->def,
+ normalized[i] = -FT_DivFix( coord - a->def,
a->minimum - a->def );
else if ( coord > a->def )
- normalized[i] = FT_DivFix( coords[i] - a->def,
+ normalized[i] = FT_DivFix( coord - a->def,
a->maximum - a->def );
else
normalized[i] = 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master bdab657: [truetype] Minor code beautification.,
Werner LEMBERG <=