AvailFonts()

This forum is for general developer support questions.

AvailFonts()

Postby chris » Fri May 04, 2012 8:09 pm

Hi

Consider this program, which spews out a list of fonts and sizes available:

Code: Select all
ULONG scan_fonts()
{
   int afShortage, afSize = 100, i;
   struct AvailFontsHeader *afh;
   struct AvailFonts *af;

printf("Scanning fonts...\n");
   do {
      if(afh = (struct AvailFontsHeader *)AllocVec(afSize, MEMF_PRIVATE)) {
         if(afShortage = AvailFonts(afh, afSize, AFF_DISK | AFF_OTAG | AFF_SCALED)) {
            FreeVec(afh);
printf("afshortage = %ld\n",afShortage);
            afSize += afShortage;
         }
      } else {
         /* out of memory, bail out */
printf("mem\n");
         return 0;
      }
printf("afshortage000 = %ld\n",afShortage);
   } while (afShortage);

   if(afh) {
printf("afh = %lx\n", afh);
      af = (struct AvailFonts *)&(afh[1]);
printf("af = %lx entries = %ld\n", af, afh->afh_NumEntries);
      for(i = 0; i < afh->afh_NumEntries; i++) {
                  printf("%s %ld\n", af[i].af_Attr.ta_Name, af[i].af_Attr.ta_YSize);
               af++;
      }
      FreeVec(afh);
   } else {
      return 0;
   }
}

int main(int argc, char** argv)
{
   scan_fonts();
   return 0;
}


According to the AutoDocs, using AFF_OTAG | AFF_SCALED means that a ta_YSize of 0 will be included for any font that is scalable through the Bullet API. this seems to be the case, but a 36 fonts in, it gives up:

Code: Select all
Scanning fonts...
afshortage = 65243
afshortage000 = 65243
afshortage000 = 0
afh = 538c4000
af = 538c4002 entries = 1951
Arial Black.font 0
Arial Black.font 10
Arial Black.font 14
Arial Black.font 20
Arial Black.font 32
Arial Black.font 60
Arial Bold Italic.font 0
Arial Bold Italic.font 10
Arial Bold Italic.font 14
Arial Bold Italic.font 20
Arial Bold Italic.font 32
Arial Bold Italic.font 60
Arial Bold.font 0
Arial Bold.font 10
Arial Bold.font 14
Arial Bold.font 20
Arial Bold.font 32
Arial Bold.font 60
Arial Italic.font 0
Arial Italic.font 10
Arial Italic.font 14
Arial Italic.font 20
Arial Italic.font 32
Arial Italic.font 60
Arial.font 0
Arial.font 10
Arial.font 14
Arial.font 20
Arial.font 32
Arial.font 60
Artistic.font 0
Artistic.font 10
Artistic.font 14
Artistic.font 20
Artistic.font 32
Artistic.font 60
Athena.font 0
Athena.font 10
Athena.font 14
Athena.font 20
Athena.font 32
Athena.font 60
Avnt-Demi.font 0
Avnt-Demi.font 10
Avnt-Demi.font 14
Avnt-Demi.font 20
Avnt-Demi.font 32
Avnt-Demi.font 60
Avnt.font 0
Avnt.font 10
Avnt.font 14
Avnt.font 20
Avnt.font 32
Avnt.font 60
Bitstream Cyberbit.font 0
Bitstream Cyberbit.font 10
Bitstream Cyberbit.font 14
Bitstream Cyberbit.font 20
Bitstream Cyberbit.font 32
Bitstream Cyberbit.font 60
Bitstream Vera Sans Bold Oblique.font 0
Bitstream Vera Sans Bold Oblique.font 10
Bitstream Vera Sans Bold Oblique.font 14
Bitstream Vera Sans Bold Oblique.font 20
Bitstream Vera Sans Bold Oblique.font 32
Bitstream Vera Sans Bold Oblique.font 60
Bitstream Vera Sans Bold.font 0
Bitstream Vera Sans Bold.font 10
Bitstream Vera Sans Bold.font 14
Bitstream Vera Sans Bold.font 20
Bitstream Vera Sans Bold.font 32
Bitstream Vera Sans Bold.font 60
Bitstream Vera Sans Mono Bold Oblique.font 0
Bitstream Vera Sans Mono Bold Oblique.font 10
Bitstream Vera Sans Mono Bold Oblique.font 14
Bitstream Vera Sans Mono Bold Oblique.font 20
Bitstream Vera Sans Mono Bold Oblique.font 32
Bitstream Vera Sans Mono Bold Oblique.font 60
Bitstream Vera Sans Mono Bold.font 0
Bitstream Vera Sans Mono Bold.font 10
Bitstream Vera Sans Mono Bold.font 14
Bitstream Vera Sans Mono Bold.font 20
Bitstream Vera Sans Mono Bold.font 32
Bitstream Vera Sans Mono Bold.font 60
Bitstream Vera Sans Mono Oblique.font 0
Bitstream Vera Sans Mono Oblique.font 10
Bitstream Vera Sans Mono Oblique.font 14
Bitstream Vera Sans Mono Oblique.font 20
Bitstream Vera Sans Mono Oblique.font 32
Bitstream Vera Sans Mono Oblique.font 60
Bitstream Vera Sans Mono.font 0
Bitstream Vera Sans Mono.font 10
Bitstream Vera Sans Mono.font 14
Bitstream Vera Sans Mono.font 20
Bitstream Vera Sans Mono.font 32
Bitstream Vera Sans Mono.font 60
Bitstream Vera Sans Oblique.font 0
Bitstream Vera Sans Oblique.font 10
Bitstream Vera Sans Oblique.font 14
Bitstream Vera Sans Oblique.font 20
Bitstream Vera Sans Oblique.font 32
Bitstream Vera Sans Oblique.font 60
Bitstream Vera Sans.font 0
Bitstream Vera Sans.font 10
Bitstream Vera Sans.font 14
Bitstream Vera Sans.font 20
Bitstream Vera Sans.font 32
Bitstream Vera Sans.font 60
Bitstream Vera Serif Bold.font 0
Bitstream Vera Serif Bold.font 10
Bitstream Vera Serif Bold.font 14
Bitstream Vera Serif Bold.font 20
Bitstream Vera Serif Bold.font 32
Bitstream Vera Serif Bold.font 60
Bitstream Vera Serif.font 0
Bitstream Vera Serif.font 10
Bitstream Vera Serif.font 14
Bitstream Vera Serif.font 20
Bitstream Vera Serif.font 32
Bitstream Vera Serif.font 60
Book-Demi.font 0
Book-Demi.font 10
Book-Demi.font 14
Book-Demi.font 20
Book-Demi.font 32
Book-Demi.font 60
Book.font 0
Book.font 10
Book.font 14
Book.font 20
Book.font 32
Book.font 60
Calgary.font 0
Calgary.font 10
Calgary.font 14
Calgary.font 20
Calgary.font 32
Calgary.font 60
Century Schoolbook L Bold Italic.font 0
Century Schoolbook L Bold Italic.font 10
Century Schoolbook L Bold Italic.font 14
Century Schoolbook L Bold Italic.font 20
Century Schoolbook L Bold Italic.font 32
Century Schoolbook L Bold Italic.font 60
Century Schoolbook L Bold.font 0
Century Schoolbook L Bold.font 10
Century Schoolbook L Bold.font 14
Century Schoolbook L Bold.font 20
Century Schoolbook L Bold.font 32
Century Schoolbook L Bold.font 60
Century Schoolbook L Italic.font 0
Century Schoolbook L Italic.font 10
Century Schoolbook L Italic.font 14
Century Schoolbook L Italic.font 20
Century Schoolbook L Italic.font 32
Century Schoolbook L Italic.font 60
Century Schoolbook L Roman.font 0
Century Schoolbook L Roman.font 10
Century Schoolbook L Roman.font 14
Century Schoolbook L Roman.font 20
Century Schoolbook L Roman.font 32
Century Schoolbook L Roman.font 60
CGTimes.font 0
CGTimes.font 10
CGTimes.font 14
CGTimes.font 20
CGTimes.font 32
CGTimes.font 60
CGTriumvirate.font 0
CGTriumvirate.font 10
CGTriumvirate.font 14
CGTriumvirate.font 20
CGTriumvirate.font 32
CGTriumvirate.font 60
Chan.font 0
Chan.font 10
Chan.font 14
Chan.font 20
Chan.font 32
Chan.font 60
Circus.font 0
Circus.font 10
Circus.font 14
Circus.font 20
Circus.font 32
Circus.font 60
Code2000.font 0
Code2000.font 10
Code2000.font 14
Code2000.font 20
Code2000.font 32
Code2000.font 60
Courier New Bold Italic.font 0
Courier New Bold Italic.font 10
Courier New Bold Italic.font 14
Courier New Bold Italic.font 20
Courier New Bold Italic.font 32
Courier New Bold Italic.font 60
Courier New Bold.font 0
Courier New Bold.font 10
Courier New Bold.font 14
Courier New Bold.font 20
Courier New Bold.font 32
Courier New Bold.font 60
Courier New Italic.font 0
Courier New Italic.font 10
Courier New Italic.font 14
Courier New Italic.font 20
Courier New Italic.font 32
Courier New Italic.font 60
Courier New.font 0
Courier New.font 3
Courier New.font 6
Courier New.font 8
Courier New.font 10
Courier New.font 12
Courier New.font 16
Courier New.font 24
Courier New.font 48
Courier New.font 72
CS Times Bold Italic.font 8
CS Times Bold Italic.font 12
CS Times Bold Italic.font 16
CS Times Bold Italic.font 24
CS Times Bold Italic.font 48
CS Times Bold Italic.font 72
CS Times Bold.font 8
CS Times Bold.font 12
CS Times Bold.font 16
CS Times Bold.font 24
CS Times Bold.font 48
CS Times Bold.font 72
CS Times Italic.font 8
CS Times Italic.font 12
CS Times Italic.font 16
CS Times Italic.font 24
CS Times Italic.font 48
CS Times Italic.font 72
CS Times.font 8
CS Times.font 12
CS Times.font 16
CS Times.font 24
CS Times.font 48
CS Times.font 72
CS Triumvirate Bold.font 8
CS Triumvirate Bold.font 12
CS Triumvirate Bold.font 16
CS Triumvirate Bold.font 24
CS Triumvirate Bold.font 48
CS Triumvirate Bold.font 72
CS Triumvirate.font 8
CS Triumvirate.font 12
CS Triumvirate.font 16
CS Triumvirate.font 24
CS Triumvirate.font 48
CS Triumvirate.font 72
DejaVu Sans Bold Oblique.font 8
DejaVu Sans Bold Oblique.font 12
DejaVu Sans Bold Oblique.font 16
DejaVu Sans Bold Oblique.font 24
DejaVu Sans Bold Oblique.font 48
DejaVu Sans Bold Oblique.font 72
DejaVu Sans Bold.font 8
DejaVu Sans Bold.font 12
DejaVu Sans Bold.font 16
DejaVu Sans Bold.font 24
DejaVu Sans Bold.font 48
DejaVu Sans Bold.font 72
DejaVu Sans Condensed Bold Oblique.font 8
DejaVu Sans Condensed Bold Oblique.font 12
DejaVu Sans Condensed Bold Oblique.font 16
DejaVu Sans Condensed Bold Oblique.font 24
DejaVu Sans Condensed Bold Oblique.font 48
DejaVu Sans Condensed Bold Oblique.font 72
DejaVu Sans Condensed Bold.font 8
DejaVu Sans Condensed Bold.font 12
DejaVu Sans Condensed Bold.font 16
DejaVu Sans Condensed Bold.font 24
DejaVu Sans Condensed Bold.font 48
DejaVu Sans Condensed Bold.font 72
DejaVu Sans Condensed Oblique.font 8
DejaVu Sans Condensed Oblique.font 12
DejaVu Sans Condensed Oblique.font 16
DejaVu Sans Condensed Oblique.font 24
DejaVu Sans Condensed Oblique.font 48
DejaVu Sans Condensed Oblique.font 72
DejaVu Sans Condensed.font 8
DejaVu Sans Condensed.font 12
DejaVu Sans Condensed.font 16
DejaVu Sans Condensed.font 24
DejaVu Sans Condensed.font 48
DejaVu Sans Condensed.font 72
DejaVu Sans ExtraLight.font 8
DejaVu Sans ExtraLight.font 12
DejaVu Sans ExtraLight.font 16
DejaVu Sans ExtraLight.font 24
DejaVu Sans ExtraLight.font 48
DejaVu Sans ExtraLight.font 72
DejaVu Sans Mono Bold Oblique.font 8
DejaVu Sans Mono Bold Oblique.font 12
DejaVu Sans Mono Bold Oblique.font 16
DejaVu Sans Mono Bold Oblique.font 24
DejaVu Sans Mono Bold Oblique.font 48
DejaVu Sans Mono Bold Oblique.font 72
DejaVu Sans Mono Bold.font 8
DejaVu Sans Mono Bold.font 12
DejaVu Sans Mono Bold.font 16
DejaVu Sans Mono Bold.font 24
DejaVu Sans Mono Bold.font 48
DejaVu Sans Mono Bold.font 72
DejaVu Sans Mono Oblique.font 8
DejaVu Sans Mono Oblique.font 12
DejaVu Sans Mono Oblique.font 16
DejaVu Sans Mono Oblique.font 24
DejaVu Sans Mono Oblique.font 48
DejaVu Sans Mono Oblique.font 72
DejaVu Sans Mono.font 8
DejaVu Sans Mono.font 12
DejaVu Sans Mono.font 16
DejaVu Sans Mono.font 24
DejaVu Sans Mono.font 48
DejaVu Sans Mono.font 72
DejaVu Sans Oblique.font 8
DejaVu Sans Oblique.font 12
DejaVu Sans Oblique.font 16
DejaVu Sans Oblique.font 24
DejaVu Sans Oblique.font 48
DejaVu Sans Oblique.font 72
DejaVu Sans.font 8
DejaVu Sans.font 12
DejaVu Sans.font 16
DejaVu Sans.font 24
DejaVu Sans.font 48
DejaVu Sans.font 72
DejaVu Serif Bold Italic.font 8
DejaVu Serif Bold Italic.font 12
DejaVu Serif Bold Italic.font 16
DejaVu Serif Bold Italic.font 24
DejaVu Serif Bold Italic.font 48
DejaVu Serif Bold Italic.font 72
DejaVu Serif Bold.font 8
DejaVu Serif Bold.font 12
DejaVu Serif Bold.font 16
DejaVu Serif Bold.font 24
DejaVu Serif Bold.font 48
DejaVu Serif Bold.font 72
DejaVu Serif Condensed Bold Italic.font 8
DejaVu Serif Condensed Bold Italic.font 12
DejaVu Serif Condensed Bold Italic.font 16
DejaVu Serif Condensed Bold Italic.font 24
DejaVu Serif Condensed Bold Italic.font 48
DejaVu Serif Condensed Bold Italic.font 72
DejaVu Serif Condensed Bold.font 8
DejaVu Serif Condensed Bold.font 12
DejaVu Serif Condensed Bold.font 16
DejaVu Serif Condensed Bold.font 24
DejaVu Serif Condensed Bold.font 48
DejaVu Serif Condensed Bold.font 72
DejaVu Serif Condensed Italic.font 8
DejaVu Serif Condensed Italic.font 12
DejaVu Serif Condensed Italic.font 16
DejaVu Serif Condensed Italic.font 24
DejaVu Serif Condensed Italic.font 48
DejaVu Serif Condensed Italic.font 72
DejaVu Serif Condensed.font 8
DejaVu Serif Condensed.font 12
DejaVu Serif Condensed.font 16
DejaVu Serif Condensed.font 24
DejaVu Serif Condensed.font 48
DejaVu Serif Condensed.font 72
DejaVu Serif Italic.font 8
DejaVu Serif Italic.font 12
DejaVu Serif Italic.font 16
DejaVu Serif Italic.font 24
DejaVu Serif Italic.font 48
DejaVu Serif Italic.font 72
DejaVu Serif.font 8
DejaVu Serif.font 12
DejaVu Serif.font 16
DejaVu Serif.font 24
DejaVu Serif.font 48
DejaVu Serif.font 72
Ding.font 8
Ding.font 12
Ding.font 16
Ding.font 24
Ding.font 48
Ding.font 72
Dingbats.font 8
Dingbats.font 12
Dingbats.font 16
Dingbats.font 24
Dingbats.font 48
Dingbats.font 72
DomCasual.font 8
DomCasual.font 12
DomCasual.font 16
DomCasual.font 24
DomCasual.font 48
DomCasual.font 72
Elegance.font 8
Elegance.font 12
Elegance.font 16
Elegance.font 24
Elegance.font 48
Elegance.font 72
EversonMono.font 8
EversonMono.font 12
EversonMono.font 16
EversonMono.font 24
EversonMono.font 48
EversonMono.font 72
Garamond Antiqua.font 8
Garamond Antiqua.font 12
Garamond Antiqua.font 16
Garamond Antiqua.font 24
Garamond Antiqua.font 48
Garamond Antiqua.font 72
Garamond Halbfett.font 8
Garamond Halbfett.font 12
Garamond Halbfett.font 16
Garamond Halbfett.font 24
Garamond Halbfett.font 48
Garamond Halbfett.font 72
Garamond Kursiv Halbfett.font 8
Garamond Kursiv Halbfett.font 12
Garamond Kursiv Halbfett.font 16
Garamond Kursiv Halbfett.font 24
Garamond Kursiv Halbfett.font 48
Garamond Kursiv Halbfett.font 72
Garamond Kursiv.font 8
Garamond Kursiv.font 12
Garamond Kursiv.font 16
Garamond Kursiv.font 24
Garamond Kursiv.font 48
Garamond Kursiv.font 72
Gentium Italic.font 8
Gentium Italic.font 12
Gentium Italic.font 16
Gentium Italic.font 24
Gentium Italic.font 48
Gentium Italic.font 72
Gentium.font 8
Gentium.font 12
Gentium.font 16
Gentium.font 24
Gentium.font 48
Gentium.font 72
GentiumAlt Italic.font 8
GentiumAlt Italic.font 12
GentiumAlt Italic.font 16
GentiumAlt Italic.font 24
GentiumAlt Italic.font 48
GentiumAlt Italic.font 72
GentiumAlt.font 8
GentiumAlt.font 12
GentiumAlt.font 16
GentiumAlt.font 24
GentiumAlt.font 48
GentiumAlt.font 72
Georgia Bold Italic.font 8
Georgia Bold Italic.font 12
Georgia Bold Italic.font 16
Georgia Bold Italic.font 24
Georgia Bold Italic.font 48
Georgia Bold Italic.font 72
Georgia Bold.font 8
Georgia Bold.font 12
Georgia Bold.font 16
Georgia Bold.font 24
Georgia Bold.font 48
Georgia Bold.font 72
Georgia Italic.font 8
Georgia Italic.font 12
Georgia Italic.font 16
Georgia Italic.font 24
Georgia Italic.font 48
Georgia Italic.font 72
Georgia.font 8
Georgia.font 12
Georgia.font 16
Georgia.font 24
Georgia.font 48
Georgia.font 72
HelvNrw-Bold.font 8
HelvNrw-Bold.font 12
HelvNrw-Bold.font 16
HelvNrw-Bold.font 24
HelvNrw-Bold.font 48
HelvNrw-Bold.font 72
HelvNrw.font 8
HelvNrw.font 12
HelvNrw.font 16
HelvNrw.font 24
HelvNrw.font 48
HelvNrw.font 72
LetterGothic.font 8
LetterGothic.font 12
LetterGothic.font 16
LetterGothic.font 24
LetterGothic.font 48
LetterGothic.font 72
LinePrinter.font 8
LinePrinter.font 12
LinePrinter.font 16
LinePrinter.font 24
LinePrinter.font 48
LinePrinter.font 72
Lucida Grande.font 8
Lucida Grande.font 12
Lucida Grande.font 16
Lucida Grande.font 24
Lucida Grande.font 48
Lucida Grande.font 72
LuciSans.font 8
LuciSans.font 12
LuciSans.font 16
LuciSans.font 24
LuciSans.font 48
LuciSans.font 72
MgOpen Canonica Bold Italic.font 8
MgOpen Canonica Bold Italic.font 12
MgOpen Canonica Bold Italic.font 16
MgOpen Canonica Bold Italic.font 24
MgOpen Canonica Bold Italic.font 48
MgOpen Canonica Bold Italic.font 72
MgOpen Canonica Bold.font 8
MgOpen Canonica Bold.font 12
MgOpen Canonica Bold.font 16
MgOpen Canonica Bold.font 24
MgOpen Canonica Bold.font 48
MgOpen Canonica Bold.font 72
MgOpen Canonica Italic.font 8
MgOpen Canonica Italic.font 12
MgOpen Canonica Italic.font 16
MgOpen Canonica Italic.font 24
MgOpen Canonica Italic.font 48
MgOpen Canonica Italic.font 72
MgOpen Canonica.font 8
MgOpen Canonica.font 12
MgOpen Canonica.font 16
MgOpen Canonica.font 24
MgOpen Canonica.font 48
MgOpen Canonica.font 72
MgOpen Cosmetica Bold Oblique.font 8
MgOpen Cosmetica Bold Oblique.font 12
MgOpen Cosmetica Bold Oblique.font 16
MgOpen Cosmetica Bold Oblique.font 24
MgOpen Cosmetica Bold Oblique.font 48
MgOpen Cosmetica Bold Oblique.font 72
MgOpen Cosmetica Bold.font 8
MgOpen Cosmetica Bold.font 12
MgOpen Cosmetica Bold.font 16
MgOpen Cosmetica Bold.font 24
MgOpen Cosmetica Bold.font 48
MgOpen Cosmetica Bold.font 72
MgOpen Cosmetica Oblique.font 8
MgOpen Cosmetica Oblique.font 12
MgOpen Cosmetica Oblique.font 16
MgOpen Cosmetica Oblique.font 24
MgOpen Cosmetica Oblique.font 48
MgOpen Cosmetica Oblique.font 72
MgOpen Cosmetica.font 8
MgOpen Cosmetica.font 12
MgOpen Cosmetica.font 16
MgOpen Cosmetica.font 24
MgOpen Cosmetica.font 48
MgOpen Cosmetica.font 72
MgOpen Modata Bold.font 8
MgOpen Modata Bold.font 12
MgOpen Modata Bold.font 16
MgOpen Modata Bold.font 24
MgOpen Modata Bold.font 48
MgOpen Modata Bold.font 72
MgOpen Modata BoldOblique.font 8
MgOpen Modata BoldOblique.font 12
MgOpen Modata BoldOblique.font 16
MgOpen Modata BoldOblique.font 24
MgOpen Modata BoldOblique.font 48
MgOpen Modata BoldOblique.font 72
MgOpen Modata Oblique.font 8
MgOpen Modata Oblique.font 12
MgOpen Modata Oblique.font 16
MgOpen Modata Oblique.font 24
MgOpen Modata Oblique.font 48
MgOpen Modata Oblique.font 72
MgOpen Modata.font 8
MgOpen Modata.font 12
MgOpen Modata.font 16
MgOpen Modata.font 24
MgOpen Modata.font 48
MgOpen Modata.font 72
MgOpen Moderna Bold.font 8
MgOpen Moderna Bold.font 12
MgOpen Moderna Bold.font 16
MgOpen Moderna Bold.font 24
MgOpen Moderna Bold.font 48
MgOpen Moderna Bold.font 72
MgOpen Moderna BoldOblique.font 8
MgOpen Moderna BoldOblique.font 12
MgOpen Moderna BoldOblique.font 16
MgOpen Moderna BoldOblique.font 24
MgOpen Moderna BoldOblique.font 48
MgOpen Moderna BoldOblique.font 72
MgOpen Moderna Oblique.font 8
MgOpen Moderna Oblique.font 12
MgOpen Moderna Oblique.font 16
MgOpen Moderna Oblique.font 24
MgOpen Moderna Oblique.font 48
MgOpen Moderna Oblique.font 72
MgOpen Moderna.font 8
MgOpen Moderna.font 12
MgOpen Moderna.font 16
MgOpen Moderna.font 24
MgOpen Moderna.font 48
MgOpen Moderna.font 72
MovieStar.font 8
MovieStar.font 12
MovieStar.font 16
MovieStar.font 24
MovieStar.font 48
MovieStar.font 72
Nimbus Mono L Bold Oblique.font 8
Nimbus Mono L Bold Oblique.font 12
Nimbus Mono L Bold Oblique.font 16
Nimbus Mono L Bold Oblique.font 24
Nimbus Mono L Bold Oblique.font 48
Nimbus Mono L Bold Oblique.font 72
Nimbus Mono L Bold.font 8
Nimbus Mono L Bold.font 12
Nimbus Mono L Bold.font 16
Nimbus Mono L Bold.font 24
Nimbus Mono L Bold.font 48
Nimbus Mono L Bold.font 72
Nimbus Mono L Regular Oblique.font 8
Nimbus Mono L Regular Oblique.font 12
Nimbus Mono L Regular Oblique.font 16
Nimbus Mono L Regular Oblique.font 24
Nimbus Mono L Regular Oblique.font 48
Nimbus Mono L Regular Oblique.font 72
Nimbus Mono L Regular.font 8
Nimbus Mono L Regular.font 12
Nimbus Mono L Regular.font 16
Nimbus Mono L Regular.font 24
Nimbus Mono L Regular.font 48
Nimbus Mono L Regular.font 72
Nimbus Roman No9 L Medium Italic.font 8
Nimbus Roman No9 L Medium Italic.font 12
Nimbus Roman No9 L Medium Italic.font 16
Nimbus Roman No9 L Medium Italic.font 24
Nimbus Roman No9 L Medium Italic.font 48
Nimbus Roman No9 L Medium Italic.font 72
Nimbus Roman No9 L Medium.font 8
Nimbus Roman No9 L Medium.font 12
Nimbus Roman No9 L Medium.font 16
Nimbus Roman No9 L Medium.font 24
Nimbus Roman No9 L Medium.font 48
Nimbus Roman No9 L Medium.font 72
Nimbus Roman No9 L Regular Italic.font 8
Nimbus Roman No9 L Regular Italic.font 12
Nimbus Roman No9 L Regular Italic.font 16
Nimbus Roman No9 L Regular Italic.font 24
Nimbus Roman No9 L Regular Italic.font 48
Nimbus Roman No9 L Regular Italic.font 72
Nimbus Roman No9 L Regular.font 8
Nimbus Roman No9 L Regular.font 12
Nimbus Roman No9 L Regular.font 16
Nimbus Roman No9 L Regular.font 24
Nimbus Roman No9 L Regular.font 48
Nimbus Roman No9 L Regular.font 72
Nimbus Sans L Bold Condensed Italic.font 8
Nimbus Sans L Bold Condensed Italic.font 12
Nimbus Sans L Bold Condensed Italic.font 16
Nimbus Sans L Bold Condensed Italic.font 24
Nimbus Sans L Bold Condensed Italic.font 48
Nimbus Sans L Bold Condensed Italic.font 72
Nimbus Sans L Bold Condensed.font 8
Nimbus Sans L Bold Condensed.font 12
Nimbus Sans L Bold Condensed.font 16
Nimbus Sans L Bold Condensed.font 24
Nimbus Sans L Bold Condensed.font 48
Nimbus Sans L Bold Condensed.font 72
Nimbus Sans L Bold Italic.font 8
Nimbus Sans L Bold Italic.font 12
Nimbus Sans L Bold Italic.font 16
Nimbus Sans L Bold Italic.font 24
Nimbus Sans L Bold Italic.font 48
Nimbus Sans L Bold Italic.font 72
Nimbus Sans L Bold.font 8
Nimbus Sans L Bold.font 12
Nimbus Sans L Bold.font 16
Nimbus Sans L Bold.font 24
Nimbus Sans L Bold.font 48
Nimbus Sans L Bold.font 72
Nimbus Sans L Regular Condensed Italic.font 8
Nimbus Sans L Regular Condensed Italic.font 12
Nimbus Sans L Regular Condensed Italic.font 16
Nimbus Sans L Regular Condensed Italic.font 24
Nimbus Sans L Regular Condensed Italic.font 48
Nimbus Sans L Regular Condensed Italic.font 72
Nimbus Sans L Regular Condensed.font 8
Nimbus Sans L Regular Condensed.font 12
Nimbus Sans L Regular Condensed.font 16
Nimbus Sans L Regular Condensed.font 24
Nimbus Sans L Regular Condensed.font 48
Nimbus Sans L Regular Condensed.font 72
Nimbus Sans L Regular Italic.font 8
Nimbus Sans L Regular Italic.font 12
Nimbus Sans L Regular Italic.font 16
Nimbus Sans L Regular Italic.font 24
Nimbus Sans L Regular Italic.font 48
Nimbus Sans L Regular Italic.font 72
Nimbus Sans L Regular.font 8
Nimbus Sans L Regular.font 12
Nimbus Sans L Regular.font 16
Nimbus Sans L Regular.font 24
Nimbus Sans L Regular.font 48
Nimbus Sans L Regular.font 72
Oriental.font 8
Oriental.font 12
Oriental.font 16
Oriental.font 24
Oriental.font 48
Oriental.font 72
PageStream.font 8
PageStream.font 12
PageStream.font 16
PageStream.font 24
PageStream.font 48
PageStream.font 72
Pala-Bold.font 8
Pala-Bold.font 12
Pala-Bold.font 16
Pala-Bold.font 24
Pala-Bold.font 48
Pala-Bold.font 72
Pala.font 8
Pala.font 12
Pala.font 16
Pala.font 24
Pala.font 48
Pala.font 72
Roman Bookface.font 8
Roman Bookface.font 12
Roman Bookface.font 16
Roman Bookface.font 24
Roman Bookface.font 48
Roman Bookface.font 72
Schl-Bold.font 8
Schl-Bold.font 12
Schl-Bold.font 16
Schl-Bold.font 24
Schl-Bold.font 48
Schl-Bold.font 72
Schl.font 8
Schl.font 12
Schl.font 16
Schl.font 24
Schl.font 48
Schl.font 72
Standard Symbols L.font 8
Standard Symbols L.font 12
Standard Symbols L.font 16
Standard Symbols L.font 24
Standard Symbols L.font 48
Standard Symbols L.font 72
Symbol.font 8
Symbol.font 12
Symbol.font 16
Symbol.font 24
Symbol.font 48
Symbol.font 72
Tahoma Bold.font 8
Tahoma Bold.font 12
Tahoma Bold.font 16
Tahoma Bold.font 24
Tahoma Bold.font 48
Tahoma Bold.font 72
Tahoma.font 8
Tahoma.font 12
Tahoma.font 16
Tahoma.font 24
Tahoma.font 48
Tahoma.font 72
teletext2.font 8
teletext2.font 12
teletext2.font 16
teletext2.font 24
teletext2.font 48
teletext2.font 72
Times New Roman Bold Italic.font 8
Times New Roman Bold Italic.font 12
Times New Roman Bold Italic.font 16
Times New Roman Bold Italic.font 24
Times New Roman Bold Italic.font 48
Times New Roman Bold Italic.font 72
Times New Roman Bold.font 8
Times New Roman Bold.font 12
Times New Roman Bold.font 16
Times New Roman Bold.font 24
Times New Roman Bold.font 48
Times New Roman Bold.font 72
Times New Roman Italic.font 8
Times New Roman Italic.font 12
Times New Roman Italic.font 16
Times New Roman Italic.font 24
Times New Roman Italic.font 48
Times New Roman Italic.font 72
Times New Roman.font 8
Times New Roman.font 12
Times New Roman.font 16
Times New Roman.font 24
Times New Roman.font 48
Times New Roman.font 72
Titles.font 8
Titles.font 12
Titles.font 16
Titles.font 24
Titles.font 48
Titles.font 72
TomHud.font 8
TomHud.font 12
TomHud.font 16
TomHud.font 24
TomHud.font 48
TomHud.font 72
Trebuchet MS Bold Italic.font 8
Trebuchet MS Bold Italic.font 12
Trebuchet MS Bold Italic.font 16
Trebuchet MS Bold Italic.font 24
Trebuchet MS Bold Italic.font 48
Trebuchet MS Bold Italic.font 72
Trebuchet MS Bold.font 8
Trebuchet MS Bold.font 12
Trebuchet MS Bold.font 16
Trebuchet MS Bold.font 24
Trebuchet MS Bold.font 48
Trebuchet MS Bold.font 72
Trebuchet MS Italic.font 8
Trebuchet MS Italic.font 12
Trebuchet MS Italic.font 16
Trebuchet MS Italic.font 24
Trebuchet MS Italic.font 48
Trebuchet MS Italic.font 72
Trebuchet MS.font 8
Trebuchet MS.font 12
Trebuchet MS.font 16
Trebuchet MS.font 24
Trebuchet MS.font 48
Trebuchet MS.font 72
UnivRmn.font 8
UnivRmn.font 12
UnivRmn.font 16
UnivRmn.font 24
UnivRmn.font 48
UnivRmn.font 72
URW Bookman L Demi Bold Italic.font 8
URW Bookman L Demi Bold Italic.font 12
URW Bookman L Demi Bold Italic.font 16
URW Bookman L Demi Bold Italic.font 24
URW Bookman L Demi Bold Italic.font 48
URW Bookman L Demi Bold Italic.font 72
URW Bookman L Demi Bold.font 8
URW Bookman L Demi Bold.font 12
URW Bookman L Demi Bold.font 16
URW Bookman L Demi Bold.font 24
URW Bookman L Demi Bold.font 48
URW Bookman L Demi Bold.font 72
URW Bookman L Light Italic.font 8
URW Bookman L Light Italic.font 12
URW Bookman L Light Italic.font 16
URW Bookman L Light Italic.font 24
URW Bookman L Light Italic.font 48
URW Bookman L Light Italic.font 72
URW Bookman L Light.font 8
URW Bookman L Light.font 12
URW Bookman L Light.font 16
URW Bookman L Light.font 24
URW Bookman L Light.font 48
URW Bookman L Light.font 72
URW Chancery L Medium Italic.font 8
URW Chancery L Medium Italic.font 12
URW Chancery L Medium Italic.font 16
URW Chancery L Medium Italic.font 24
URW Chancery L Medium Italic.font 48
URW Chancery L Medium Italic.font 72
URW Gothic L Book Oblique.font 8
URW Gothic L Book Oblique.font 12
URW Gothic L Book Oblique.font 16
URW Gothic L Book Oblique.font 24
URW Gothic L Book Oblique.font 48
URW Gothic L Book Oblique.font 72
URW Gothic L Book.font 8
URW Gothic L Book.font 12
URW Gothic L Book.font 16
URW Gothic L Book.font 24
URW Gothic L Book.font 48
URW Gothic L Book.font 72
URW Gothic L Demi Oblique.font 8
URW Gothic L Demi Oblique.font 12
URW Gothic L Demi Oblique.font 16
URW Gothic L Demi Oblique.font 24
URW Gothic L Demi Oblique.font 48
URW Gothic L Demi Oblique.font 72
URW Gothic L Demi.font 8
URW Gothic L Demi.font 12
URW Gothic L Demi.font 16
URW Gothic L Demi.font 24
URW Gothic L Demi.font 48
URW Gothic L Demi.font 72
URW Palladio L Bold Italic.font 8
URW Palladio L Bold Italic.font 12
URW Palladio L Bold Italic.font 16
URW Palladio L Bold Italic.font 24
URW Palladio L Bold Italic.font 48
URW Palladio L Bold Italic.font 72
URW Palladio L Bold.font 8
URW Palladio L Bold.font 12
URW Palladio L Bold.font 16
URW Palladio L Bold.font 24
URW Palladio L Bold.font 48
URW Palladio L Bold.font 72
URW Palladio L Italic.font 8
URW Palladio L Italic.font 12
URW Palladio L Italic.font 16
URW Palladio L Italic.font 24
URW Palladio L Italic.font 48
URW Palladio L Italic.font 72
URW Palladio L Roman.font 8
URW Palladio L Roman.font 12
URW Palladio L Roman.font 16
URW Palladio L Roman.font 24
URW Palladio L Roman.font 48
URW Palladio L Roman.font 72
Verdana Bold Italic.font 8
Verdana Bold Italic.font 12
Verdana Bold Italic.font 16
Verdana Bold Italic.font 24
Verdana Bold Italic.font 48
Verdana Bold Italic.font 72
Verdana Bold.font 8
Verdana Bold.font 12
Verdana Bold.font 16
Verdana Bold.font 24
Verdana Bold.font 48
Verdana Bold.font 72
Verdana Italic.font 8
Verdana Italic.font 12
Verdana Italic.font 16
Verdana Italic.font 24
Verdana Italic.font 48
Verdana Italic.font 72
Verdana.font 8
Verdana.font 12
Verdana.font 16
Verdana.font 24
Verdana.font 48
Verdana.font 72
WeddingText.font 8
WeddingText.font 12
WeddingText.font 16
WeddingText.font 24
WeddingText.font 48
WeddingText.font 72
West Side.font 8
West Side.font 12
West Side.font 16
West Side.font 24
West Side.font 48
West Side.font 72
Zip.font 8
Zip.font 12
Zip.font 16
Zip.font 24
Zip.font 48
Zip.font 72



Am I doing something wrong, or is this a bug in AvailFonts?
chris
 
Posts: 548
Joined: Sat Jun 18, 2011 12:05 pm

Re: AvailFonts()

Postby xenic » Sat Jun 16, 2012 8:28 pm

Six weeks and 168 views later but no response. Makes you wonder if things like this will ever get fixed.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
 
Posts: 1020
Joined: Sun Jun 19, 2011 1:06 am

Re: AvailFonts()

Postby chris » Sun Jun 17, 2012 12:20 pm

xenic wrote:Six weeks and 168 views later but no response. Makes you wonder if things like this will ever get fixed.


FWIW I worked around the original problem, but it would be nice for one of the OS4 devs/beta-testers to at least acknowledge it as an issue.

I'm still waiting for a fix for the ContextMenus crash issue (Rigo appears to have encountered exactly the same problem in the thread, but still nobody admitted it was a bug).

I'd also still like an answer on how to create image menus, and whether there is a bug there, and clarification on which documentation is correct wrt using BOOPSI images.
chris
 
Posts: 548
Joined: Sat Jun 18, 2011 12:05 pm

Re: AvailFonts()

Postby xenic » Sun Jun 17, 2012 8:42 pm

@chris
Yes I've brought up some cases where either the AutoDocs should be changed or system fixes to make things work like the AutoDocs indicate. There's nothing more frustrating than following the docs/instructions and not having it work.

As far as your post about menu images, I doubt if the MagicMenu utility would have been necessary if menu images worked as documented. Most OS 3.9 users have MagicMenu installed and the code is even in a sourceforge repository.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
 
Posts: 1020
Joined: Sun Jun 19, 2011 1:06 am

Re: AvailFonts()

Postby chris » Mon Jun 18, 2012 6:36 pm

xenic wrote:@chris
As far as your post about menu images, I doubt if the MagicMenu utility would have been necessary if menu images worked as documented.


In which case somebody needs to look at the code, see why it isn't working as documented and fix it.

Nobody but the OS4 devs can do that. Is there an issue logged for somebody to look at it? No idea, if there is it wasn't mentioned in the thread. Most probably it'll be forgotten about and will continue to not work (same goes for the AvailFonts() prob in this thread).

I'd much rather somebody said "yes, that looks like it might be a problem, I don't have time to look at it but will raise a report on the bugtracker." if there isn't an immediately obvious problem. If it takes years to fix or look at, fine. But at least then I know it is logged and won't be forgotten. It frustrates me when issues are apparently ignored. How long does it take to copy'n'paste some sample code into a bug report (after confirming it doesn't produce the documented result, of course)?
chris
 
Posts: 548
Joined: Sat Jun 18, 2011 12:05 pm

Re: AvailFonts()

Postby salass00 » Thu Aug 03, 2017 12:28 pm

chris wrote:Am I doing something wrong, or is this a bug in AvailFonts?


It's the former. In your loop you access the AvailFonts structures by using an index on af but you also increment the pointer every iteration so you end up skipping every second font entry and eventually crashing because you've gone past all the AvailFonts structures.

I'm a bit annoyed with myself that I didn't notice this error sooner because this has had me spend all night yesterday hunting a bug in diskfont.library that didn't exist in the first place. Also I managed to somehow fuck up the fonts directory on my beta partition so it wouldn't boot any more (I had to boot from the Final Edition CD to fix it because my keyboard isn't usable in u-boot any more since I stupidly updated it with the latest version).

The only positive thing about all of this is that I now have a pretty good idea of how the AvailFonts() function works.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 477
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland

Re: AvailFonts()

Postby chris » Tue Aug 08, 2017 12:38 am

salass00 wrote:
chris wrote:Am I doing something wrong, or is this a bug in AvailFonts?


It's the former. In your loop you access the AvailFonts structures by using an index on af but you also increment the pointer every iteration so you end up skipping every second font entry and eventually crashing because you've gone past all the AvailFonts structures.

I'm a bit annoyed with myself that I didn't notice this error sooner because this has had me spend all night yesterday hunting a bug in diskfont.library that didn't exist in the first place.


Thank you for looking at this, I had forgotten that this thread even existed. You are absolutely right, of course, and I'm not sure how I missed that either. It appears that I have rewritten this code at some point since 2012 so the bug is no longer present.
chris
 
Posts: 548
Joined: Sat Jun 18, 2011 12:05 pm

Re: AvailFonts()

Postby gazelle » Fri Aug 11, 2017 8:02 pm

chris wrote:
salass00 wrote:It's the former. In your loop you access the AvailFonts structures by using an index on af but you also increment the pointer every iteration so you end up skipping every second font entry and eventually crashing because you've gone past all the AvailFonts structures.

Thank you for looking at this, I had forgotten that this thread even existed. You are absolutely right, of course, and I'm not sure how I missed that either. It appears that I have rewritten this code at some point since 2012 so the bug is no longer present.


I do remember: http://www.amigans.net/modules/xforum/viewtopic.php?post_id=74811#forumpost74811

edit: When I saw the reply from salass00 my thought was, hell I remember telling chis about the bug, then I saw the date of the original post ...
User avatar
gazelle
 
Posts: 101
Joined: Sun Mar 04, 2012 1:49 pm
Location: Frohnleiten, Austria


Return to General Developer Support

Who is online

Users browsing this forum: No registered users and 1 guest