Werner Lemberg pushed to branch master at FreeType / FreeType Demo Programs
Commits:
-
a791e7cc
by Werner Lemberg at 2022-03-31T13:07:42+02:00
-
5582bb53
by Werner Lemberg at 2022-03-31T13:58:53+02:00
17 changed files:
- Makefile
- README
- man/ftbench.1
- man/ftdiff.1
- man/ftdump.1
- man/ftgamma.1
- man/ftgrid.1
- man/ftlint.1
- man/ftmulti.1
- man/ftsdf.1
- man/ftstring.1
- man/ftvalid.1
- man/ftview.1
- man/ttdebug.1
- meson.build
- src/ftsdf.c
- src/rsvg-port.c
Changes:
... | ... | @@ -633,13 +633,12 @@ dist: |
633 | 633 | cd tmp ; \
|
634 | 634 | $(MAKE) distclean
|
635 | 635 | |
636 | - @# Generate `ChangeLog' file with commits since previous release.
|
|
636 | + @# Generate `ChangeLog' file with commits since release 2.11.0
|
|
637 | + @# (when we stopped creating this file manually).
|
|
637 | 638 | $(CHANGELOG_SCRIPT) \
|
638 | 639 | --format='%B%n' \
|
639 | 640 | --no-cluster \
|
640 | - -- `git describe --tags \
|
|
641 | - --abbrev=0 \
|
|
642 | - $(version_tag)^`..$(version_tag) \
|
|
641 | + -- VER-2-11-0..$(version_tag) \
|
|
643 | 642 | > tmp/ChangeLog
|
644 | 643 | |
645 | 644 | mv tmp ft2demos-$(version)
|
... | ... | @@ -11,8 +11,8 @@ WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
11 | 11 | of the stable FreeType 2 source packages from our server, you most
|
12 | 12 | probably have to rename its directory, for example:
|
13 | 13 | |
14 | - mv freetype-2.11.1 freetype on Unix
|
|
15 | - rename freetype-2.11.1 freetype on Windows
|
|
14 | + mv freetype-2.12.0 freetype on Unix
|
|
15 | + rename freetype-2.12.0 freetype on Windows
|
|
16 | 16 | |
17 | 17 | WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
18 | 18 |
1 | 1 | '\" t
|
2 | -.TH FTBENCH 1 "December 2021" "Freetype 2.11.1"
|
|
2 | +.TH FTBENCH 1 "March 2022" "Freetype 2.12.0"
|
|
3 | 3 | .
|
4 | 4 | .
|
5 | 5 | .SH NAME
|
1 | -.TH FTDIFF 1 "December 2021" "FreeType 2.11.1"
|
|
1 | +.TH FTDIFF 1 "March 2022" "FreeType 2.12.0"
|
|
2 | 2 | .
|
3 | 3 | .
|
4 | 4 | .SH NAME
|
1 | -.TH FTDUMP 1 "December 2021" "FreeType 2.11.1"
|
|
1 | +.TH FTDUMP 1 "March 2022" "FreeType 2.12.0"
|
|
2 | 2 | .
|
3 | 3 | .
|
4 | 4 | .SH NAME
|
1 | -.TH FTGAMMA 1 "December 2021" "FreeType 2.11.1"
|
|
1 | +.TH FTGAMMA 1 "March 2022" "FreeType 2.12.0"
|
|
2 | 2 | .
|
3 | 3 | .
|
4 | 4 | .SH NAME
|
1 | -.TH FTGRID 1 "December 2021" "Freetype 2.11.1"
|
|
1 | +.TH FTGRID 1 "March 2022" "Freetype 2.12.0"
|
|
2 | 2 | .
|
3 | 3 | .
|
4 | 4 | .SH NAME
|
1 | -.TH FTLINT 1 "December 2021" "Freetype 2.11.1"
|
|
1 | +.TH FTLINT 1 "March 2022" "Freetype 2.12.0"
|
|
2 | 2 | .
|
3 | 3 | .
|
4 | 4 | .SH NAME
|
1 | -.TH FTMULTI 1 "December 2021" "Freetype 2.11.1"
|
|
1 | +.TH FTMULTI 1 "March 2022" "Freetype 2.12.0"
|
|
2 | 2 | .
|
3 | 3 | .
|
4 | 4 | .SH NAME
|
1 | -.TH FTSDF 1 "December 2021" "Freetype 2.11.1"
|
|
1 | +.TH FTSDF 1 "March 2022" "Freetype 2.12.0"
|
|
2 | 2 | .
|
3 | 3 | .
|
4 | 4 | .SH NAME
|
1 | -.TH FTSTRING 1 "December 2021" "Freetype 2.11.1"
|
|
1 | +.TH FTSTRING 1 "March 2022" "Freetype 2.12.0"
|
|
2 | 2 | .
|
3 | 3 | .
|
4 | 4 | .SH NAME
|
1 | -.TH FTVALID 1 "December 2021" "FreeType 2.11.1"
|
|
1 | +.TH FTVALID 1 "March 2022" "FreeType 2.12.0"
|
|
2 | 2 | .
|
3 | 3 | .
|
4 | 4 | .SH NAME
|
1 | -.TH FTVIEW 1 "December 2021" "FreeType 2.11.1"
|
|
1 | +.TH FTVIEW 1 "March 2022" "FreeType 2.12.0"
|
|
2 | 2 | .
|
3 | 3 | .
|
4 | 4 | .SH NAME
|
1 | -.TH TTDEBUG 1 "December 2021" "FreeType 2.11.1"
|
|
1 | +.TH TTDEBUG 1 "March 2022" "FreeType 2.12.0"
|
|
2 | 2 | .
|
3 | 3 | .
|
4 | 4 | .SH NAME
|
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | # possible since the subproject might not be cloned yet, so we have to
|
18 | 18 | # hard-code the string.
|
19 | 19 | project('freetype-demos', 'c', 'cpp',
|
20 | - version: '2.11.1')
|
|
20 | + version: '2.12.0')
|
|
21 | 21 | |
22 | 22 | |
23 | 23 | # Access to the FreeType 2 source tree is required, since some of the demo
|
... | ... | @@ -124,7 +124,7 @@ |
124 | 124 | status.generation_time = ( (float)( end - start ) /
|
125 | 125 | (float)CLOCKS_PER_SEC ) * 1000.0f;
|
126 | 126 | |
127 | - printf( "Generation Time: %.0f ms\n", status.generation_time );
|
|
127 | + printf( "Generation Time: %.0f ms\n", (double)status.generation_time );
|
|
128 | 128 | |
129 | 129 | Exit:
|
130 | 130 | return err;
|
... | ... | @@ -240,7 +240,7 @@ |
240 | 240 | |
241 | 241 | sprintf( header_string,
|
242 | 242 | "SDF Generated in: %.0f ms, From: %s",
|
243 | - status.generation_time,
|
|
243 | + (double)status.generation_time,
|
|
244 | 244 | status.use_bitmap ? "Bitmap" : "Outline" );
|
245 | 245 | grWriteCellString( display->bitmap, 0, 2 * HEADER_HEIGHT,
|
246 | 246 | header_string, display->fore_color );
|
... | ... | @@ -257,8 +257,8 @@ |
257 | 257 | /* Only print these in reconstruction mode. */
|
258 | 258 | sprintf( header_string,
|
259 | 259 | "Width: %.2f, Edge: %.2f",
|
260 | - status.width,
|
|
261 | - status.edge );
|
|
260 | + (double)status.width,
|
|
261 | + (double)status.edge );
|
|
262 | 262 | grWriteCellString( display->bitmap, 0, 4 * HEADER_HEIGHT,
|
263 | 263 | header_string, display->fore_color );
|
264 | 264 | }
|
... | ... | @@ -523,25 +523,26 @@ |
523 | 523 | |
524 | 524 | /* Finally loop over all pixels inside the draw region */
|
525 | 525 | /* and copy pixels from the sample region to the draw region. */
|
526 | - for ( FT_Int j = (FT_UInt)( draw_region.yMax - 1 ),
|
|
527 | - y = (FT_UInt)sample_region.yMin;
|
|
526 | + for ( FT_Int j = draw_region.yMax - 1,
|
|
527 | + y = sample_region.yMin;
|
|
528 | 528 | j >= draw_region.yMin;
|
529 | 529 | j--, y++ )
|
530 | 530 | {
|
531 | - for ( FT_Int i = (FT_UInt)draw_region.xMin,
|
|
532 | - x = (FT_UInt)sample_region.xMin;
|
|
531 | + for ( FT_Int i = draw_region.xMin,
|
|
532 | + x = sample_region.xMin;
|
|
533 | 533 | i < draw_region.xMax;
|
534 | 534 | i++, x++ )
|
535 | 535 | {
|
536 | - FT_Int display_index = j * (FT_UInt)display->bitmap->width + i;
|
|
536 | + FT_Int display_index = j * display->bitmap->width + i;
|
|
537 | 537 | float min_dist;
|
538 | 538 | |
539 | 539 | |
540 | 540 | if ( status.nearest_filtering )
|
541 | 541 | {
|
542 | - FT_Int bitmap_index = ( y / status.scale ) * bitmap->width +
|
|
543 | - x / status.scale;
|
|
544 | - FT_Byte pixel_value = buffer[bitmap_index];
|
|
542 | + FT_Int bitmap_index =
|
|
543 | + ( y / (FT_Int)status.scale ) * (FT_Int)bitmap->width +
|
|
544 | + x / (FT_Int)status.scale;
|
|
545 | + FT_Byte pixel_value = buffer[bitmap_index];
|
|
545 | 546 | |
546 | 547 | |
547 | 548 | /* If nearest filtering then simply take the value of the */
|
... | ... | @@ -252,8 +252,8 @@ |
252 | 252 | }
|
253 | 253 | |
254 | 254 | /* Scale factors from SVG coordinates to the needed output size. */
|
255 | - x_svg_to_out = (float)metrics.x_ppem / dimension_svg.width;
|
|
256 | - y_svg_to_out = (float)metrics.y_ppem / dimension_svg.height;
|
|
255 | + x_svg_to_out = (double)metrics.x_ppem / dimension_svg.width;
|
|
256 | + y_svg_to_out = (double)metrics.y_ppem / dimension_svg.height;
|
|
257 | 257 | |
258 | 258 | /*
|
259 | 259 | * Create a cairo recording surface. This is done for two reasons.
|
... | ... | @@ -376,7 +376,7 @@ |
376 | 376 | slot->metrics.vertBearingY = (FT_Pos)( vertBearingY * 64 );
|
377 | 377 | |
378 | 378 | if ( slot->metrics.vertAdvance == 0 )
|
379 | - slot->metrics.vertAdvance = (FT_Pos)( metrics_height * 1.2 * 64 );
|
|
379 | + slot->metrics.vertAdvance = (FT_Pos)( metrics_height * 1.2f * 64 );
|
|
380 | 380 | |
381 | 381 | /* If a render call is to follow, just destroy the context for the */
|
382 | 382 | /* recording surface since no more drawing will be done on it. */
|