mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 04:20:46 +00:00
Added some methods for font size and one function for glyphs from
the MacOS X specification. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9753 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
faee48bffa
commit
cc4d2beb72
2 changed files with 61 additions and 6 deletions
|
@ -237,6 +237,25 @@ setNSFont(NSString* key, NSFont* font)
|
|||
}
|
||||
}
|
||||
|
||||
+ (NSFont*) labelFontOfSize: (float)fontSize
|
||||
{
|
||||
static NSFont *font = nil;
|
||||
|
||||
if (fontSize != 0)
|
||||
{
|
||||
return getNSFont (@"NSLabelFont", @"Helvetica", fontSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((font == nil) || (userCacheNeedsRecomputing == YES))
|
||||
{
|
||||
ASSIGN (font, getNSFont (@"NSLabelFont", @"Helvetica", 0));
|
||||
userCacheNeedsRecomputing = NO;
|
||||
}
|
||||
return font;
|
||||
}
|
||||
}
|
||||
|
||||
+ (NSFont*) menuFontOfSize: (float)fontSize
|
||||
{
|
||||
static NSFont *font = nil;
|
||||
|
@ -334,6 +353,24 @@ setNSFont(NSString* key, NSFont* font)
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Font Sizes
|
||||
//
|
||||
+ (float) labelFontSize
|
||||
{
|
||||
return 12.0;
|
||||
}
|
||||
|
||||
+ (float) smallSystemFontSize
|
||||
{
|
||||
return 9.0;
|
||||
}
|
||||
|
||||
+ (float) systemFontSize
|
||||
{
|
||||
return 12.0;
|
||||
}
|
||||
|
||||
- (id) initWithName: (NSString*)name matrix: (const float*)fontMatrix
|
||||
{
|
||||
fontName = [name copy];
|
||||
|
@ -613,3 +650,12 @@ setNSFont(NSString* key, NSFont* font)
|
|||
}
|
||||
|
||||
@end /* NSFont */
|
||||
|
||||
int NSConvertGlyphsToPackedGlyphs(NSGlyph *glBuf,
|
||||
int count,
|
||||
NSMultibyteGlyphPacking packing,
|
||||
char *packedGlyphs)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue