WebTextRenderer.h 1.01 KB
Newer Older
1 2 3 4
/*	
    WebTextRenderer.h  
    Copyright 2002, Apple, Inc. All rights reserved.
*/
darin's avatar
darin committed
5

darin's avatar
darin committed
6
#import <WebCore/WebCoreTextRenderer.h>
darin's avatar
darin committed
7

8 9
typedef struct WidthMap WidthMap;
typedef struct GlyphMap GlyphMap;
10

darin's avatar
darin committed
11
@interface WebTextRenderer : NSObject <WebCoreTextRenderer>
darin's avatar
darin committed
12 13 14 15
{
    int ascent;
    int descent;
    int lineSpacing;
rjw's avatar
rjw committed
16
    ATSGlyphRef spaceGlyph;
darin's avatar
darin committed
17
    
18
    struct AttributeGroup *styleGroup;
rjw's avatar
rjw committed
19
    
20 21
@public
    NSFont *font;
22 23
    GlyphMap *characterToGlyphMap;
    WidthMap *glyphToWidthMap;
rjw's avatar
rjw committed
24 25
    float fixedWidth;
    BOOL isFixedPitch;
darin's avatar
darin committed
26 27
}

28 29
+ (BOOL)shouldBufferTextDrawing;

darin's avatar
darin committed
30
- initWithFont:(NSFont *)font;
31

32
- (float)_floatWidthForCharacters:(const UniChar *)characters stringLength:(unsigned)stringLength fromCharacterPosition: (int)pos numberOfCharacters: (int)len withPadding: (int)padding applyRounding: (BOOL)applyRounding attemptFontSubstitution: (BOOL)attemptSubstitution widths: (float *)widthBuffer fonts: (NSFont **)fontBuffer glyphs: (CGGlyph *)glyphBuffer numGlyphs: (int *)_numGlyphs letterSpacing: (int)ls wordSpacing: (int)ws;
33

darin's avatar
darin committed
34
@end