Commit 3ba2c589 authored by darin's avatar darin
Browse files

* WebCoreSupport.subproj/IFTextRenderer.h: Remove the flavor of

	floatWidthForCharacters without the applyRounding boolean.

	* WebCoreSupport.subproj/IFTextRenderer.m:
	(-[IFTextRenderer drawCharacters:length:atPoint:withColor:]): Remove logic about
	characters in the 0x7F-0xA0 range, since it's already handled by the time we get
	around to drawing.
	(-[IFTextRenderer floatWidthForCharacters:length:applyRounding:]): Pass in the
	applyRounding boolean when calling through to slowFloatWidthForCharacters.
	Move logic about characters in the 0x7F-0xA0 range from here into
	[extendCharacterToGlyphMapToInclude:].
	(-[IFTextRenderer widthForCharacters:length:]): Call the version of
	floatWidthForCharacters that takes the applyRounding parameter; this was the only
	client of the flavor that didn't take the parameter.
	(-[IFTextRenderer extendCharacterToGlyphMapToInclude:]): Add the logic about
	characters in the 0x7F-0xA0 range into here.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 92ecf2ef
2002-06-10 Darin Adler <darin@apple.com>
* WebCoreSupport.subproj/IFTextRenderer.h: Remove the flavor of
floatWidthForCharacters without the applyRounding boolean.
* WebCoreSupport.subproj/IFTextRenderer.m:
(-[IFTextRenderer drawCharacters:length:atPoint:withColor:]): Remove logic about
characters in the 0x7F-0xA0 range, since it's already handled by the time we get
around to drawing.
(-[IFTextRenderer floatWidthForCharacters:length:applyRounding:]): Pass in the
applyRounding boolean when calling through to slowFloatWidthForCharacters.
Move logic about characters in the 0x7F-0xA0 range from here into
[extendCharacterToGlyphMapToInclude:].
(-[IFTextRenderer widthForCharacters:length:]): Call the version of
floatWidthForCharacters that takes the applyRounding parameter; this was the only
client of the flavor that didn't take the parameter.
(-[IFTextRenderer extendCharacterToGlyphMapToInclude:]): Add the logic about
characters in the 0x7F-0xA0 range into here.
2002-06-10 Richard Williamson <rjw@apple.com>
Tweaks to rounding code.
......
2002-06-10 Darin Adler <darin@apple.com>
* WebCoreSupport.subproj/IFTextRenderer.h: Remove the flavor of
floatWidthForCharacters without the applyRounding boolean.
* WebCoreSupport.subproj/IFTextRenderer.m:
(-[IFTextRenderer drawCharacters:length:atPoint:withColor:]): Remove logic about
characters in the 0x7F-0xA0 range, since it's already handled by the time we get
around to drawing.
(-[IFTextRenderer floatWidthForCharacters:length:applyRounding:]): Pass in the
applyRounding boolean when calling through to slowFloatWidthForCharacters.
Move logic about characters in the 0x7F-0xA0 range from here into
[extendCharacterToGlyphMapToInclude:].
(-[IFTextRenderer widthForCharacters:length:]): Call the version of
floatWidthForCharacters that takes the applyRounding parameter; this was the only
client of the flavor that didn't take the parameter.
(-[IFTextRenderer extendCharacterToGlyphMapToInclude:]): Add the logic about
characters in the 0x7F-0xA0 range into here.
2002-06-10 Richard Williamson <rjw@apple.com>
Tweaks to rounding code.
......
......@@ -28,11 +28,6 @@ typedef struct GlyphMap GlyphMap;
- initWithFont:(NSFont *)font;
// Will not return a Cocoa equivalent width. If you need that use
// floatWidthForCharacters:length:applyRounding: with applyRounding == NO.
- (float)floatWidthForCharacters:(const unichar *)characters length:(unsigned)length;
// Set applyRounding = NO to get an Cocoa equivalent width.
- (float)floatWidthForCharacters:(const unichar *)characters length:(unsigned)length applyRounding: (BOOL)applyRounding;
......
......@@ -21,7 +21,7 @@
#define ROUND_TO_INT(x) (unsigned int)((x)+.5)
#define LOCAL_GLYPH_BUFFER_SIZE 1024
#define LOCAL_BUFFER_SIZE 1024
// Covers most of latin1.
#define INITIAL_BLOCK_SIZE 0x200
......@@ -241,7 +241,7 @@ - (NSFont *)substituteFontForCharacters: (const unichar *)characters length: (in
- (void)convertCharacters: (const UniChar *)characters length: (unsigned)numCharacters toGlyphs: (ATSGlyphVector *)glyphs
{
unsigned i;
UniChar localBuffer[LOCAL_GLYPH_BUFFER_SIZE];
UniChar localBuffer[LOCAL_BUFFER_SIZE];
UniChar *buffer = localBuffer;
OSStatus status;
......@@ -252,7 +252,7 @@ - (void)convertCharacters: (const UniChar *)characters length: (unsigned)numChar
}
if (i < numCharacters) {
if (numCharacters > LOCAL_GLYPH_BUFFER_SIZE) {
if (numCharacters > LOCAL_BUFFER_SIZE) {
buffer = (UniChar *)malloc(sizeof(UniChar) * numCharacters);
}
......@@ -324,7 +324,7 @@ - (void)dealloc
- (int)widthForString:(NSString *)string
{
UniChar localCharacterBuffer[LOCAL_GLYPH_BUFFER_SIZE];
UniChar localCharacterBuffer[LOCAL_BUFFER_SIZE];
UniChar *characterBuffer = localCharacterBuffer;
const UniChar *usedCharacterBuffer = CFStringGetCharactersPtr((CFStringRef)string);
unsigned int length;
......@@ -333,7 +333,7 @@ - (int)widthForString:(NSString *)string
// Get the characters from the string into a buffer.
length = [string length];
if (!usedCharacterBuffer) {
if (length > LOCAL_GLYPH_BUFFER_SIZE)
if (length > LOCAL_BUFFER_SIZE)
characterBuffer = (UniChar *)malloc(length * sizeof(UniChar));
[string getCharacters:characterBuffer];
usedCharacterBuffer = characterBuffer;
......@@ -403,7 +403,7 @@ - (bool) slowPackGlyphsForCharacters:(const UniChar *)characters numCharacters:
- (void)drawString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor *)color
{
UniChar localCharacterBuffer[LOCAL_GLYPH_BUFFER_SIZE];
UniChar localCharacterBuffer[LOCAL_BUFFER_SIZE];
UniChar *characterBuffer = localCharacterBuffer;
const UniChar *usedCharacterBuffer = CFStringGetCharactersPtr((CFStringRef)string);
unsigned int length;
......@@ -411,7 +411,7 @@ - (void)drawString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor
// Get the characters from the string into a buffer.
length = [string length];
if (!usedCharacterBuffer) {
if (length > LOCAL_GLYPH_BUFFER_SIZE)
if (length > LOCAL_BUFFER_SIZE)
characterBuffer = (UniChar *)malloc(length * sizeof(UniChar));
[string getCharacters:characterBuffer];
usedCharacterBuffer = characterBuffer;
......@@ -427,9 +427,9 @@ - (void)drawString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor
- (void)drawCharacters:(const UniChar *)characters length: (unsigned int)length atPoint:(NSPoint)point withColor:(NSColor *)color
{
uint i, numGlyphs;
CGGlyph *glyphs, localGlyphBuffer[LOCAL_GLYPH_BUFFER_SIZE];
CGGlyph *glyphs, localGlyphBuffer[LOCAL_BUFFER_SIZE];
#ifndef DRAW_WITHOUT_ADVANCES
CGSize *advances, localAdvanceBuffer[LOCAL_GLYPH_BUFFER_SIZE];
CGSize *advances, localAdvanceBuffer[LOCAL_BUFFER_SIZE];
#endif
ATSGlyphRef glyphID;
CGContextRef cgContext;
......@@ -441,7 +441,7 @@ - (void)drawCharacters:(const UniChar *)characters length: (unsigned int)length
[NSException raise:NSInternalInconsistencyException format:@"%@: Don't know how to deal with font %@", self, [font displayName]];
// Determine if we can use the local stack buffer, otherwise allocate.
if (length > LOCAL_GLYPH_BUFFER_SIZE) {
if (length > LOCAL_BUFFER_SIZE) {
glyphs = (CGGlyph *)malloc(length * sizeof(CGGlyph));
} else {
glyphs = localGlyphBuffer;
......@@ -482,11 +482,6 @@ - (void)drawCharacters:(const UniChar *)characters length: (unsigned int)length
glyphID = glyphForCharacter (characterToGlyphMap, c);
if (glyphID == 0 && c >= 0x7f && c <= 0xa0){
glyphID = [font _defaultGlyphForChar: c];
setGlyphForCharacter (characterToGlyphMap, glyphID, c);
}
// glyphID == 0 means that the font doesn't contain a glyph for the character.
if (glyphID == 0) {
substituteFont = [self substituteFontForCharacters: characters length: length];
......@@ -501,17 +496,16 @@ - (void)drawCharacters:(const UniChar *)characters length: (unsigned int)length
#ifndef DRAW_WITHOUT_ADVANCES
// Determine if we can use the local stack buffer, otherwise allocate.
if (numGlyphs > LOCAL_GLYPH_BUFFER_SIZE) {
if (numGlyphs > LOCAL_BUFFER_SIZE) {
advances = (CGSize *)malloc(numGlyphs * sizeof(CGSize));
} else {
advances = localAdvanceBuffer;
}
for (i = 0; i < numGlyphs; i++) {
advances[i].width = widthForGlyph(self, glyphToWidthMap, glyphs[i]);
if (glyphs[i] == spaceGlyph)
advances[i].width = ROUND_TO_INT(widthForGlyph(self, glyphToWidthMap, glyphs[i]));
else
advances[i].width = widthForGlyph(self, glyphToWidthMap, glyphs[i]);
advances[i].width = ROUND_TO_INT(advances[i].width);
advances[i].height = 0;
}
#endif
......@@ -601,10 +595,9 @@ - (float)slowFloatWidthForCharacters: (const UniChar *)characters length: (unsig
for (i = 0; i < numGlyphs; i++){
glyphID = glyphRecord->glyphID;
glyphRecord = (ATSLayoutRecord *)((char *)glyphRecord + glyphVector.recordSize);
glyphWidth = widthForGlyph(self, glyphToWidthMap, glyphID);
if (glyphID == spaceGlyph && applyRounding)
glyphWidth = ROUND_TO_INT(widthForGlyph(self, glyphToWidthMap, glyphID));
else
glyphWidth = widthForGlyph(self, glyphToWidthMap, glyphID);
glyphWidth = ROUND_TO_INT(glyphWidth);
totalWidth += glyphWidth;
}
ATSClearGlyphVector(&glyphVector);
......@@ -612,12 +605,6 @@ - (float)slowFloatWidthForCharacters: (const UniChar *)characters length: (unsig
return totalWidth;
}
- (float)slowFloatWidthForCharacters: (const UniChar *)characters length: (unsigned)length
{
return [self floatWidthForCharacters: characters length: length applyRounding: YES];
}
- (float)floatWidthForCharacters:(const UniChar *)characters length:(unsigned)length applyRounding: (BOOL)applyRounding
{
float totalWidth = 0;
......@@ -633,24 +620,19 @@ - (float)floatWidthForCharacters:(const UniChar *)characters length:(unsigned)le
c = SPACE;
}
else if (IsNonBaseChar(c)){
return [self slowFloatWidthForCharacters: characters length: length];
return [self slowFloatWidthForCharacters: characters length: length applyRounding: applyRounding];
}
glyphID = glyphForCharacter(characterToGlyphMap, c);
if (glyphID == nonGlyphID){
if (glyphID == nonGlyphID) {
glyphID = [self extendCharacterToGlyphMapToInclude: c];
}
if (glyphID == 0 && c >= 0x7f && c <= 0xa0){
glyphID = [font _defaultGlyphForChar: c];
setGlyphForCharacter (characterToGlyphMap, glyphID, c);
}
// Try to find a substitute font if this font didn't have a glyph for a character in the
// string. If one isn't found we end up drawing and measuring a box.
if (glyphID == 0){
if (glyphID == 0) {
substituteFont = [self substituteFontForCharacters: characters length: length];
if (substituteFont){
if (substituteFont) {
WEBKITDEBUGLEVEL (WEBKIT_LOG_FONTCACHE, "substituting %s for %s, missing 0x%04x\n", DEBUG_OBJECT(substituteFont), DEBUG_OBJECT([font displayName]), c);
return [[[IFTextRendererFactory sharedFactory] rendererWithFont: substituteFont] widthForCharacters: characters length: length];
}
......@@ -665,15 +647,10 @@ - (float)floatWidthForCharacters:(const UniChar *)characters length:(unsigned)le
return totalWidth;
}
- (float)floatWidthForCharacters:(const UniChar *)characters length:(unsigned)length
{
return [self floatWidthForCharacters: characters length: length applyRounding: YES];
}
- (int)widthForCharacters:(const UniChar *)characters length:(unsigned)length
{
return ROUND_TO_INT([self floatWidthForCharacters:characters length:length]);
return ROUND_TO_INT([self floatWidthForCharacters:characters length:length applyRounding:YES]);
}
......@@ -695,6 +672,7 @@ - (ATSGlyphRef)extendCharacterToGlyphMapToInclude:(UniChar) c
ATSGlyphVector glyphVector;
UniChar end, start;
unsigned int blockSize;
ATSGlyphRef glyphID;
if (characterToGlyphMap == 0)
blockSize = INITIAL_BLOCK_SIZE;
......@@ -743,7 +721,15 @@ - (ATSGlyphRef)extendCharacterToGlyphMapToInclude:(UniChar) c
if (spaceGlyph == nonGlyphID)
spaceGlyph = glyphForCharacter (characterToGlyphMap, SPACE);
return map->glyphs[c - start];
glyphID = map->glyphs[c - start];
// Special case for characters 007F-00A0.
if (glyphID == 0 && c >= 0x7F && c <= 0xA0){
glyphID = [font _defaultGlyphForChar: c];
map->glyphs[c - start] = glyphID;
}
return glyphID;
}
......
......@@ -28,11 +28,6 @@ typedef struct GlyphMap GlyphMap;
- initWithFont:(NSFont *)font;
// Will not return a Cocoa equivalent width. If you need that use
// floatWidthForCharacters:length:applyRounding: with applyRounding == NO.
- (float)floatWidthForCharacters:(const unichar *)characters length:(unsigned)length;
// Set applyRounding = NO to get an Cocoa equivalent width.
- (float)floatWidthForCharacters:(const unichar *)characters length:(unsigned)length applyRounding: (BOOL)applyRounding;
......
......@@ -21,7 +21,7 @@
#define ROUND_TO_INT(x) (unsigned int)((x)+.5)
#define LOCAL_GLYPH_BUFFER_SIZE 1024
#define LOCAL_BUFFER_SIZE 1024
// Covers most of latin1.
#define INITIAL_BLOCK_SIZE 0x200
......@@ -241,7 +241,7 @@ - (NSFont *)substituteFontForCharacters: (const unichar *)characters length: (in
- (void)convertCharacters: (const UniChar *)characters length: (unsigned)numCharacters toGlyphs: (ATSGlyphVector *)glyphs
{
unsigned i;
UniChar localBuffer[LOCAL_GLYPH_BUFFER_SIZE];
UniChar localBuffer[LOCAL_BUFFER_SIZE];
UniChar *buffer = localBuffer;
OSStatus status;
......@@ -252,7 +252,7 @@ - (void)convertCharacters: (const UniChar *)characters length: (unsigned)numChar
}
if (i < numCharacters) {
if (numCharacters > LOCAL_GLYPH_BUFFER_SIZE) {
if (numCharacters > LOCAL_BUFFER_SIZE) {
buffer = (UniChar *)malloc(sizeof(UniChar) * numCharacters);
}
......@@ -324,7 +324,7 @@ - (void)dealloc
- (int)widthForString:(NSString *)string
{
UniChar localCharacterBuffer[LOCAL_GLYPH_BUFFER_SIZE];
UniChar localCharacterBuffer[LOCAL_BUFFER_SIZE];
UniChar *characterBuffer = localCharacterBuffer;
const UniChar *usedCharacterBuffer = CFStringGetCharactersPtr((CFStringRef)string);
unsigned int length;
......@@ -333,7 +333,7 @@ - (int)widthForString:(NSString *)string
// Get the characters from the string into a buffer.
length = [string length];
if (!usedCharacterBuffer) {
if (length > LOCAL_GLYPH_BUFFER_SIZE)
if (length > LOCAL_BUFFER_SIZE)
characterBuffer = (UniChar *)malloc(length * sizeof(UniChar));
[string getCharacters:characterBuffer];
usedCharacterBuffer = characterBuffer;
......@@ -403,7 +403,7 @@ - (bool) slowPackGlyphsForCharacters:(const UniChar *)characters numCharacters:
- (void)drawString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor *)color
{
UniChar localCharacterBuffer[LOCAL_GLYPH_BUFFER_SIZE];
UniChar localCharacterBuffer[LOCAL_BUFFER_SIZE];
UniChar *characterBuffer = localCharacterBuffer;
const UniChar *usedCharacterBuffer = CFStringGetCharactersPtr((CFStringRef)string);
unsigned int length;
......@@ -411,7 +411,7 @@ - (void)drawString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor
// Get the characters from the string into a buffer.
length = [string length];
if (!usedCharacterBuffer) {
if (length > LOCAL_GLYPH_BUFFER_SIZE)
if (length > LOCAL_BUFFER_SIZE)
characterBuffer = (UniChar *)malloc(length * sizeof(UniChar));
[string getCharacters:characterBuffer];
usedCharacterBuffer = characterBuffer;
......@@ -427,9 +427,9 @@ - (void)drawString:(NSString *)string atPoint:(NSPoint)point withColor:(NSColor
- (void)drawCharacters:(const UniChar *)characters length: (unsigned int)length atPoint:(NSPoint)point withColor:(NSColor *)color
{
uint i, numGlyphs;
CGGlyph *glyphs, localGlyphBuffer[LOCAL_GLYPH_BUFFER_SIZE];
CGGlyph *glyphs, localGlyphBuffer[LOCAL_BUFFER_SIZE];
#ifndef DRAW_WITHOUT_ADVANCES
CGSize *advances, localAdvanceBuffer[LOCAL_GLYPH_BUFFER_SIZE];
CGSize *advances, localAdvanceBuffer[LOCAL_BUFFER_SIZE];
#endif
ATSGlyphRef glyphID;
CGContextRef cgContext;
......@@ -441,7 +441,7 @@ - (void)drawCharacters:(const UniChar *)characters length: (unsigned int)length
[NSException raise:NSInternalInconsistencyException format:@"%@: Don't know how to deal with font %@", self, [font displayName]];
// Determine if we can use the local stack buffer, otherwise allocate.
if (length > LOCAL_GLYPH_BUFFER_SIZE) {
if (length > LOCAL_BUFFER_SIZE) {
glyphs = (CGGlyph *)malloc(length * sizeof(CGGlyph));
} else {
glyphs = localGlyphBuffer;
......@@ -482,11 +482,6 @@ - (void)drawCharacters:(const UniChar *)characters length: (unsigned int)length
glyphID = glyphForCharacter (characterToGlyphMap, c);
if (glyphID == 0 && c >= 0x7f && c <= 0xa0){
glyphID = [font _defaultGlyphForChar: c];
setGlyphForCharacter (characterToGlyphMap, glyphID, c);
}
// glyphID == 0 means that the font doesn't contain a glyph for the character.
if (glyphID == 0) {
substituteFont = [self substituteFontForCharacters: characters length: length];
......@@ -501,17 +496,16 @@ - (void)drawCharacters:(const UniChar *)characters length: (unsigned int)length
#ifndef DRAW_WITHOUT_ADVANCES
// Determine if we can use the local stack buffer, otherwise allocate.
if (numGlyphs > LOCAL_GLYPH_BUFFER_SIZE) {
if (numGlyphs > LOCAL_BUFFER_SIZE) {
advances = (CGSize *)malloc(numGlyphs * sizeof(CGSize));
} else {
advances = localAdvanceBuffer;
}
for (i = 0; i < numGlyphs; i++) {
advances[i].width = widthForGlyph(self, glyphToWidthMap, glyphs[i]);
if (glyphs[i] == spaceGlyph)
advances[i].width = ROUND_TO_INT(widthForGlyph(self, glyphToWidthMap, glyphs[i]));
else
advances[i].width = widthForGlyph(self, glyphToWidthMap, glyphs[i]);
advances[i].width = ROUND_TO_INT(advances[i].width);
advances[i].height = 0;
}
#endif
......@@ -601,10 +595,9 @@ - (float)slowFloatWidthForCharacters: (const UniChar *)characters length: (unsig
for (i = 0; i < numGlyphs; i++){
glyphID = glyphRecord->glyphID;
glyphRecord = (ATSLayoutRecord *)((char *)glyphRecord + glyphVector.recordSize);
glyphWidth = widthForGlyph(self, glyphToWidthMap, glyphID);
if (glyphID == spaceGlyph && applyRounding)
glyphWidth = ROUND_TO_INT(widthForGlyph(self, glyphToWidthMap, glyphID));
else
glyphWidth = widthForGlyph(self, glyphToWidthMap, glyphID);
glyphWidth = ROUND_TO_INT(glyphWidth);
totalWidth += glyphWidth;
}
ATSClearGlyphVector(&glyphVector);
......@@ -612,12 +605,6 @@ - (float)slowFloatWidthForCharacters: (const UniChar *)characters length: (unsig
return totalWidth;
}
- (float)slowFloatWidthForCharacters: (const UniChar *)characters length: (unsigned)length
{
return [self floatWidthForCharacters: characters length: length applyRounding: YES];
}
- (float)floatWidthForCharacters:(const UniChar *)characters length:(unsigned)length applyRounding: (BOOL)applyRounding
{
float totalWidth = 0;
......@@ -633,24 +620,19 @@ - (float)floatWidthForCharacters:(const UniChar *)characters length:(unsigned)le
c = SPACE;
}
else if (IsNonBaseChar(c)){
return [self slowFloatWidthForCharacters: characters length: length];
return [self slowFloatWidthForCharacters: characters length: length applyRounding: applyRounding];
}
glyphID = glyphForCharacter(characterToGlyphMap, c);
if (glyphID == nonGlyphID){
if (glyphID == nonGlyphID) {
glyphID = [self extendCharacterToGlyphMapToInclude: c];
}
if (glyphID == 0 && c >= 0x7f && c <= 0xa0){
glyphID = [font _defaultGlyphForChar: c];
setGlyphForCharacter (characterToGlyphMap, glyphID, c);
}
// Try to find a substitute font if this font didn't have a glyph for a character in the
// string. If one isn't found we end up drawing and measuring a box.
if (glyphID == 0){
if (glyphID == 0) {
substituteFont = [self substituteFontForCharacters: characters length: length];
if (substituteFont){
if (substituteFont) {
WEBKITDEBUGLEVEL (WEBKIT_LOG_FONTCACHE, "substituting %s for %s, missing 0x%04x\n", DEBUG_OBJECT(substituteFont), DEBUG_OBJECT([font displayName]), c);
return [[[IFTextRendererFactory sharedFactory] rendererWithFont: substituteFont] widthForCharacters: characters length: length];
}
......@@ -665,15 +647,10 @@ - (float)floatWidthForCharacters:(const UniChar *)characters length:(unsigned)le
return totalWidth;
}
- (float)floatWidthForCharacters:(const UniChar *)characters length:(unsigned)length
{
return [self floatWidthForCharacters: characters length: length applyRounding: YES];
}
- (int)widthForCharacters:(const UniChar *)characters length:(unsigned)length
{
return ROUND_TO_INT([self floatWidthForCharacters:characters length:length]);
return ROUND_TO_INT([self floatWidthForCharacters:characters length:length applyRounding:YES]);
}
......@@ -695,6 +672,7 @@ - (ATSGlyphRef)extendCharacterToGlyphMapToInclude:(UniChar) c
ATSGlyphVector glyphVector;
UniChar end, start;
unsigned int blockSize;
ATSGlyphRef glyphID;
if (characterToGlyphMap == 0)
blockSize = INITIAL_BLOCK_SIZE;
......@@ -743,7 +721,15 @@ - (ATSGlyphRef)extendCharacterToGlyphMapToInclude:(UniChar) c
if (spaceGlyph == nonGlyphID)
spaceGlyph = glyphForCharacter (characterToGlyphMap, SPACE);
return map->glyphs[c - start];
glyphID = map->glyphs[c - start];
// Special case for characters 007F-00A0.
if (glyphID == 0 && c >= 0x7F && c <= 0xA0){
glyphID = [font _defaultGlyphForChar: c];
map->glyphs[c - start] = glyphID;
}
return glyphID;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment