#!@abs_top_builddir@/fontforgeexe/fontforge
#Needs: fonts/NumberPoints.sfd

#Another point number test based on glyphs from deja-vu

Open("@abs_srcdir@/fonts/NumberPoints.sfd")
Reencode("original")
cnt=CharCnt()
ptcnts = Array(cnt)
names = Array(cnt)
i=j=0
while ( i<cnt )
  Select(i);
  if ( WorthOutputting())
      ptcnts[j] = CharInfo("PointCount");
      names[j] = CharInfo("Name")
      ++j;
  endif
  ++i;
endloop
cnt = j

Generate("@abs_builddir@/results/NumberPoints.ttf")
Open("@abs_builddir@/results/NumberPoints.ttf")

i=0
while ( i<cnt )
  Select(names[i]);
  if ( ptcnts[i] != CharInfo("PointCount"))
    Print("!!!! Point count wrong in glyph " + ToString(i) + " " + CharInfo("Name"))
  endif
  ++i;
endloop

Quit()
