diff --git a/Headers/gnustep/gui/GSFontInfo.h b/Headers/gnustep/gui/GSFontInfo.h index 298a8ca2d..c322831a8 100644 --- a/Headers/gnustep/gui/GSFontInfo.h +++ b/Headers/gnustep/gui/GSFontInfo.h @@ -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; diff --git a/Headers/gnustep/gui/NSFont.h b/Headers/gnustep/gui/NSFont.h index 4e94bfbd7..c36d82519 100644 --- a/Headers/gnustep/gui/NSFont.h +++ b/Headers/gnustep/gui/NSFont.h @@ -32,8 +32,8 @@ #include #include +#include -@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 @@ -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