mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 16:21:56 +00:00
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:
parent
f652b57a5d
commit
622fb0bdf7
2 changed files with 61 additions and 3 deletions
|
@ -97,17 +97,34 @@
|
||||||
- (float)underlinePosition;
|
- (float)underlinePosition;
|
||||||
- (float)underlineThickness;
|
- (float)underlineThickness;
|
||||||
- (float)xHeight;
|
- (float)xHeight;
|
||||||
- (float)widthOfString:(NSString *)string;
|
- (float) widthOfString: (NSString*)string;
|
||||||
- (float *)widths;
|
- (float *)widths;
|
||||||
|
- (float)defaultLineHeightForFont;
|
||||||
|
|
||||||
- (NSSize) advancementForGlyph: (NSGlyph)aGlyph;
|
- (NSSize) advancementForGlyph: (NSGlyph)aGlyph;
|
||||||
- (NSRect) boundingRectForGlyph: (NSGlyph)aGlyph;
|
- (NSRect) boundingRectForGlyph: (NSGlyph)aGlyph;
|
||||||
- (BOOL) glyphIsEncoded: (NSGlyph)aGlyph;
|
- (BOOL) glyphIsEncoded: (NSGlyph)aGlyph;
|
||||||
|
- (NSMultibyteGlyphPacking)glyphPacking;
|
||||||
- (NSGlyph) glyphWithName: (NSString*)glyphName;
|
- (NSGlyph) glyphWithName: (NSString*)glyphName;
|
||||||
- (NSPoint) positionOfGlyph: (NSGlyph)curGlyph
|
- (NSPoint) positionOfGlyph: (NSGlyph)curGlyph
|
||||||
precededByGlyph: (NSGlyph)prevGlyph
|
precededByGlyph: (NSGlyph)prevGlyph
|
||||||
isNominal: (BOOL*)nominal;
|
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;
|
- (NSFontTraitMask) traits;
|
||||||
- (int) weight;
|
- (int) weight;
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
|
|
||||||
#include <Foundation/NSCoder.h>
|
#include <Foundation/NSCoder.h>
|
||||||
#include <Foundation/NSGeometry.h>
|
#include <Foundation/NSGeometry.h>
|
||||||
|
#include <Foundation/NSString.h>
|
||||||
|
|
||||||
@class NSString;
|
|
||||||
@class NSDictionary;
|
@class NSDictionary;
|
||||||
|
|
||||||
typedef unsigned int NSGlyph;
|
typedef unsigned int NSGlyph;
|
||||||
|
@ -43,6 +43,20 @@ enum {
|
||||||
NSNullGlyph = 0x0
|
NSNullGlyph = 0x0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
typedef enum _NSGlyphRelation {
|
||||||
|
NSGlyphBelow,
|
||||||
|
NSGlyphAbove,
|
||||||
|
} NSGlyphRelation;
|
||||||
|
|
||||||
|
typedef enum _NSMultibyteGlyphPacking {
|
||||||
|
NSOneByteGlyphPacking,
|
||||||
|
NSJapaneseEUCGlyphPacking,
|
||||||
|
NSAsciiWithDoubleByteEUCGlyphPacking,
|
||||||
|
NSTwoByteGlyphPacking,
|
||||||
|
NSFourByteGlyphPacking
|
||||||
|
} NSMultibyteGlyphPacking;
|
||||||
|
|
||||||
extern const float *NSFontIdentityMatrix;
|
extern const float *NSFontIdentityMatrix;
|
||||||
|
|
||||||
@interface NSFont : NSObject <NSCoding, NSCopying>
|
@interface NSFont : NSObject <NSCoding, NSCopying>
|
||||||
|
@ -73,6 +87,12 @@ extern const float *NSFontIdentityMatrix;
|
||||||
+ (NSFont *)toolTipsFontOfSize:(float)fontSize;
|
+ (NSFont *)toolTipsFontOfSize:(float)fontSize;
|
||||||
+ (NSFont *)controlContentFontOfSize:(float)fontSize;
|
+ (NSFont *)controlContentFontOfSize:(float)fontSize;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Preferred Fonts
|
||||||
|
//
|
||||||
|
+ (NSArray *)preferredFontNames;
|
||||||
|
+ (void)setPreferredFontNames:(NSArray *)fontNames;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setting the Font
|
// Setting the Font
|
||||||
//
|
//
|
||||||
|
@ -108,6 +128,7 @@ extern const float *NSFontIdentityMatrix;
|
||||||
- (float)xHeight;
|
- (float)xHeight;
|
||||||
- (float)widthOfString:(NSString *)string;
|
- (float)widthOfString:(NSString *)string;
|
||||||
- (float *)widths;
|
- (float *)widths;
|
||||||
|
- (float)defaultLineHeightForFont;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Manipulating Glyphs
|
// Manipulating Glyphs
|
||||||
|
@ -115,10 +136,30 @@ extern const float *NSFontIdentityMatrix;
|
||||||
- (NSSize)advancementForGlyph:(NSGlyph)aGlyph;
|
- (NSSize)advancementForGlyph:(NSGlyph)aGlyph;
|
||||||
- (NSRect)boundingRectForGlyph:(NSGlyph)aGlyph;
|
- (NSRect)boundingRectForGlyph:(NSGlyph)aGlyph;
|
||||||
- (BOOL)glyphIsEncoded:(NSGlyph)aGlyph;
|
- (BOOL)glyphIsEncoded:(NSGlyph)aGlyph;
|
||||||
|
- (NSMultibyteGlyphPacking)glyphPacking;
|
||||||
- (NSGlyph)glyphWithName:(NSString*)glyphName;
|
- (NSGlyph)glyphWithName:(NSString*)glyphName;
|
||||||
- (NSPoint)positionOfGlyph:(NSGlyph)curGlyph
|
- (NSPoint)positionOfGlyph:(NSGlyph)curGlyph
|
||||||
precededByGlyph:(NSGlyph)prevGlyph
|
precededByGlyph:(NSGlyph)prevGlyph
|
||||||
isNominal:(BOOL *)nominal;
|
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
|
// NSCoding protocol
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue