Commits:
-
e1cacad9
by Werner Lemberg at 2023-02-08T20:07:29+01:00
[ftgrid] Synchronize with FreeType git.
The changes are necessary due to the commit
```
Avoid reserved identifiers that are globally defined.
```
-
2c5abddf
by Werner Lemberg at 2023-02-08T21:56:35+01:00
Fix various minor compiler warnings.
8 changed files:
Changes:
graph/gblany.h
... |
... |
@@ -398,12 +398,12 @@ static void |
398
|
398
|
GCONCAT( _gblender_blit_bgra_, GDST_TYPE )( GBlenderBlit blit,
|
399
|
399
|
grColor color )
|
400
|
400
|
{
|
401
|
|
- (void)color; /* unused */
|
402
|
|
-
|
403
|
401
|
int h = blit->height;
|
404
|
402
|
const unsigned char* src_line = blit->src_line + blit->src_x*4;
|
405
|
403
|
unsigned char* dst_line = blit->dst_line + blit->dst_x*GDST_INCR;
|
406
|
404
|
|
|
405
|
+ (void)color; /* unused */
|
|
406
|
+
|
407
|
407
|
do
|
408
|
408
|
{
|
409
|
409
|
const unsigned char* src = src_line;
|
graph/gblender.c
... |
... |
@@ -261,7 +261,7 @@ gblender_reset_key( GBlender blender, |
261
|
261
|
(*gr)[1] = g;
|
262
|
262
|
(*gr)[2] = b;
|
263
|
263
|
#else
|
264
|
|
- gr[0] = ( r << 16 ) | ( g << 8 ) | b;
|
|
264
|
+ gr[0] = (GBlenderCell)( ( r << 16 ) | ( g << 8 ) | b );
|
265
|
265
|
#endif
|
266
|
266
|
gr++;
|
267
|
267
|
}
|
graph/grfont.c
... |
... |
@@ -8,7 +8,7 @@ |
8
|
8
|
|
9
|
9
|
/* internal CP437 8x8 font characters */
|
10
|
10
|
|
11
|
|
- const unsigned char font_8x8[2048] =
|
|
11
|
+ static const unsigned char font_8x8[2048] =
|
12
|
12
|
{
|
13
|
13
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
14
|
14
|
0x7E, 0x81, 0xA5, 0x81, 0xBD, 0x99, 0x81, 0x7E,
|
... |
... |
@@ -274,7 +274,7 @@ |
274
|
274
|
|
275
|
275
|
/* internal CP437 8x14 font characters */
|
276
|
276
|
|
277
|
|
- const unsigned char font_8x14[3584] =
|
|
277
|
+ static const unsigned char font_8x14[3584] =
|
278
|
278
|
{
|
279
|
279
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
280
|
280
|
0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x7e, 0x00, 0x00, 0x00,
|
src/ftbench.c
... |
... |
@@ -1333,7 +1333,7 @@ |
1333
|
1333
|
|
1334
|
1334
|
/* sync target and mode */
|
1335
|
1335
|
load_flags |= FT_LOAD_TARGET_( render_mode );
|
1336
|
|
- render_mode = ( load_flags & 0xF0000 ) >> 16;
|
|
1336
|
+ render_mode = (FT_Render_Mode)( ( load_flags & 0xF0000 ) >> 16 );
|
1337
|
1337
|
|
1338
|
1338
|
header( face );
|
1339
|
1339
|
|
src/ftcommon.c
... |
... |
@@ -311,7 +311,7 @@ |
311
|
311
|
if ( has_extension )
|
312
|
312
|
{
|
313
|
313
|
/* Ignore `.t1' `.pfa',`.pfb' extension in the original path. */
|
314
|
|
- path_len = suffix - font->filepathname;
|
|
314
|
+ path_len = (size_t)( suffix - font->filepathname );
|
315
|
315
|
}
|
316
|
316
|
|
317
|
317
|
ext_path_len = path_len + 5; /* 4 bytes extension + '\0' */
|
... |
... |
@@ -502,7 +502,7 @@ |
502
|
502
|
FT_Outline FT = { sizeof ( c ) / sizeof ( c[0] ),
|
503
|
503
|
sizeof ( p ) / sizeof ( p[0] ),
|
504
|
504
|
p, t, c, FT_OUTLINE_NONE };
|
505
|
|
- grBitmap icon = { 0 };
|
|
505
|
+ grBitmap icon = { 0, 0, 0, gr_pixel_mode_none, 0, NULL };
|
506
|
506
|
grBitmap* picon = NULL;
|
507
|
507
|
int size, i;
|
508
|
508
|
|
... |
... |
@@ -599,7 +599,7 @@ |
599
|
599
|
|
600
|
600
|
font->face_index = ( j << 16 ) + i;
|
601
|
601
|
|
602
|
|
- if ( handle->encoding < face->num_charmaps )
|
|
602
|
+ if ( handle->encoding < (unsigned long)face->num_charmaps )
|
603
|
603
|
font->cmap_index = handle->encoding;
|
604
|
604
|
else if ( handle->encoding != FT_ENCODING_ORDER &&
|
605
|
605
|
!FT_Select_Charmap( face, (FT_Encoding)handle->encoding ) )
|
... |
... |
@@ -2036,7 +2036,7 @@ |
2036
|
2036
|
|
2037
|
2037
|
|
2038
|
2038
|
for ( i = 0; i < 4 && s[i]; i++ )
|
2039
|
|
- l = ( l << 8 ) | s[i];
|
|
2039
|
+ l = ( l << 8 ) | (unsigned char)s[i];
|
2040
|
2040
|
|
2041
|
2041
|
/* interpret numerically if too short for a tag */
|
2042
|
2042
|
if ( i < 4 && !sscanf( s, "%lu", &l ) )
|
src/ftgrid.c
... |
... |
@@ -44,10 +44,10 @@ |
44
|
44
|
struct AF_GlyphHintsRec_;
|
45
|
45
|
typedef struct AF_GlyphHintsRec_* AF_GlyphHints;
|
46
|
46
|
|
47
|
|
- extern int _af_debug_disable_horz_hints;
|
48
|
|
- extern int _af_debug_disable_vert_hints;
|
49
|
|
- extern int _af_debug_disable_blue_hints;
|
50
|
|
- extern AF_GlyphHints _af_debug_hints;
|
|
47
|
+ extern int af_debug_disable_horz_hints_;
|
|
48
|
+ extern int af_debug_disable_vert_hints_;
|
|
49
|
+ extern int af_debug_disable_blue_hints_;
|
|
50
|
+ extern AF_GlyphHints af_debug_hints_;
|
51
|
51
|
|
52
|
52
|
#ifdef __cplusplus
|
53
|
53
|
extern "C" {
|
... |
... |
@@ -546,9 +546,9 @@ |
546
|
546
|
glyph_idx = FTDemo_Get_Index( handle, (FT_UInt32)st->Num );
|
547
|
547
|
|
548
|
548
|
#ifdef FT_DEBUG_AUTOFIT
|
549
|
|
- _af_debug_disable_horz_hints = !st->do_horz_hints;
|
550
|
|
- _af_debug_disable_vert_hints = !st->do_vert_hints;
|
551
|
|
- _af_debug_disable_blue_hints = !st->do_blue_hints;
|
|
549
|
+ af_debug_disable_horz_hints_ = !st->do_horz_hints;
|
|
550
|
+ af_debug_disable_vert_hints_ = !st->do_vert_hints;
|
|
551
|
+ af_debug_disable_blue_hints_ = !st->do_blue_hints;
|
552
|
552
|
#endif
|
553
|
553
|
|
554
|
554
|
if ( FT_Load_Glyph( size->face, glyph_idx, handle->load_flags ) )
|
... |
... |
@@ -622,7 +622,7 @@ |
622
|
622
|
#ifdef FT_DEBUG_AUTOFIT
|
623
|
623
|
/* Draw segment before drawing glyph. */
|
624
|
624
|
if ( status.do_segment && handle->load_flags & FT_LOAD_FORCE_AUTOHINT )
|
625
|
|
- grid_hint_draw_segment( &status, size, _af_debug_hints );
|
|
625
|
+ grid_hint_draw_segment( &status, size, af_debug_hints_ );
|
626
|
626
|
#endif
|
627
|
627
|
|
628
|
628
|
/* scale the outline */
|
... |
... |
@@ -1408,7 +1408,7 @@ |
1408
|
1408
|
handle->lcd_mode == LCD_MODE_LIGHT_SUBPIXEL ) )
|
1409
|
1409
|
{
|
1410
|
1410
|
status.header = "dumping glyph edges to stdout";
|
1411
|
|
- af_glyph_hints_dump_edges( _af_debug_hints, 1 );
|
|
1411
|
+ af_glyph_hints_dump_edges( af_debug_hints_, 1 );
|
1412
|
1412
|
}
|
1413
|
1413
|
break;
|
1414
|
1414
|
|
... |
... |
@@ -1419,7 +1419,7 @@ |
1419
|
1419
|
handle->lcd_mode == LCD_MODE_LIGHT_SUBPIXEL ) )
|
1420
|
1420
|
{
|
1421
|
1421
|
status.header = "dumping glyph segments to stdout";
|
1422
|
|
- af_glyph_hints_dump_segments( _af_debug_hints, 1 );
|
|
1422
|
+ af_glyph_hints_dump_segments( af_debug_hints_, 1 );
|
1423
|
1423
|
}
|
1424
|
1424
|
break;
|
1425
|
1425
|
|
... |
... |
@@ -1430,7 +1430,7 @@ |
1430
|
1430
|
handle->lcd_mode == LCD_MODE_LIGHT_SUBPIXEL ) )
|
1431
|
1431
|
{
|
1432
|
1432
|
status.header = "dumping glyph points to stdout";
|
1433
|
|
- af_glyph_hints_dump_points( _af_debug_hints, 1 );
|
|
1433
|
+ af_glyph_hints_dump_points( af_debug_hints_, 1 );
|
1434
|
1434
|
}
|
1435
|
1435
|
break;
|
1436
|
1436
|
#endif /* FT_DEBUG_AUTOFIT */
|
src/ftmulti.c
... |
... |
@@ -1198,7 +1198,7 @@ |
1198
|
1198
|
multimaster->axis[axis].name,
|
1199
|
1199
|
hidden[axis] ? "*" : "",
|
1200
|
1200
|
design_pos[axis] / 65536.0 );
|
1201
|
|
- grWriteCellString( bit, 0, ( n + 4 ) * HEADER_HEIGHT,
|
|
1201
|
+ grWriteCellString( bit, 0, (int)( n + 4 ) * HEADER_HEIGHT,
|
1202
|
1202
|
Header, fore_color );
|
1203
|
1203
|
}
|
1204
|
1204
|
|
src/ftstring.c
... |
... |
@@ -485,7 +485,7 @@ |
485
|
485
|
else if ( 31 < key && key < 127 )
|
486
|
486
|
{
|
487
|
487
|
if ( cursor < 31)
|
488
|
|
- buffer[cursor++] = key;
|
|
488
|
+ buffer[cursor++] = (char)key;
|
489
|
489
|
}
|
490
|
490
|
else if ( key != grKeyTab )
|
491
|
491
|
return 0;
|
... |
... |
@@ -918,11 +918,11 @@ |
918
|
918
|
while ( 1 )
|
919
|
919
|
{
|
920
|
920
|
pt_size += step;
|
921
|
|
- pt_height = handle->scaler.height;
|
|
921
|
+ pt_height = (int)handle->scaler.height;
|
922
|
922
|
|
923
|
923
|
FTDemo_Set_Current_Charsize( handle, pt_size, status.res );
|
924
|
924
|
/* avoid reloading repetitive sizes with bitmap fonts */
|
925
|
|
- if ( handle->scaler.height != pt_height )
|
|
925
|
+ if ( (int)handle->scaler.height != pt_height )
|
926
|
926
|
FTDemo_String_Load( handle, &sc );
|
927
|
927
|
|
928
|
928
|
error = FTDemo_Get_Size( handle, &size );
|
|