forked from minhngoc25a/freetype2
Minor formatting.
This commit is contained in:
parent
a300c1c3af
commit
37c72f66a5
|
@ -449,8 +449,8 @@
|
|||
FT_Add64( &temp, &temp2, &temp );
|
||||
|
||||
/* last attempt to ditch long division */
|
||||
a = temp.hi == 0 ? temp.lo / c
|
||||
: ft_div64by32( temp.hi, temp.lo, c );
|
||||
a = ( temp.hi == 0 ) ? temp.lo / c
|
||||
: ft_div64by32( temp.hi, temp.lo, c );
|
||||
}
|
||||
|
||||
a_ = (FT_Long)a;
|
||||
|
@ -492,8 +492,8 @@
|
|||
ft_multo64( a, b, &temp );
|
||||
|
||||
/* last attempt to ditch long division */
|
||||
a = temp.hi == 0 ? temp.lo / c
|
||||
: ft_div64by32( temp.hi, temp.lo, c );
|
||||
a = ( temp.hi == 0 ) ? temp.lo / c
|
||||
: ft_div64by32( temp.hi, temp.lo, c );
|
||||
}
|
||||
|
||||
a_ = (FT_Long)a;
|
||||
|
|
|
@ -401,10 +401,10 @@
|
|||
/* calculate all four possibilities; moves down are negative */
|
||||
CF2_Fixed downMoveDown = 0 - fracDown;
|
||||
CF2_Fixed upMoveDown = 0 - fracUp;
|
||||
CF2_Fixed downMoveUp = fracDown == 0
|
||||
CF2_Fixed downMoveUp = ( fracDown == 0 )
|
||||
? 0
|
||||
: cf2_intToFixed( 1 ) - fracDown;
|
||||
CF2_Fixed upMoveUp = fracUp == 0
|
||||
CF2_Fixed upMoveUp = ( fracUp == 0 )
|
||||
? 0
|
||||
: cf2_intToFixed( 1 ) - fracUp;
|
||||
|
||||
|
|
|
@ -347,7 +347,7 @@
|
|||
vals[0] = *curX;
|
||||
vals[1] = *curY;
|
||||
index = 0;
|
||||
isHFlex = readFromStack[9] == FALSE;
|
||||
isHFlex = FT_BOOL( readFromStack[9] == FALSE );
|
||||
top = isHFlex ? 9 : 10;
|
||||
|
||||
for ( i = 0; i < top; i++ )
|
||||
|
@ -797,7 +797,7 @@
|
|||
CF2_UInt index;
|
||||
CF2_UInt count = cf2_stack_count( opStack );
|
||||
|
||||
FT_Bool isX = op1 == cf2_cmdHLINETO;
|
||||
FT_Bool isX = FT_BOOL( op1 == cf2_cmdHLINETO );
|
||||
|
||||
|
||||
FT_TRACE4(( isX ? " hlineto\n" : " vlineto\n" ));
|
||||
|
@ -1716,7 +1716,7 @@
|
|||
CF2_UInt count, count1 = cf2_stack_count( opStack );
|
||||
CF2_UInt index = 0;
|
||||
|
||||
FT_Bool alternate = op1 == cf2_cmdHVCURVETO;
|
||||
FT_Bool alternate = FT_BOOL( op1 == cf2_cmdHVCURVETO );
|
||||
|
||||
|
||||
/* if `cf2_stack_count' isn't of the form 8n, 8n+1, */
|
||||
|
|
|
@ -2445,7 +2445,7 @@
|
|||
|
||||
case cff_op_and:
|
||||
{
|
||||
FT_Fixed cond = args[0] && args[1];
|
||||
FT_Fixed cond = ( args[0] && args[1] );
|
||||
|
||||
|
||||
FT_TRACE4(( " and\n" ));
|
||||
|
@ -2457,7 +2457,7 @@
|
|||
|
||||
case cff_op_or:
|
||||
{
|
||||
FT_Fixed cond = args[0] || args[1];
|
||||
FT_Fixed cond = ( args[0] || args[1] );
|
||||
|
||||
|
||||
FT_TRACE4(( " or\n" ));
|
||||
|
@ -2481,7 +2481,7 @@
|
|||
|
||||
case cff_op_eq:
|
||||
{
|
||||
FT_Fixed cond = args[0] == args[1];
|
||||
FT_Fixed cond = ( args[0] == args[1] );
|
||||
|
||||
|
||||
FT_TRACE4(( " eq\n" ));
|
||||
|
|
|
@ -1925,8 +1925,8 @@
|
|||
CFF_FontRecDict top = &subfont->font_dict;
|
||||
CFF_Private priv = &subfont->private_dict;
|
||||
|
||||
FT_Bool cff2 = ( code == CFF2_CODE_TOPDICT ||
|
||||
code == CFF2_CODE_FONTDICT );
|
||||
FT_Bool cff2 = FT_BOOL( code == CFF2_CODE_TOPDICT ||
|
||||
code == CFF2_CODE_FONTDICT );
|
||||
FT_UInt stackSize = cff2 ? CFF2_DEFAULT_STACK
|
||||
: CFF_MAX_STACK_DEPTH;
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ THE SOFTWARE.
|
|||
|
||||
|
||||
/* parsing normal metrics */
|
||||
fields = PCF_BYTE_ORDER( format ) == MSBFirst
|
||||
fields = ( PCF_BYTE_ORDER( format ) == MSBFirst )
|
||||
? pcf_metric_msb_header
|
||||
: pcf_metric_header;
|
||||
|
||||
|
|
|
@ -695,7 +695,7 @@
|
|||
/* ************ otherwise, it is any token **************/
|
||||
default:
|
||||
token->start = cur;
|
||||
token->type = ( *cur == '/' ? T1_TOKEN_TYPE_KEY : T1_TOKEN_TYPE_ANY );
|
||||
token->type = ( *cur == '/' ) ? T1_TOKEN_TYPE_KEY : T1_TOKEN_TYPE_ANY;
|
||||
ps_parser_skip_PS_token( parser );
|
||||
cur = parser->cursor;
|
||||
if ( !parser->error )
|
||||
|
|
|
@ -1572,8 +1572,8 @@
|
|||
PS_Mask mask = table->hint_masks->masks;
|
||||
FT_UInt num_masks = table->hint_masks->num_masks;
|
||||
FT_UInt first = 0;
|
||||
FT_Int major_dir = dimension == 0 ? PSH_DIR_VERTICAL
|
||||
: PSH_DIR_HORIZONTAL;
|
||||
FT_Int major_dir = ( dimension == 0 ) ? PSH_DIR_VERTICAL
|
||||
: PSH_DIR_HORIZONTAL;
|
||||
PSH_Dimension dim = &glyph->globals->dimension[dimension];
|
||||
FT_Fixed scale = dim->scale_mult;
|
||||
FT_Int threshold;
|
||||
|
|
|
@ -1520,8 +1520,9 @@
|
|||
state_bez = y1 < y3 ? Ascending_State : Descending_State;
|
||||
if ( ras.state != state_bez )
|
||||
{
|
||||
Bool o = state_bez == Ascending_State ? IS_BOTTOM_OVERSHOOT( y1 )
|
||||
: IS_TOP_OVERSHOOT( y1 );
|
||||
Bool o = ( state_bez == Ascending_State )
|
||||
? IS_BOTTOM_OVERSHOOT( y1 )
|
||||
: IS_TOP_OVERSHOOT( y1 );
|
||||
|
||||
|
||||
/* finalize current profile if any */
|
||||
|
@ -1656,8 +1657,9 @@
|
|||
/* detect a change of direction */
|
||||
if ( ras.state != state_bez )
|
||||
{
|
||||
Bool o = state_bez == Ascending_State ? IS_BOTTOM_OVERSHOOT( y1 )
|
||||
: IS_TOP_OVERSHOOT( y1 );
|
||||
Bool o = ( state_bez == Ascending_State )
|
||||
? IS_BOTTOM_OVERSHOOT( y1 )
|
||||
: IS_TOP_OVERSHOOT( y1 );
|
||||
|
||||
|
||||
/* finalize current profile if any */
|
||||
|
@ -2390,7 +2392,7 @@
|
|||
pxl = e2;
|
||||
|
||||
/* check that the other pixel isn't set */
|
||||
e1 = pxl == e1 ? e2 : e1;
|
||||
e1 = ( pxl == e1 ) ? e2 : e1;
|
||||
|
||||
e1 = TRUNC( e1 );
|
||||
|
||||
|
@ -2591,7 +2593,7 @@
|
|||
pxl = e2;
|
||||
|
||||
/* check that the other pixel isn't set */
|
||||
e1 = pxl == e1 ? e2 : e1;
|
||||
e1 = ( pxl == e1 ) ? e2 : e1;
|
||||
|
||||
e1 = TRUNC( e1 );
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
break;
|
||||
|
||||
case FT_SFNT_OS2:
|
||||
table = face->os2.version == 0xFFFFU ? NULL : &face->os2;
|
||||
table = ( face->os2.version == 0xFFFFU ) ? NULL : &face->os2;
|
||||
break;
|
||||
|
||||
case FT_SFNT_POST:
|
||||
|
|
|
@ -114,8 +114,8 @@
|
|||
#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
||||
FT_Pos height_org, width_org;
|
||||
#endif
|
||||
FT_Int hmul = mode == FT_RENDER_MODE_LCD;
|
||||
FT_Int vmul = mode == FT_RENDER_MODE_LCD_V;
|
||||
FT_Int hmul = ( mode == FT_RENDER_MODE_LCD );
|
||||
FT_Int vmul = ( mode == FT_RENDER_MODE_LCD_V );
|
||||
|
||||
FT_Raster_Params params;
|
||||
|
||||
|
|
|
@ -5577,9 +5577,9 @@
|
|||
FT_Int B1, B2;
|
||||
#endif
|
||||
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
|
||||
FT_Bool in_twilight = exc->GS.gep0 == 0 || \
|
||||
exc->GS.gep1 == 0 || \
|
||||
exc->GS.gep2 == 0;
|
||||
FT_Bool in_twilight = FT_BOOL( exc->GS.gep0 == 0 ||
|
||||
exc->GS.gep1 == 0 ||
|
||||
exc->GS.gep2 == 0 );
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -6537,7 +6537,9 @@
|
|||
* Otherwise, by definition, the value of exc->twilight.orus[n] is (0,0),
|
||||
* for every n.
|
||||
*/
|
||||
twilight = exc->GS.gep0 == 0 || exc->GS.gep1 == 0 || exc->GS.gep2 == 0;
|
||||
twilight = ( exc->GS.gep0 == 0 ||
|
||||
exc->GS.gep1 == 0 ||
|
||||
exc->GS.gep2 == 0 );
|
||||
|
||||
if ( BOUNDS( exc->GS.rp1, exc->zp0.n_points ) )
|
||||
{
|
||||
|
|
|
@ -936,7 +936,7 @@
|
|||
if ( *cur == '/' || *cur == '(' )
|
||||
{
|
||||
FT_UInt len;
|
||||
FT_Bool have_literal = ( *cur == '(' );
|
||||
FT_Bool have_literal = FT_BOOL( *cur == '(' );
|
||||
|
||||
|
||||
if ( cur + ( have_literal ? 3 : 2 ) >= limit )
|
||||
|
|
Loading…
Reference in New Issue