/* GetCurUsage() * ====================================================================== * Get the current Speedo Data Cache Usage. */ long GetCurUsage( void ) { FON_PTR curptr; int i; long Used; int icount; /* Get the Fixed amount - always have this...*/ Used = FONTP_ACTUAL; /* Get the per font allocation */ icount = CountFonts( installed_list, SPD_FONT ); Used += (long)icount * ( FSMHEADER + ARB_PTSBLK ); /* Get the per pointsize per font allocation. */ curptr = installed_list; while( curptr ) { if( FTYPE( curptr ) == SPD_FONT ) { for( i=0; i < MAX_POINTS; i++ ) { if( POINTS( curptr )[i] ) { if( Current.Width ) Used += WIDTH_TABLE_DATA; Used += THE_PTSBLK; } else break; } } curptr = FNEXT( curptr ); } Used += ( GetFontMin() + GetCharMin() ); /* Make sure we ALWAYS have at least 10K */ if( Used < 10240L ) Used = 10240L; Used /= 1024L; return( Used ); }
uint32_t CPDF_InterForm::CountFormFonts() { return CountFonts(m_pFormDict); }