Added glyph layout methods

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6659 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2000-06-11 00:30:59 +00:00
parent 67054d7ace
commit 677a7211fa
2 changed files with 61 additions and 3 deletions

View file

@ -97,17 +97,34 @@
- (float)underlinePosition;
- (float)underlineThickness;
- (float)xHeight;
- (float)widthOfString:(NSString *)string;
- (float) widthOfString: (NSString*)string;
- (float *)widths;
- (float)defaultLineHeightForFont;
- (NSSize) advancementForGlyph: (NSGlyph)aGlyph;
- (NSRect) boundingRectForGlyph: (NSGlyph)aGlyph;
- (BOOL) glyphIsEncoded: (NSGlyph)aGlyph;
- (NSMultibyteGlyphPacking)glyphPacking;
- (NSGlyph) glyphWithName: (NSString*)glyphName;
- (NSPoint) positionOfGlyph: (NSGlyph)curGlyph
precededByGlyph: (NSGlyph)prevGlyph
isNominal: (BOOL*)nominal;
- (float) widthOfString: (NSString*)string;
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
forCharacter:(unichar)aChar
struckOverRect:(NSRect)aRect;
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
struckOverGlyph:(NSGlyph)baseGlyph
metricsExist:(BOOL *)flag;
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
struckOverRect:(NSRect)aRect
metricsExist:(BOOL *)flag;
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
withRelation:(NSGlyphRelation)relation
toBaseGlyph:(NSGlyph)baseGlyph
totalAdvancement:(NSSize *)offset
metricsExist:(BOOL *)flag;
- (NSStringEncoding)mostCompatibleStringEncoding;
- (NSFontTraitMask) traits;
- (int) weight;

View file

@ -32,8 +32,8 @@
#include <Foundation/NSCoder.h>
#include <Foundation/NSGeometry.h>
#include <Foundation/NSString.h>
@class NSString;
@class NSDictionary;
typedef unsigned int NSGlyph;
@ -43,6 +43,20 @@ enum {
NSNullGlyph = 0x0
};
typedef enum _NSGlyphRelation {
NSGlyphBelow,
NSGlyphAbove,
} NSGlyphRelation;
typedef enum _NSMultibyteGlyphPacking {
NSOneByteGlyphPacking,
NSJapaneseEUCGlyphPacking,
NSAsciiWithDoubleByteEUCGlyphPacking,
NSTwoByteGlyphPacking,
NSFourByteGlyphPacking
} NSMultibyteGlyphPacking;
extern const float *NSFontIdentityMatrix;
@interface NSFont : NSObject <NSCoding, NSCopying>
@ -73,6 +87,12 @@ extern const float *NSFontIdentityMatrix;
+ (NSFont *)toolTipsFontOfSize:(float)fontSize;
+ (NSFont *)controlContentFontOfSize:(float)fontSize;
//
// Preferred Fonts
//
+ (NSArray *)preferredFontNames;
+ (void)setPreferredFontNames:(NSArray *)fontNames;
//
// Setting the Font
//
@ -108,6 +128,7 @@ extern const float *NSFontIdentityMatrix;
- (float)xHeight;
- (float)widthOfString:(NSString *)string;
- (float *)widths;
- (float)defaultLineHeightForFont;
//
// Manipulating Glyphs
@ -115,10 +136,30 @@ extern const float *NSFontIdentityMatrix;
- (NSSize)advancementForGlyph:(NSGlyph)aGlyph;
- (NSRect)boundingRectForGlyph:(NSGlyph)aGlyph;
- (BOOL)glyphIsEncoded:(NSGlyph)aGlyph;
- (NSMultibyteGlyphPacking)glyphPacking;
- (NSGlyph)glyphWithName:(NSString*)glyphName;
- (NSPoint)positionOfGlyph:(NSGlyph)curGlyph
precededByGlyph:(NSGlyph)prevGlyph
isNominal:(BOOL *)nominal;
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
forCharacter:(unichar)aChar
struckOverRect:(NSRect)aRect;
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
struckOverGlyph:(NSGlyph)baseGlyph
metricsExist:(BOOL *)flag;
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
struckOverRect:(NSRect)aRect
metricsExist:(BOOL *)flag;
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
withRelation:(NSGlyphRelation)relation
toBaseGlyph:(NSGlyph)baseGlyph
totalAdvancement:(NSSize *)offset
metricsExist:(BOOL *)flag;
- (int)positionsForCompositeSequence:(NSGlyph *)glyphs
numberOfGlyphs:(int)numGlyphs
pointArray:(NSPoint *)points;
- (NSStringEncoding)mostCompatibleStringEncoding;
//
// NSCoding protocol