This is FontConverter.h in view mode; [Download] [Up]
/***********************************************************************
Converter class for Convert FONT which converts Mac fonts to NeXT fonts.
Copyright (C) 1993 David John Burrowes
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
The author, David John Burrowes, can be reached at:
davidjohn@kira.net.netcom.com
David John Burrowes
1926 Ivy #10
San Mateo, CA 94403-1367
***********************************************************************/
/*
====================================================================
This is the interface file for the FontConverter class. Full documentation for this class can be found in the FontConverter.rtf file (someday). I will not duplicate all that fine information here.
The quick summary: This just reads the binary file that contains a Macintosh Font definitino (bitmap, not that new-fangled TrueType stuff) and writes it out at a Type 3 PS font....
This is $Revision: 1.2 $ of this file
It was last modified by $Author: death $ on $Date: 93/04/04 23:42:46 $
Note that this file was created while using the New Century Schoolbook Roman typeface. You may find that some things line up strangely if you don't use that family.
*$Log: FontConverter.h,v $
* Revision 1.2 93/04/04 23:42:46 death
* Sun Apr 4 23:42:46 PDT 1993
*
* Revision 1.1 93/01/10 15:01:47 death
* Sun Jan 10 15:01:47 PST 1993
*
*
*====================================================================
*/
//
// Import our parent class' definition
//
#import "AbstractConverter.h"
#import "common.h"
#import "MacTypes.h"
//////
// Define the Font record.
//////
typedef struct {
INTEGER fontType; /*font type*/
INTEGER firstChar; /*ASCII code of first character*/
INTEGER lastChar; /*ASCII code of last character*/
INTEGER widMax; /*maximum character width*/
INTEGER kernMax; /*negative of maximum character kern*/
INTEGER nDescent; /*negative of descent*/
INTEGER fRectWidth; /*width of font rectangle*/
INTEGER fRectHeight; /*height of font rectangle*/
INTEGER owTLoc; /*offset to offset/width table*/
INTEGER ascent; /*ascent*/
INTEGER descent; /*descent*/
INTEGER leading; /*leading*/
INTEGER rowWords; /*row width of bit image / 2 */
Byte ImageAndTables;
} FontRec, *FontRecPtr;
typedef struct {
CHAR offset, width;
} OWEntry;
#define propFont 0x9000
#define fixedFont 0xB000
@interface FontConverter:AbstractConverter
{
CString EncodingVector[256];
CString NSEncodingVector[256];
CString StoredName;
Boolean UseNSEncoding;
Integer MacToNeXTLookup[256];
}
- init;
- free;
- (Boolean) isThisAGoodFile: theFile;
- SetNSEncodingUse: (Boolean) NSEncodingFlag;
- (ByteString) Copy: (PositiveInteger) sourceSize
BitsAtOffset: (PositiveInteger) offset
From: (ByteString) source
Into: (ByteString) dest;
- ConvertMacFONT: SourceFile ToType3Font: DestFile AndAFM: afmFile;
- (FontRecPtr) GetFontRecordWithLength: (PositiveInteger) fontLength From: SourceFile;
-SetFullNameTo: (ConstCString) filename;
@end;
#define ERR_BADSOURCESIZE 201
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.