2007-05-16 15:50:08 +00:00
|
|
|
/*
|
|
|
|
NSFontDescriptor.h
|
|
|
|
|
|
|
|
Holds an image to use as a cursor
|
|
|
|
|
|
|
|
Copyright (C) 2007 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Author: Dr. H. Nikolaus Schaller <hns@computer.org>
|
|
|
|
Date: 2006
|
|
|
|
|
|
|
|
This file is part of the GNUstep GUI Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-10-29 21:16:17 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
2007-05-16 15:50:08 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-10 04:01:49 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
2007-10-29 21:16:17 +00:00
|
|
|
|
2007-05-16 15:50:08 +00:00
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-10-29 21:16:17 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
2007-05-16 15:50:08 +00:00
|
|
|
|
2007-10-29 21:16:17 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2007-05-16 15:50:08 +00:00
|
|
|
License along with this library; see the file COPYING.LIB.
|
2007-10-29 21:16:17 +00:00
|
|
|
If not, see <http://www.gnu.org/licenses/> or write to the
|
|
|
|
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
2007-05-16 15:50:08 +00:00
|
|
|
Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _GNUstep_H_NSFontDescriptor
|
|
|
|
#define _GNUstep_H_NSFontDescriptor
|
|
|
|
|
2007-08-08 11:05:19 +00:00
|
|
|
#import <GNUstepBase/GSVersionMacros.h>
|
2007-05-16 15:50:08 +00:00
|
|
|
|
2007-08-08 11:05:19 +00:00
|
|
|
#include <Foundation/NSObject.h>
|
2007-05-16 16:40:57 +00:00
|
|
|
|
2007-08-08 11:05:19 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
|
|
|
|
|
|
|
@class NSAffineTransform;
|
|
|
|
@class NSArray;
|
2007-05-16 15:50:08 +00:00
|
|
|
@class NSCoder;
|
2007-08-08 11:05:19 +00:00
|
|
|
@class NSSet;
|
|
|
|
@class NSString;
|
2007-05-16 15:50:08 +00:00
|
|
|
|
2007-08-08 11:05:19 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
2007-05-16 15:50:08 +00:00
|
|
|
typedef uint32_t NSFontSymbolicTraits;
|
|
|
|
|
|
|
|
typedef enum _NSFontFamilyClass
|
|
|
|
{
|
2007-05-16 16:40:57 +00:00
|
|
|
NSFontUnknownClass = 0 << 28,
|
|
|
|
NSFontOldStyleSerifsClass = 1 << 28,
|
|
|
|
NSFontTransitionalSerifsClass = 2 << 28,
|
|
|
|
NSFontModernSerifsClass = 3 << 28,
|
|
|
|
NSFontClarendonSerifsClass = 4 << 28,
|
|
|
|
NSFontSlabSerifsClass = 5 << 28,
|
|
|
|
NSFontFreeformSerifsClass = 7 << 28,
|
|
|
|
NSFontSansSerifClass = 8 << 28,
|
|
|
|
NSFontOrnamentalsClass = 9 << 28,
|
|
|
|
NSFontScriptsClass = 10 << 28,
|
|
|
|
NSFontSymbolicClass = 12 << 28
|
2007-05-16 15:50:08 +00:00
|
|
|
} NSFontFamilyClass;
|
|
|
|
|
2007-08-08 11:05:19 +00:00
|
|
|
enum _NSFontFamiliyClassMask {
|
|
|
|
NSFontFamiliyClassMask = 0xF0000000
|
|
|
|
};
|
|
|
|
|
2007-05-16 15:50:08 +00:00
|
|
|
enum _NSFontTrait
|
|
|
|
{
|
2007-05-16 16:40:57 +00:00
|
|
|
NSFontItalicTrait = 0x0001,
|
|
|
|
NSFontBoldTrait = 0x0002,
|
|
|
|
NSFontExpandedTrait = 0x0020,
|
|
|
|
NSFontCondensedTrait = 0x0040,
|
|
|
|
NSFontMonoSpaceTrait = 0x0400,
|
|
|
|
NSFontVerticalTrait = 0x0800,
|
|
|
|
NSFontUIOptimizedTrait = 0x1000
|
2007-05-16 15:50:08 +00:00
|
|
|
};
|
|
|
|
|
2007-08-08 11:05:19 +00:00
|
|
|
#endif
|
|
|
|
|
2007-05-16 15:50:08 +00:00
|
|
|
extern NSString *NSFontFamilyAttribute;
|
|
|
|
extern NSString *NSFontNameAttribute;
|
|
|
|
extern NSString *NSFontFaceAttribute;
|
|
|
|
extern NSString *NSFontSizeAttribute;
|
|
|
|
extern NSString *NSFontVisibleNameAttribute;
|
|
|
|
extern NSString *NSFontColorAttribute;
|
|
|
|
extern NSString *NSFontMatrixAttribute;
|
|
|
|
extern NSString *NSFontVariationAttribute;
|
|
|
|
extern NSString *NSFontCharacterSetAttribute;
|
|
|
|
extern NSString *NSFontCascadeListAttribute;
|
|
|
|
extern NSString *NSFontTraitsAttribute;
|
|
|
|
extern NSString *NSFontFixedAdvanceAttribute;
|
|
|
|
|
|
|
|
extern NSString *NSFontSymbolicTrait;
|
|
|
|
extern NSString *NSFontWeightTrait;
|
|
|
|
extern NSString *NSFontWidthTrait;
|
|
|
|
extern NSString *NSFontSlantTrait;
|
|
|
|
|
|
|
|
extern NSString *NSFontVariationAxisIdentifierKey;
|
|
|
|
extern NSString *NSFontVariationAxisMinimumValueKey;
|
|
|
|
extern NSString *NSFontVariationAxisMaximumValueKey;
|
|
|
|
extern NSString *NSFontVariationAxisDefaultValueKey;
|
|
|
|
extern NSString *NSFontVariationAxisNameKey;
|
|
|
|
|
|
|
|
@interface NSFontDescriptor : NSObject <NSCoding>
|
|
|
|
{
|
2007-05-16 16:40:57 +00:00
|
|
|
NSDictionary *_attributes;
|
2007-05-16 15:50:08 +00:00
|
|
|
}
|
|
|
|
|
2007-05-16 16:40:57 +00:00
|
|
|
+ (id) fontDescriptorWithFontAttributes: (NSDictionary *)attributes;
|
|
|
|
+ (id) fontDescriptorWithName: (NSString *)name
|
2007-08-08 11:05:19 +00:00
|
|
|
size: (float)size;
|
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
2007-05-16 16:40:57 +00:00
|
|
|
+ (id) fontDescriptorWithName: (NSString *)name
|
2007-08-08 11:05:19 +00:00
|
|
|
matrix: (NSAffineTransform *)matrix;
|
|
|
|
#endif
|
2007-05-16 15:50:08 +00:00
|
|
|
|
|
|
|
- (NSDictionary *) fontAttributes;
|
2007-08-08 11:05:19 +00:00
|
|
|
- (id) initWithFontAttributes: (NSDictionary *)attributes;
|
|
|
|
|
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
2007-05-16 16:40:57 +00:00
|
|
|
- (NSFontDescriptor *) fontDescriptorByAddingAttributes:
|
|
|
|
(NSDictionary *)attributes;
|
|
|
|
- (NSFontDescriptor *) fontDescriptorWithFace: (NSString *)face;
|
|
|
|
- (NSFontDescriptor *) fontDescriptorWithFamily: (NSString *)family;
|
|
|
|
- (NSFontDescriptor *) fontDescriptorWithMatrix: (NSAffineTransform *)matrix;
|
|
|
|
- (NSFontDescriptor *) fontDescriptorWithSize: (float)size;
|
|
|
|
- (NSFontDescriptor *) fontDescriptorWithSymbolicTraits:
|
|
|
|
(NSFontSymbolicTraits)traits;
|
|
|
|
- (NSArray *) matchingFontDescriptorsWithMandatoryKeys: (NSSet *)keys;
|
2007-08-08 11:05:19 +00:00
|
|
|
|
2007-05-16 16:40:57 +00:00
|
|
|
- (id) objectForKey: (NSString *)attribute;
|
2007-08-08 11:05:19 +00:00
|
|
|
- (NSAffineTransform *) matrix;
|
2007-05-16 15:50:08 +00:00
|
|
|
- (float) pointSize;
|
|
|
|
- (NSString *) postscriptName;
|
|
|
|
- (NSFontSymbolicTraits) symbolicTraits;
|
2007-08-08 11:05:19 +00:00
|
|
|
#endif
|
2007-05-16 15:50:08 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2007-08-08 11:05:19 +00:00
|
|
|
#endif /* OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST) */
|
2007-05-16 16:40:57 +00:00
|
|
|
|
2007-05-16 15:50:08 +00:00
|
|
|
#endif /* _GNUstep_H_NSFontDescriptor */
|