* src/pshinter/pshalgo.c (psh_hint_table_init): Simplify code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
diff --git a/ChangeLog b/ChangeLog
index d373cca..e3d3ea7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-03-03 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshalgo.c (psh_hint_table_init): Simplify code.
+
2004-03-02 Werner Lemberg <wl@gnu.org>
Add embedded bitmap support to CFF driver.
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 04c5d52..3acd62e 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -35,8 +35,11 @@
#endif
-#define COMPUTE_INFLEXS /* compute inflection points to optimize "S" and others */
-#define STRONGER /* slightly increase the contrast of smooth hinting */
+#define COMPUTE_INFLEXS /* compute inflection points to optimize `S' */
+ /* and similar glyphs */
+#define STRONGER /* slightly increase the contrast of smooth */
+ /* hinting */
+
/*************************************************************************/
/*************************************************************************/
@@ -46,13 +49,13 @@
/*************************************************************************/
/*************************************************************************/
- /* return true iff two stem hints overlap */
+ /* return true if two stem hints overlap */
static FT_Int
psh_hint_overlap( PSH_Hint hint1,
PSH_Hint hint2 )
{
- return ( hint1->org_pos + hint1->org_len >= hint2->org_pos &&
- hint2->org_pos + hint2->org_len >= hint1->org_pos );
+ return hint1->org_pos + hint1->org_len >= hint2->org_pos &&
+ hint2->org_pos + hint2->org_len >= hint1->org_pos;
}
@@ -89,7 +92,7 @@
}
- /* internal function used to record a new hint */
+ /* internal function to record a new hint */
static void
psh_hint_table_record( PSH_Hint_Table table,
FT_UInt idx )
@@ -109,8 +112,8 @@
psh_hint_activate( hint );
- /* now scan the current active hint set in order to determine */
- /* if we are overlapping with another segment */
+ /* now scan the current active hint set to check */
+ /* whether `hint' overlaps with another hint */
{
PSH_Hint* sorted = table->sort_global;
FT_UInt count = table->num_hints;
@@ -172,12 +175,14 @@
PS_Mask_Table counter_masks,
FT_Memory memory )
{
- FT_UInt count = hints->num_hints;
+ FT_UInt count;
FT_Error error;
FT_UNUSED( counter_masks );
+ count = hints->num_hints;
+
/* allocate our tables */
if ( FT_NEW_ARRAY( table->sort, 2 * count ) ||
FT_NEW_ARRAY( table->hints, count ) ||
@@ -190,7 +195,7 @@
table->num_zones = 0;
table->zone = 0;
- /* now, initialize the "hints" array */
+ /* initialize the `table->hints' array */
{
PSH_Hint write = table->hints;
PS_Hint read = hints->hints;
@@ -204,30 +209,31 @@
}
}
- /* we now need to determine the initial "parent" stems; first */
+ /* we now need to determine the initial `parent' stems; first */
/* activate the hints that are given by the initial hint masks */
if ( hint_masks )
{
- FT_UInt Count = hint_masks->num_masks;
- PS_Mask Mask = hint_masks->masks;
+ PS_Mask mask = hint_masks->masks;
+ count = hint_masks->num_masks;
table->hint_masks = hint_masks;
- for ( ; Count > 0; Count--, Mask++ )
- psh_hint_table_record_mask( table, Mask );
+ for ( ; count > 0; count--, mask++ )
+ psh_hint_table_record_mask( table, mask );
}
- /* now, do a linear parse in case some hints were left alone */
+ /* finally, do a linear parse in case some hints were left alone */
if ( table->num_hints != table->max_hints )
{
- FT_UInt Index, Count;
+ FT_UInt idx;
FT_ERROR(( "psh_hint_table_init: missing/incorrect hint masks!\n" ));
- Count = table->max_hints;
- for ( Index = 0; Index < Count; Index++ )
- psh_hint_table_record( table, Index );
+
+ count = table->max_hints;
+ for ( idx = 0; idx < count; idx++ )
+ psh_hint_table_record( table, idx );
}
Exit: