Bug 85207 - PS module bloat due to inefficient static font tables. r=tor, sr=rbs, a=bsmedberg.

This commit is contained in:
kjh-5727%comcast.net 2005-06-30 22:48:49 +00:00
parent 80f1651b1e
commit 6f58df8261
14 changed files with 49 additions and 48 deletions

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation Courier_BoldAFM = {
const AFMFontInformation Courier_BoldAFM = {
2.000000,
"Courier-Bold",
"Courier Bold",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMCourier_BoldChars[] = {
const AFMscm AFMCourier_BoldChars[] = {
{
32,
600.000000,

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation Courier_BoldObliqueAFM = {
const AFMFontInformation Courier_BoldObliqueAFM = {
2.000000,
"Courier-BoldOblique",
"Courier Bold Oblique",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMCourier_BoldObliqueChars[] = {
const AFMscm AFMCourier_BoldObliqueChars[] = {
{
32,
600.000000,

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation Courier_ObliqueAFM = {
const AFMFontInformation Courier_ObliqueAFM = {
2.000000,
"Courier-Oblique",
"Courier Oblique",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMCourier_ObliqueChars[] = {
const AFMscm AFMCourier_ObliqueChars[] = {
{
32,
600.000000,

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation CourierAFM = {
const AFMFontInformation CourierAFM = {
2.000000,
"Courier",
"Courier",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMCourierChars[] = {
const AFMscm AFMCourierChars[] = {
{
32,
600.000000,

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation Helvetica_BoldAFM = {
const AFMFontInformation Helvetica_BoldAFM = {
2.000000,
"Helvetica-Bold",
"Helvetica Bold",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMHelvetica_BoldChars[] = {
const AFMscm AFMHelvetica_BoldChars[] = {
{
32,
278.000000,

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation Helvetica_BoldObliqueAFM = {
const AFMFontInformation Helvetica_BoldObliqueAFM = {
2.000000,
"Helvetica-BoldOblique",
"Helvetica Bold Oblique",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMHelvetica_BoldObliqueChars[] = {
const AFMscm AFMHelvetica_BoldObliqueChars[] = {
{
32,
278.000000,

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation Helvetica_ObliqueAFM = {
const AFMFontInformation Helvetica_ObliqueAFM = {
2.000000,
"Helvetica-Oblique",
"Helvetica Oblique",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMHelvetica_ObliqueChars[] = {
const AFMscm AFMHelvetica_ObliqueChars[] = {
{
32,
278.000000,

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation HelveticaAFM = {
const AFMFontInformation HelveticaAFM = {
2.000000,
"Helvetica",
"Helvetica",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMHelveticaChars[] = {
const AFMscm AFMHelveticaChars[] = {
{
32,
278.000000,

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation SymbolAFM = {
const AFMFontInformation SymbolAFM = {
2.000000,
"Symbol",
"Symbol",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMSymbolChars[] = {
const AFMscm AFMSymbolChars[] = {
{
32,
250.000000,

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation Times_BoldAFM = {
const AFMFontInformation Times_BoldAFM = {
2.000000,
"Times-Bold",
"Times Bold",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMTimes_BoldChars[] = {
const AFMscm AFMTimes_BoldChars[] = {
{
32,
250.000000,

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation Times_BoldItalicAFM = {
const AFMFontInformation Times_BoldItalicAFM = {
2.000000,
"Times-BoldItalic",
"Times Bold Italic",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMTimes_BoldItalicChars[] = {
const AFMscm AFMTimes_BoldItalicChars[] = {
{
32,
250.000000,

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation Times_ItalicAFM = {
const AFMFontInformation Times_ItalicAFM = {
2.000000,
"Times-Italic",
"Times Italic",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMTimes_ItalicChars[] = {
const AFMscm AFMTimes_ItalicChars[] = {
{
32,
250.000000,

View File

@ -40,7 +40,7 @@
#include "nsAFMObject.h"
AFMFontInformation Times_RomanAFM = {
const AFMFontInformation Times_RomanAFM = {
2.000000,
"Times-Roman",
"Times Roman",
@ -72,7 +72,7 @@ PR_FALSE,
AFMscm AFMTimes_RomanChars[] = {
const AFMscm AFMTimes_RomanChars[] = {
{
32,
250.000000,

View File

@ -164,19 +164,19 @@ struct AFM_Single_Char_Metrics
{
PRInt32 mCharacter_Code; // default charcode (-1 if not encoded)
double mW0x; // character width x in writing direction 0,
double mW0y; // character width y in writing direction 0
double mW1x; // character width x in writing direction 1
double mW1y; // character width y in writing direction 1
float mW0x; // character width x in writing direction 0,
float mW0y; // character width y in writing direction 0
float mW1x; // character width x in writing direction 1
float mW1y; // character width y in writing direction 1
//char *mName; // character name , not using currently
//double mVv_x; // local VVector x , not using currently
//double mVv_y; // local VVector y , not using currently
// character bounding box.
double mLlx;
double mLly;
double mUrx;
double mUry;
float mLlx;
float mLly;
float mUrx;
float mUry;
//double num_ligatures;
@ -195,10 +195,10 @@ struct fontInformation
const char *mFullName;
const char *mFamilyName;
const char *mWeight;
double mFontBBox_llx;
double mFontBBox_lly;
double mFontBBox_urx;
double mFontBBox_ury;
float mFontBBox_llx;
float mFontBBox_lly;
float mFontBBox_urx;
float mFontBBox_ury;
const char *mVersion;
char *mNotice; // DO NOT MAKE "const" (125341)
const char *mEncodingScheme;
@ -207,15 +207,15 @@ struct fontInformation
const char *mCharacterSet;
PRInt32 mCharacters;
PRBool mIsBaseFont;
double mVVector_0;
double mVVector_1;
float mVVector_0;
float mVVector_1;
PRBool mIsFixedV;
double mCapHeight;
double mXHeight;
double mAscender;
double mDescender;
double mUnderlinePosition;
double mUnderlineThickness;
float mCapHeight;
float mXHeight;
float mAscender;
float mDescender;
float mUnderlinePosition;
float mUnderlineThickness;
PRInt32 mNumCharacters;
AFMscm *mAFMCharMetrics;
@ -377,6 +377,7 @@ protected:
* @return -- the current floating point
*/
void GetAFMNumber (double *aFloat){GetToken();*aFloat = atof (mToken);}
void GetAFMNumber (float *aFloat){GetToken();*aFloat = atof (mToken);}
/** ---------------------------------------------------
* Get a boolean from the currently parsed file
@ -423,8 +424,8 @@ struct AFM_SubstituteFonts
const char* mFamily;
PRUint16 mWeight;
PRUint8 mStyle;
AFMFontInformation* mFontInfo;
AFMscm* mCharInfo;
const AFMFontInformation* mFontInfo;
const AFMscm* mCharInfo;
PRInt32 mIndex;
};