ftp.nice.ch/pub/next/developer/languages/c/gcc.2.7.2.2.I.b.tar.gz#/lib/gcc-lib/i386-next-nextstep3/2.7.2.2.f.2/include/appkit/Font.h

This is Font.h in view mode; [Download] [Up]

/*
	Font.h
	Application Kit, Release 2.1J
	Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
*/

#ifndef FONT_H
#define FONT_H

#import <objc/Object.h>
#import <objc/hashtable.h>
#import "afm.h"

#define NX_IDENTITYMATRIX ((float *) 0)
#define NX_FLIPPEDMATRIX  ((float *) -1)

/* 
 * Figure is also known as non-breaking space.
 * NX_EMSPACE, NX_ENSPACE and NX_THINSPACE have been removed as part of
 * the switch to the NextStep encoding.
 */

#define NX_FIGSPACE	((unsigned short)0x80)

typedef struct _NXFaceInfo {
    NXFontMetrics      *fontMetrics;	    /* Information from afm file */
    int                 flags;		    /* Which font info is present */
    struct _fontFlags {			    /* Keep track of font usage
					     * for Conforming PS comments */
	unsigned int        usedInDoc:1;    /* has font been used in doc? */
	unsigned int        usedInPage:1;   /* has font been used in page? */
	unsigned int        usedInSheet:1;  /* has font been used in sheet? */
	unsigned int        _PADDING:13;
    }                   fontFlags;
    struct _NXFaceInfo *nextFInfo;	    /* next faceInfo in the list */
} NXFaceInfo;

@interface Font : Object
{
    NXAtom              name;
    float               size;
    int                 style;
    float              *matrix;
    int                 fontNum;
    NXFaceInfo         *faceInfo;
    id                  otherFont;
    struct _fFlags {
#ifdef __BIG_ENDIAN__
      /* the following two instance variables are no longer part of the API */
	unsigned int        usedByWS:1;
	unsigned int        usedByPrinter:1;
	unsigned int        isScreenFont:1;
	unsigned int        _systemFontType:4;
	unsigned int        _RESERVED:6;
	unsigned int        _matrixIsIdentity:1;
	unsigned int        _matrixIsFlipped:1;
	unsigned int        _hasStyle:1;
#else
	unsigned int        _hasStyle:1;
	unsigned int        _matrixIsFlipped:1;
	unsigned int        _matrixIsIdentity:1;
	unsigned int        _RESERVED:6;
	unsigned int        _systemFontType:4;
	unsigned int        isScreenFont:1;
      /* the following two instance variables are no longer part of the API */
	unsigned int        usedByPrinter:1;
	unsigned int        usedByWS:1;
#endif
    }                   fFlags;
    unsigned short      _reservedFont2;
    unsigned int        _reservedFont3;
}

+ initialize;
+ allocFromZone:(NXZone *)zone;
+ newFont:(const char *)fontName size:(float)fontSize style:(int)fontStyle matrix:(const float *)fontMatrix;
+ newFont:(const char *)fontName size:(float)fontSize;
+ newFont:(const char *)fontName size:(float)fontSize matrix:(const float *)fontMatrix;
+ useFont:(const char *)fontName;

+ userFontOfSize:(float)fontSize matrix:(const float *)fontMatrix;
+ userFixedPitchFontOfSize:(float)fontSize matrix:(const float *)fontMatrix;
+ systemFontOfSize:(float)fontSize matrix:(const float *)fontMatrix;
+ boldSystemFontOfSize:(float)fontSize matrix:(const float *)fontMatrix;
+ setUserFont:(Font *)aFont;
+ setUserFixedPitchFont:(Font *)aFont;

- awake;
- free;
- (float)pointSize;
- (const char *)name;
- (const char *)familyName;
- (const char *)displayName;
- (int)fontNum;
- (int)style;
- setStyle:(int)aStyle;
- (const float *)matrix;
- (NXFontMetrics *)metrics;
- (NXFontMetrics *)readMetrics:(int)flags;
- (BOOL)hasMatrix;
- set;
- (float)getWidthOf:(const char *)string;
- screenFont;
- finishUnarchiving;
- write:(NXTypedStream *)stream;
- read:(NXTypedStream *)stream;

#ifdef KANJI
- (int)mappingScheme;
- (BOOL)isBaseFont;
- (char *)characterSet;
#endif

@end

#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.