mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8481 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
18e118704c
commit
b6038bc341
2 changed files with 58 additions and 50 deletions
|
@ -362,7 +362,7 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
|||
return fontDictionary;
|
||||
}
|
||||
|
||||
- (NSString *)afmFileContents
|
||||
- (NSString *) afmFileContents
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
@ -460,7 +460,7 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
|||
|
||||
- (NSSize) advancementForGlyph: (NSGlyph)aGlyph
|
||||
{
|
||||
return NSMakeSize(0,0);
|
||||
return NSMakeSize (0,0);
|
||||
}
|
||||
|
||||
- (NSRect) boundingRectForGlyph: (NSGlyph)aGlyph
|
||||
|
@ -473,7 +473,7 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
|||
return NO;
|
||||
}
|
||||
|
||||
- (NSMultibyteGlyphPacking)glyphPacking
|
||||
- (NSMultibyteGlyphPacking) glyphPacking
|
||||
{
|
||||
return NSOneByteGlyphPacking;
|
||||
}
|
||||
|
@ -485,7 +485,7 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
|||
|
||||
- (NSPoint) positionOfGlyph: (NSGlyph)curGlyph
|
||||
precededByGlyph: (NSGlyph)prevGlyph
|
||||
isNominal: (BOOL*)nominal
|
||||
isNominal: (BOOL *)nominal
|
||||
{
|
||||
NSSize advance;
|
||||
|
||||
|
@ -501,19 +501,19 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
|||
// Should check kerning
|
||||
advance = [self advancementForGlyph: prevGlyph];
|
||||
|
||||
return NSMakePoint(advance.width, advance.height);
|
||||
return NSMakePoint (advance.width, advance.height);
|
||||
}
|
||||
|
||||
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
|
||||
forCharacter:(unichar)aChar
|
||||
struckOverRect:(NSRect)aRect
|
||||
- (NSPoint) positionOfGlyph: (NSGlyph)aGlyph
|
||||
forCharacter: (unichar)aChar
|
||||
struckOverRect: (NSRect)aRect
|
||||
{
|
||||
return NSZeroPoint;
|
||||
}
|
||||
|
||||
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
|
||||
struckOverGlyph:(NSGlyph)baseGlyph
|
||||
metricsExist:(BOOL *)flag
|
||||
- (NSPoint) positionOfGlyph: (NSGlyph)aGlyph
|
||||
struckOverGlyph: (NSGlyph)baseGlyph
|
||||
metricsExist: (BOOL *)flag
|
||||
{
|
||||
if (flag)
|
||||
*flag = NO;
|
||||
|
@ -521,9 +521,9 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
|||
return NSZeroPoint;
|
||||
}
|
||||
|
||||
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
|
||||
struckOverRect:(NSRect)aRect
|
||||
metricsExist:(BOOL *)flag
|
||||
- (NSPoint) positionOfGlyph: (NSGlyph)aGlyph
|
||||
struckOverRect: (NSRect)aRect
|
||||
metricsExist: (BOOL *)flag
|
||||
{
|
||||
if (flag)
|
||||
*flag = NO;
|
||||
|
@ -531,11 +531,11 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
|||
return NSZeroPoint;
|
||||
}
|
||||
|
||||
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
|
||||
withRelation:(NSGlyphRelation)relation
|
||||
toBaseGlyph:(NSGlyph)baseGlyph
|
||||
totalAdvancement:(NSSize *)offset
|
||||
metricsExist:(BOOL *)flag
|
||||
- (NSPoint) positionOfGlyph: (NSGlyph)aGlyph
|
||||
withRelation: (NSGlyphRelation)relation
|
||||
toBaseGlyph: (NSGlyph)baseGlyph
|
||||
totalAdvancement: (NSSize *)offset
|
||||
metricsExist: (BOOL *)flag
|
||||
{
|
||||
NSRect baseRect = [self boundingRectForGlyph: baseGlyph];
|
||||
NSPoint point = NSZeroPoint;
|
||||
|
@ -549,7 +549,7 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
point = NSMakePoint(baseRect.origin.x, NSMaxY(baseRect));
|
||||
point = NSMakePoint (baseRect.origin.x, NSMaxY (baseRect));
|
||||
}
|
||||
|
||||
if (offset)
|
||||
|
@ -566,7 +566,7 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
|||
return point;
|
||||
}
|
||||
|
||||
- (NSStringEncoding)mostCompatibleStringEncoding
|
||||
- (NSStringEncoding) mostCompatibleStringEncoding
|
||||
{
|
||||
return mostCompatibleStringEncoding;
|
||||
}
|
||||
|
|
|
@ -377,6 +377,14 @@ setNSFont(NSString* key, NSFont* font)
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
/* FIXME - appropriate description */
|
||||
/*
|
||||
- (NSString *) description
|
||||
{
|
||||
return [self fontName];
|
||||
}
|
||||
*/
|
||||
|
||||
- (BOOL) isEqual: (id)anObject
|
||||
{
|
||||
int i;
|
||||
|
@ -473,7 +481,7 @@ setNSFont(NSString* key, NSFont* font)
|
|||
return [fontInfo widthOfString: string];
|
||||
}
|
||||
|
||||
/* The following methods have to implemented by backends*/
|
||||
/* The following methods have to be implemented by backends */
|
||||
|
||||
//
|
||||
// Manipulating Glyphs
|
||||
|
@ -490,17 +498,17 @@ setNSFont(NSString* key, NSFont* font)
|
|||
|
||||
- (BOOL) glyphIsEncoded: (NSGlyph)aGlyph
|
||||
{
|
||||
return [fontInfo glyphIsEncoded: aGlyph ];
|
||||
return [fontInfo glyphIsEncoded: aGlyph];
|
||||
}
|
||||
|
||||
- (NSMultibyteGlyphPacking)glyphPacking
|
||||
- (NSMultibyteGlyphPacking) glyphPacking
|
||||
{
|
||||
return [fontInfo glyphPacking];
|
||||
}
|
||||
|
||||
- (NSGlyph) glyphWithName: (NSString*)glyphName
|
||||
{
|
||||
return [fontInfo glyphWithName: glyphName ];
|
||||
return [fontInfo glyphWithName: glyphName];
|
||||
}
|
||||
|
||||
- (NSPoint) positionOfGlyph: (NSGlyph)curGlyph
|
||||
|
@ -511,49 +519,49 @@ setNSFont(NSString* key, NSFont* font)
|
|||
isNominal: nominal];
|
||||
}
|
||||
|
||||
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
|
||||
forCharacter:(unichar)aChar
|
||||
struckOverRect:(NSRect)aRect
|
||||
- (NSPoint) positionOfGlyph:(NSGlyph)aGlyph
|
||||
forCharacter:(unichar)aChar
|
||||
struckOverRect:(NSRect)aRect
|
||||
{
|
||||
return [fontInfo positionOfGlyph: aGlyph
|
||||
forCharacter: aChar
|
||||
struckOverRect: aRect];
|
||||
}
|
||||
|
||||
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
|
||||
struckOverGlyph:(NSGlyph)baseGlyph
|
||||
metricsExist:(BOOL *)flag
|
||||
- (NSPoint) positionOfGlyph:(NSGlyph)aGlyph
|
||||
struckOverGlyph:(NSGlyph)baseGlyph
|
||||
metricsExist:(BOOL *)flag
|
||||
{
|
||||
return [fontInfo positionOfGlyph: aGlyph
|
||||
struckOverGlyph: baseGlyph
|
||||
metricsExist: flag];
|
||||
}
|
||||
|
||||
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
|
||||
struckOverRect:(NSRect)aRect
|
||||
metricsExist:(BOOL *)flag
|
||||
- (NSPoint) positionOfGlyph:(NSGlyph)aGlyph
|
||||
struckOverRect:(NSRect)aRect
|
||||
metricsExist:(BOOL *)flag
|
||||
{
|
||||
return [fontInfo positionOfGlyph: aGlyph
|
||||
struckOverRect: aRect
|
||||
metricsExist: flag];
|
||||
}
|
||||
|
||||
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
|
||||
withRelation:(NSGlyphRelation)relation
|
||||
toBaseGlyph:(NSGlyph)baseGlyph
|
||||
totalAdvancement:(NSSize *)offset
|
||||
metricsExist:(BOOL *)flag
|
||||
- (NSPoint) positionOfGlyph:(NSGlyph)aGlyph
|
||||
withRelation:(NSGlyphRelation)relation
|
||||
toBaseGlyph:(NSGlyph)baseGlyph
|
||||
totalAdvancement:(NSSize *)offset
|
||||
metricsExist:(BOOL *)flag
|
||||
{
|
||||
return [fontInfo positionOfGlyph: aGlyph
|
||||
withRelation: relation
|
||||
toBaseGlyph: baseGlyph
|
||||
totalAdvancement: offset
|
||||
metricsExist: flag];
|
||||
withRelation: relation
|
||||
toBaseGlyph: baseGlyph
|
||||
totalAdvancement: offset
|
||||
metricsExist: flag];
|
||||
}
|
||||
|
||||
- (int)positionsForCompositeSequence:(NSGlyph *)glyphs
|
||||
numberOfGlyphs:(int)numGlyphs
|
||||
pointArray:(NSPoint *)points
|
||||
- (int) positionsForCompositeSequence: (NSGlyph *)glyphs
|
||||
numberOfGlyphs: (int)numGlyphs
|
||||
pointArray: (NSPoint *)points
|
||||
{
|
||||
int i;
|
||||
NSGlyph base = glyphs[0];
|
||||
|
@ -575,7 +583,7 @@ setNSFont(NSString* key, NSFont* font)
|
|||
return i;
|
||||
}
|
||||
|
||||
- (NSStringEncoding)mostCompatibleStringEncoding
|
||||
- (NSStringEncoding) mostCompatibleStringEncoding
|
||||
{
|
||||
return [fontInfo mostCompatibleStringEncoding];
|
||||
}
|
||||
|
@ -591,7 +599,7 @@ setNSFont(NSString* key, NSFont* font)
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[aCoder encodeObject: fontName];
|
||||
[aCoder encodeArrayOfObjCType: @encode(float) count: 6 at: matrix];
|
||||
[aCoder encodeArrayOfObjCType: @encode(float) count: 6 at: matrix];
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
|
@ -600,8 +608,8 @@ setNSFont(NSString* key, NSFont* font)
|
|||
float fontMatrix[6];
|
||||
|
||||
name = [aDecoder decodeObject];
|
||||
[aDecoder decodeArrayOfObjCType: @encode(float) count: 6 at: fontMatrix];
|
||||
return [self initWithName: name matrix: fontMatrix];
|
||||
[aDecoder decodeArrayOfObjCType: @encode(float) count: 6 at: fontMatrix];
|
||||
return [self initWithName: name matrix: fontMatrix];
|
||||
}
|
||||
|
||||
@end /* NSFont */
|
||||
|
|
Loading…
Reference in a new issue