From 46fbd47212aff35091df5d9554ba37ef975875ee Mon Sep 17 00:00:00 2001 From: "mcafee%netscape.com" Date: Fri, 25 Sep 1998 10:19:18 +0000 Subject: [PATCH] Moved N_FONTS, PS_BBox, PS_CharInfo, PS_FontInfo to include/xlate.h, added XP_ParseAFMFile() to xlate.h git-svn-id: svn://10.0.0.236/trunk@11026 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/include/xlate.h | 29 +++++++++++++++++++++++++---- mozilla/lib/xlate/xlate_i.h | 18 ------------------ 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/mozilla/include/xlate.h b/mozilla/include/xlate.h index 019a83e9ebe..f7f02ca4684 100644 --- a/mozilla/include/xlate.h +++ b/mozilla/include/xlate.h @@ -24,10 +24,28 @@ #ifndef XLATE_H #define XLATE_H +#define N_FONTS 8 + typedef void (*XL_CompletionRoutine)(PrintSetup*); typedef void* XL_TextTranslation; typedef void* XL_PostscriptTranslation; +typedef struct { + short llx, lly, urx, ury; +} PS_BBox; + +typedef struct { + short wx, wy; + PS_BBox charBBox; +} PS_CharInfo; + +typedef struct { + char *name; + PS_BBox fontBBox; + short upos, uthick; + PS_CharInfo chars[256]; +} PS_FontInfo; + XP_BEGIN_PROTOS extern void XL_InitializePrintSetup(PrintSetup *p); extern void XL_InitializeTextSetup(PrintSetup *p); @@ -43,6 +61,7 @@ extern void XP_InitializePrintInfo(MWContext *); extern void XP_CleanupPrintInfo(MWContext *); extern void XP_DrawForPrint(MWContext *, int ); extern void XP_LayoutForPrint(MWContext *cx, int32 doc_height); +extern void XP_ParseAFMFile(FILE *fp, PS_FontInfo** fi); XP_END_PROTOS typedef struct LineRecord_struct LineRecord; @@ -83,6 +102,7 @@ struct PrintSetup_ { float rules; /* Scale factor for rulers */ int n_up; /* cool page combining */ int bigger; /* Used to init sizes if sizesin NULL */ + int paper_size; /* Paper Size(letter,legal,exec,a4) */ char* prefix; /* For text xlate, prepended to each line */ char* eol; /* For text translation, line terminator */ @@ -95,11 +115,12 @@ struct PrintSetup_ { void* carg; /* Data saved for completion routine */ int status; /* Status of URL on completion */ - /* "other" font is typically East Asian */ - char *otherFontName; /* name of "other" PostScript font */ + /* "other" font is for encodings other than iso-8859-1 */ + char *otherFontName[N_FONTS]; + /* name of "other" PostScript font */ + PS_FontInfo *otherFontInfo[N_FONTS]; + /* font info parsed from "other" afm file */ int16 otherFontCharSetID; /* charset ID of "other" font */ - int otherFontWidth; /* width of "other" font (square) */ - int otherFontAscent; /* Ascent of "other" font (square) */ MWContext *cx; /* original context, if available */ }; diff --git a/mozilla/lib/xlate/xlate_i.h b/mozilla/lib/xlate/xlate_i.h index 8d495c8e004..32b743d345c 100644 --- a/mozilla/lib/xlate/xlate_i.h +++ b/mozilla/lib/xlate/xlate_i.h @@ -21,24 +21,6 @@ #include "xp.h" #include "xlate.h" -#define N_FONTS 8 - -typedef struct { - short llx, lly, urx, ury; -} PS_BBox; - -typedef struct { - short wx, wy; - PS_BBox charBBox; -} PS_CharInfo; - -typedef struct { - char *name; - PS_BBox fontBBox; - short upos, uthick; - PS_CharInfo chars[256]; -} PS_FontInfo; - #define MAKE_FE_FUNCS_PREFIX(f) TXFE_##f #define MAKE_FE_FUNCS_EXTERN #include "mk_cx_fn.h"