Minor fixes.
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 135 136 137 138 139 140
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index 49060ba..eb03339 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -311,7 +311,7 @@
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
- LOCAL_FUNC_X
+ LOCAL_FUNC
FT_Error T1_Decoder_Parse_Charstrings( T1_Decoder* decoder,
FT_Byte* charstring_base,
FT_UInt charstring_len )
@@ -1012,7 +1012,7 @@
}
- LOCAL_FUNC_X
+ LOCAL_FUNC
FT_Error T1_Decoder_Init( T1_Decoder* decoder,
FT_Face face,
FT_Size size,
@@ -1052,7 +1052,7 @@
}
- LOCAL_FUNC_X
+ LOCAL_FUNC
void T1_Decoder_Done( T1_Decoder* decoder )
{
T1_Builder_Done( &decoder->builder );
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index f36a746..b37bbac 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -482,32 +482,31 @@
root->units_per_EM = face->header.Units_Per_EM;
- /* XXXXX: Computing the ascender/descender/height is very different */
- /* from what the specification tells you. Apparently, we must */
- /* be careful because: */
- /* */
- /* - not all fonts have an OS/2 table, in this case, we take the */
- /* values in the horizontal header. However, these values */
- /* very often are not reliable.. */
- /* */
- /* - otherwise, the correctly typographic values are in the */
- /* sTypoAscender, sTypoDescender & sTypoLineGap fields. */
- /* */
- /* however, certains fonts have these fields set to 0. Rather, */
- /* they have usWinAscent & usWinDescent correctly set (but with */
- /* different values). */
- /* */
- /* As an example, Arial Narrow is implemented through four files */
- /* ARIALN.TTF, ARIALNI.TTF, ARIALNB.TTF & ARIALNBI.TTF */
- /* */
- /* Strangely, all fonts have the same values in their sTypoXXX */
- /* fields, except ARIALNB which sets them to 0. */
- /* */
- /* On the other hand, they all have different usWinAscent/Descent */
- /* values.. As a conclusion, the OS/2 table cannot be used to */
- /* compute the text height reliably !! */
- /* */
- /* */
+ /* XXX: Computing the ascender/descender/height is very different */
+ /* from what the specification tells you. Apparently, we */
+ /* must be careful because */
+ /* */
+ /* - not all fonts have an OS/2 table; in this case, we take */
+ /* the values in the horizontal header. However, these */
+ /* values very often are not reliable. */
+ /* */
+ /* - otherwise, the correct typographic values are in the */
+ /* sTypoAscender, sTypoDescender & sTypoLineGap fields. */
+ /* */
+ /* However, certains fonts have these fields set to 0. */
+ /* Rather, they have usWinAscent & usWinDescent correctly */
+ /* set (but with different values). */
+ /* */
+ /* As an example, Arial Narrow is implemented through four */
+ /* files ARIALN.TTF, ARIALNI.TTF, ARIALNB.TTF & ARIALNBI.TTF */
+ /* */
+ /* Strangely, all fonts have the same values in their */
+ /* sTypoXXX fields, except ARIALNB which sets them to 0. */
+ /* */
+ /* On the other hand, they all have different */
+ /* usWinAscent/Descent values -- as a conclusion, the OS/2 */
+ /* table cannot be used to compute the text height reliably! */
+ /* */
/* The ascender/descender/height are computed from the OS/2 table */
/* when found. Otherwise, they're taken from the horizontal */
@@ -520,26 +519,30 @@
root->height = root->ascender - root->descender +
face->horizontal.Line_Gap;
- /* when the line_gap is 0, we add an extra 15 % to the text height */
+ /* if the line_gap is 0, we add an extra 15% to the text height -- */
/* this computation is based on various versions of Times New Roman */
- if (face->horizontal.Line_Gap == 0)
- root->height = (root->height*115 + 50)/100;
+ if ( face->horizontal.Line_Gap == 0 )
+ root->height = ( root->height * 115 + 50 ) / 100;
#if 0
+
/* some fonts have the OS/2 "sTypoAscender", "sTypoDescender" & */
/* "sTypoLineGap" fields set to 0, like ARIALNB.TTF */
if ( face->os2.version != 0xFFFF && root->ascender )
{
FT_Int height;
+
root->ascender = face->os2.sTypoAscender;
root->descender = -face->os2.sTypoDescender;
height = root->ascender + root->descender + face->os2.sTypoLineGap;
- if (height > root->height)
+ if ( height > root->height )
root->height = height;
}
-#endif
+
+#endif /* 0 */
+
root->max_advance_width = face->horizontal.advance_Width_Max;
root->max_advance_height = face->vertical_info
@@ -549,8 +552,8 @@
root->underline_position = face->postscript.underlinePosition;
root->underline_thickness = face->postscript.underlineThickness;
- /* root->max_points -- already set up */
- /* root->max_contours -- already set up */
+ /* root->max_points -- already set up */
+ /* root->max_contours -- already set up */
}
}