mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 15:11:54 +00:00
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:
parent
cb8c948505
commit
18105d809c
4 changed files with 68 additions and 53 deletions
|
@ -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>
|
2007-01-30 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSCell.m (-_setupTextWithFrame:inView:editor:delegate:range:,
|
* Source/NSCell.m (-_setupTextWithFrame:inView:editor:delegate:range:,
|
||||||
|
|
|
@ -79,70 +79,68 @@ values. Backends may override these. */
|
||||||
BOOL isBaseFont;
|
BOOL isBaseFont;
|
||||||
int weight;
|
int weight;
|
||||||
NSFontTraitMask traits;
|
NSFontTraitMask traits;
|
||||||
|
unsigned numberOfGlyphs;
|
||||||
|
NSCharacterSet *coveredCharacterSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void) setDefaultClass: (Class)defaultClass;
|
|
||||||
+ (GSFontInfo*) fontInfoForFontName: (NSString*)fontName
|
+ (GSFontInfo*) fontInfoForFontName: (NSString*)fontName
|
||||||
matrix: (const float *)fmatrix
|
matrix: (const float *)fmatrix
|
||||||
screenFont: (BOOL)screenFont;
|
screenFont: (BOOL)screenFont;
|
||||||
|
+ (void) setDefaultClass: (Class)defaultClass;
|
||||||
+ (int) weightForString: (NSString *)weightString;
|
|
||||||
+ (NSString *) stringForWeight: (int)weight;
|
+ (NSString *) stringForWeight: (int)weight;
|
||||||
|
+ (int) weightForString: (NSString *)weightString;
|
||||||
- (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;
|
|
||||||
|
|
||||||
- (NSSize) advancementForGlyph: (NSGlyph)aGlyph;
|
- (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) 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;
|
- (BOOL) glyphIsEncoded: (NSGlyph)aGlyph;
|
||||||
- (NSMultibyteGlyphPacking)glyphPacking;
|
- (NSMultibyteGlyphPacking) glyphPacking;
|
||||||
- (NSGlyph) glyphWithName: (NSString*)glyphName;
|
- (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
|
- (NSPoint) positionOfGlyph: (NSGlyph)curGlyph
|
||||||
precededByGlyph: (NSGlyph)prevGlyph
|
precededByGlyph: (NSGlyph)prevGlyph
|
||||||
isNominal: (BOOL*)nominal;
|
isNominal: (BOOL*)nominal;
|
||||||
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
|
- (NSPoint) positionOfGlyph: (NSGlyph)aGlyph
|
||||||
forCharacter:(unichar)aChar
|
struckOverGlyph: (NSGlyph)baseGlyph
|
||||||
struckOverRect:(NSRect)aRect;
|
metricsExist: (BOOL *)flag;
|
||||||
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
|
- (NSPoint) positionOfGlyph: (NSGlyph)aGlyph
|
||||||
struckOverGlyph:(NSGlyph)baseGlyph
|
struckOverRect: (NSRect)aRect
|
||||||
metricsExist:(BOOL *)flag;
|
metricsExist: (BOOL *)flag;
|
||||||
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
|
- (NSPoint) positionOfGlyph: (NSGlyph)aGlyph
|
||||||
struckOverRect:(NSRect)aRect
|
withRelation: (NSGlyphRelation)relation
|
||||||
metricsExist:(BOOL *)flag;
|
toBaseGlyph: (NSGlyph)baseGlyph
|
||||||
- (NSPoint)positionOfGlyph:(NSGlyph)aGlyph
|
totalAdvancement: (NSSize *)offset
|
||||||
withRelation:(NSGlyphRelation)relation
|
metricsExist: (BOOL *)flag;
|
||||||
toBaseGlyph:(NSGlyph)baseGlyph
|
|
||||||
totalAdvancement:(NSSize *)offset
|
|
||||||
metricsExist:(BOOL *)flag;
|
|
||||||
|
|
||||||
- (NSStringEncoding)mostCompatibleStringEncoding;
|
|
||||||
|
|
||||||
- (NSFontTraitMask) traits;
|
- (NSFontTraitMask) traits;
|
||||||
|
- (float) underlinePosition;
|
||||||
|
- (float) underlineThickness;
|
||||||
- (int) weight;
|
- (int) weight;
|
||||||
|
- (float) widthOfString: (NSString*)string;
|
||||||
|
- (float) xHeight;
|
||||||
-(void) appendBezierPathWithGlyphs: (NSGlyph *)glyphs
|
|
||||||
count: (int)count
|
|
||||||
toBezierPath: (NSBezierPath *)path;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public
|
||||||
License along with this library; if not, write to the Free
|
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>
|
#include <math.h>
|
||||||
|
@ -221,6 +222,7 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
|
RELEASE(coveredCharacterSet);
|
||||||
RELEASE(fontDictionary);
|
RELEASE(fontDictionary);
|
||||||
RELEASE(fontName);
|
RELEASE(fontName);
|
||||||
RELEASE(familyName);
|
RELEASE(familyName);
|
||||||
|
@ -332,6 +334,11 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSCharacterSet*) coveredCharacterSet
|
||||||
|
{
|
||||||
|
return coveredCharacterSet;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString*) encodingScheme
|
- (NSString*) encodingScheme
|
||||||
{
|
{
|
||||||
return encodingScheme;
|
return encodingScheme;
|
||||||
|
@ -357,6 +364,11 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
||||||
return matrix;
|
return matrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (unsigned) numberOfGlyphs
|
||||||
|
{
|
||||||
|
return numberOfGlyphs;
|
||||||
|
}
|
||||||
|
|
||||||
- (float) pointSize
|
- (float) pointSize
|
||||||
{
|
{
|
||||||
return matrix[0];
|
return matrix[0];
|
||||||
|
|
|
@ -1005,14 +1005,12 @@ static BOOL flip_hack;
|
||||||
|
|
||||||
- (unsigned) numberOfGlyphs
|
- (unsigned) numberOfGlyphs
|
||||||
{
|
{
|
||||||
// FIXME
|
return [fontInfo numberOfGlyphs];
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSCharacterSet*) coveredCharacterSet
|
- (NSCharacterSet*) coveredCharacterSet
|
||||||
{
|
{
|
||||||
// FIXME
|
return [fontInfo coveredCharacterSet];
|
||||||
return nil;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSFontDescriptor*) fontDescriptor
|
- (NSFontDescriptor*) fontDescriptor
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue