Add stubs for more font info.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24443 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-01-31 14:36:42 +00:00
parent eb5e01cf4f
commit 5dcabf4505
4 changed files with 68 additions and 53 deletions

View file

@ -1,3 +1,10 @@
2007-01-31 Richard Frith-Macdoanld <rfm@gnu.org>
* Source/GSFontInfo.m:
* Source/NSFont.m:
* Headers/Additions/GNUstepGUI/GSFontInfo.h:
Add stubs for numberOfGlyphs and coveredCharacterSet
2007-01-30 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSCell.m (-_setupTextWithFrame:inView:editor:delegate:range:,

View file

@ -79,70 +79,68 @@ values. Backends may override these. */
BOOL isBaseFont;
int weight;
NSFontTraitMask traits;
unsigned numberOfGlyphs;
NSCharacterSet *coveredCharacterSet;
}
+ (void) setDefaultClass: (Class)defaultClass;
+ (GSFontInfo*) fontInfoForFontName: (NSString*)fontName
matrix: (const float *)fmatrix
screenFont: (BOOL)screenFont;
+ (int) weightForString: (NSString *)weightString;
+ (void) setDefaultClass: (Class)defaultClass;
+ (NSString *) stringForWeight: (int)weight;
- (NSDictionary *)afmDictionary;
- (NSString *)afmFileContents;
- (NSRect)boundingRectForFont;
- (NSString *)displayName;
- (NSString *)familyName;
- (NSString *)fontName;
- (NSString *)encodingScheme;
- (const float*) matrix;
- (BOOL)isFixedPitch;
- (BOOL)isBaseFont;
- (float)ascender;
- (float)descender;
- (float)capHeight;
- (float)italicAngle;
- (NSSize)maximumAdvancement;
- (NSSize)minimumAdvancement;
- (float)underlinePosition;
- (float)underlineThickness;
- (float)xHeight;
- (float) widthOfString: (NSString*)string;
- (float)defaultLineHeightForFont;
+ (int) weightForString: (NSString *)weightString;
- (NSSize) advancementForGlyph: (NSGlyph)aGlyph;
- (NSDictionary *) afmDictionary;
- (NSString *) afmFileContents;
- (void) appendBezierPathWithGlyphs: (NSGlyph *)glyphs
count: (int)count
toBezierPath: (NSBezierPath *)path;
- (float) ascender;
- (NSRect) boundingRectForGlyph: (NSGlyph)aGlyph;
- (NSRect) boundingRectForFont;
- (float) capHeight;
- (NSCharacterSet*) coveredCharacterSet;
- (float) defaultLineHeightForFont;
- (float) descender;
- (NSString *) displayName;
- (NSString *) encodingScheme;
- (NSString *) familyName;
- (NSString *) fontName;
- (BOOL) glyphIsEncoded: (NSGlyph)aGlyph;
- (NSMultibyteGlyphPacking)glyphPacking;
- (NSMultibyteGlyphPacking) glyphPacking;
- (NSGlyph) glyphWithName: (NSString*)glyphName;
- (BOOL) isFixedPitch;
- (BOOL) isBaseFont;
- (float) italicAngle;
- (const float*) matrix;
- (NSSize) maximumAdvancement;
- (NSSize) minimumAdvancement;
- (NSStringEncoding) mostCompatibleStringEncoding;
- (unsigned) numberOfGlyphs;
- (NSPoint) positionOfGlyph: (NSGlyph)aGlyph
forCharacter: (unichar)aChar
struckOverRect: (NSRect)aRect;
- (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;
- (NSStringEncoding)mostCompatibleStringEncoding;
- (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;
- (NSFontTraitMask) traits;
- (float) underlinePosition;
- (float) underlineThickness;
- (int) weight;
-(void) appendBezierPathWithGlyphs: (NSGlyph *)glyphs
count: (int)count
toBezierPath: (NSBezierPath *)path;
- (float) widthOfString: (NSString*)string;
- (float) xHeight;
@end

View file

@ -22,7 +22,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
*/
#include <math.h>
@ -221,6 +222,7 @@ static GSFontEnumerator *sharedEnumerator = nil;
- (void) dealloc
{
RELEASE(coveredCharacterSet);
RELEASE(fontDictionary);
RELEASE(fontName);
RELEASE(familyName);
@ -332,6 +334,11 @@ static GSFontEnumerator *sharedEnumerator = nil;
return nil;
}
- (NSCharacterSet*) coveredCharacterSet
{
return coveredCharacterSet;
}
- (NSString*) encodingScheme
{
return encodingScheme;
@ -357,6 +364,11 @@ static GSFontEnumerator *sharedEnumerator = nil;
return matrix;
}
- (unsigned) numberOfGlyphs
{
return numberOfGlyphs;
}
- (float) pointSize
{
return matrix[0];

View file

@ -1005,14 +1005,12 @@ static BOOL flip_hack;
- (unsigned) numberOfGlyphs
{
// FIXME
return 0;
return [fontInfo numberOfGlyphs];
}
- (NSCharacterSet*) coveredCharacterSet
{
// FIXME
return nil;
return [fontInfo coveredCharacterSet];
}
- (NSFontDescriptor*) fontDescriptor