freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] Detailed Comparison Web-Page


From: Werner LEMBERG
Subject: Re: [ft-devel] Detailed Comparison Web-Page
Date: Thu, 27 Jul 2017 23:28:27 +0200 (CEST)

Hello Kushal!


> I have done the glyph-alignment part for comparison of glyphs with
> differences in width/height.  I will be putting some updates about
> the 'Difference-Metric' score calculation and the list-view page.

Thanks.

> P.S: I've been traveling back to college. Too far from home. Sorry
>      for the delay in updating my branch.

No problem.

Some comments w.r.t. your branch.

. Please rename `makefile' to the traditional name `Makefile'.

. Please ensure that all text files do end with a newline –
  `style.css', for examples, does not.

. Compilation with gcc 4.8.5 fails since you are using C99 features
  (see attached log file) which are not enabled by default in older
  gcc versions (you need an explicit `-std=c99' compiler option).

  Given that FreeType doesn't use C99 features either I suggest that
  you replace them with code that works with C89 also.

. Your small programs show

    Usage   ./<exe> <font_file> <pt_size> <render_mode>

  Instead of `./<exe>' it is custom to show the value of `argv[0]';
  have a look into the `ftdiff' demo program (or others) to see what I
  mean.

. Please commit a very small, freely available font for testing
  purposes (you might reduce it to just a few glyphs with a font
  editor).  Please also mention which FreeType git commits (or
  published versions) you are using for image comparisons so that your
  results can be easily reproduced.  Maybe it makes sense to add a
  `selftest' target to the makefile that runs the just created binary
  (or binaries) on the test font.  Doing so shows exactly how to use
  the programs with a real example.


      Werner
gcc -Wall -g -I ../../include/ -DDPI=72 -o png  make_png.c bitmap.c murmur3.c 
../../objs/libfreetype.a  -lpng -lharfbuzz -lbz2 -ldl
bitmap.c: In function ‘Read_PNG’:
bitmap.c:308:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for(int y = 0; y < height; y++) {
   ^
bitmap.c:308:3: note: use option -std=c99 or -std=gnu99 to compile your code
bitmap.c:317:11: error: redefinition of ‘y’
   for(int y = 0; y < height; y++) {
           ^
bitmap.c:308:11: note: previous definition of ‘y’ was here
   for(int y = 0; y < height; y++) {
           ^
bitmap.c:317:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for(int y = 0; y < height; y++) {
   ^
bitmap.c:321:5: error: ‘for’ loop initial declarations are only allowed in C99 
mode
     for(int x = 0; x < width; x++ ) {
     ^
bitmap.c: In function ‘Add_effect’:
bitmap.c:346:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for(int y = 0; y < base->height; y++) {
   ^
bitmap.c:347:5: error: ‘for’ loop initial declarations are only allowed in C99 
mode
     for(int x = 0; x < base->width; x++ ) {
     ^
bitmap.c: In function ‘Stitch’:
bitmap.c:406:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for (int y = 0; y < left->height; ++y)
   ^
bitmap.c:408:5: error: ‘for’ loop initial declarations are only allowed in C99 
mode
     for (int x = 0; x < left->width; ++x)
     ^
bitmap.c:420:12: error: redefinition of ‘y’
   for (int y = 0; y < right->height; ++y)
            ^
bitmap.c:406:12: note: previous definition of ‘y’ was here
   for (int y = 0; y < left->height; ++y)
            ^
bitmap.c:420:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for (int y = 0; y < right->height; ++y)
   ^
bitmap.c:422:5: error: ‘for’ loop initial declarations are only allowed in C99 
mode
     for (int x = left->width; x < result->width; ++x)
     ^
bitmap.c: In function ‘First_Column’:
bitmap.c:467:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for (int x = 0; x < input->width; ++x)
   ^
bitmap.c:469:5: error: ‘for’ loop initial declarations are only allowed in C99 
mode
     for (int y = 0; y < input->height; ++y)
     ^
bitmap.c: In function ‘First_Row’:
bitmap.c:489:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for (int y = 0; y < input->height; ++y)
   ^
bitmap.c:491:5: error: ‘for’ loop initial declarations are only allowed in C99 
mode
     for (int x = 0; x < input->width; ++x)
     ^
bitmap.c: In function ‘Append_Columns’:
bitmap.c:520:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for (int x = 0; x < first_col; ++x)
   ^
bitmap.c:522:5: error: ‘for’ loop initial declarations are only allowed in C99 
mode
     for (int y = 0; y < result->height; ++y)
     ^
bitmap.c:533:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for (int y = 0; y < result->height; ++y)
   ^
bitmap.c:535:5: error: ‘for’ loop initial declarations are only allowed in C99 
mode
     for (int x = first_col; x < first_col + small->width; ++x)
     ^
bitmap.c:547:12: error: redefinition of ‘x’
   for (int x = first_col + small->width; x < result->width; ++x)
            ^
bitmap.c:520:12: note: previous definition of ‘x’ was here
   for (int x = 0; x < first_col; ++x)
            ^
bitmap.c:547:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for (int x = first_col + small->width; x < result->width; ++x)
   ^
bitmap.c:549:5: error: ‘for’ loop initial declarations are only allowed in C99 
mode
     for (int y = 0; y < result->height; ++y)
     ^
bitmap.c: In function ‘Append_Rows’:
bitmap.c:574:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for (int y = 0; y < first_row; ++y)
   ^
bitmap.c:576:5: error: ‘for’ loop initial declarations are only allowed in C99 
mode
     for (int x = 0; x < result->width; ++x)
     ^
bitmap.c:587:12: error: redefinition of ‘y’
   for (int y = first_row; y < first_row + small->height; ++y)
            ^
bitmap.c:574:12: note: previous definition of ‘y’ was here
   for (int y = 0; y < first_row; ++y)
            ^
bitmap.c:587:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for (int y = first_row; y < first_row + small->height; ++y)
   ^
bitmap.c:589:5: error: ‘for’ loop initial declarations are only allowed in C99 
mode
     for (int x = 0; x < result->width; ++x)
     ^
bitmap.c:601:12: error: redefinition of ‘y’
   for (int y = first_row + small->height; y < result->height; ++y)
            ^
bitmap.c:587:12: note: previous definition of ‘y’ was here
   for (int y = first_row; y < first_row + small->height; ++y)
            ^
bitmap.c:601:3: error: ‘for’ loop initial declarations are only allowed in C99 
mode
   for (int y = first_row + small->height; y < result->height; ++y)
   ^
bitmap.c:603:5: error: ‘for’ loop initial declarations are only allowed in C99 
mode
     for (int x = 0; x < result->width; ++x)
     ^
makefile:22: recipe for target 'png' failed
make: *** [png] Error 1

reply via email to

[Prev in Thread] Current Thread [Next in Thread]