[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:13:15 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit adea1d88bb5293ea65926935f10268b0ec1ceb23
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu May 16 00:22:30 2002 +0000
Fixed problem dealing w/ characters in range 0x7f - 0xa0.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 6a9c334..f2b4de7 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2002-05-15 Richard J. Williamson <rjw at apple.com>
+
+ Fixed problem dealing w/ characters in range 0x7f - 0xa0.
+
+ * WebCoreSupport.subproj/IFTextRenderer.m:
+ (setGlyphForCharacter):
+ (-[IFTextRenderer drawCharacters:length:atPoint:withColor:]):
+ (-[IFTextRenderer floatWidthForCharacters:length:]):
+
2002-05-15 Chris Blumenberg <cblu at apple.com>
Fixed Flash mouse-down, mouse-over Flash bug.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 6a9c334..f2b4de7 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-05-15 Richard J. Williamson <rjw at apple.com>
+
+ Fixed problem dealing w/ characters in range 0x7f - 0xa0.
+
+ * WebCoreSupport.subproj/IFTextRenderer.m:
+ (setGlyphForCharacter):
+ (-[IFTextRenderer drawCharacters:length:atPoint:withColor:]):
+ (-[IFTextRenderer floatWidthForCharacters:length:]):
+
2002-05-15 Chris Blumenberg <cblu at apple.com>
Fixed Flash mouse-down, mouse-over Flash bug.
diff --git a/WebKit/WebCoreSupport.subproj/IFTextRenderer.m b/WebKit/WebCoreSupport.subproj/IFTextRenderer.m
index 16d4101..8af37e9 100644
--- a/WebKit/WebCoreSupport.subproj/IFTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/IFTextRenderer.m
@@ -68,6 +68,7 @@ struct GlyphMap {
// Private method to find a font for a character.
+ (NSFont *) findFontLike:(NSFont *)aFont forCharacter:(UInt32)c inLanguage:(NSLanguage *) language;
+ (NSFont *) findFontLike:(NSFont *)aFont forString:(NSString *)string withRange:(NSRange)range inLanguage:(NSLanguage *) language;
+- (NSGlyph)_defaultGlyphForChar:(unichar)uu;
@end
@class NSCGSFont;
@@ -116,6 +117,18 @@ static inline ATSGlyphRef glyphForCharacter (GlyphMap *map, UniChar c)
}
+static void setGlyphForCharacter (GlyphMap *map, ATSGlyphRef glyph, UniChar c)
+{
+ if (map == 0)
+ return;
+
+ if (c >= map->startRange && c <= map->endRange)
+ ((ATSGlyphRef *)map->glyphs)[c-map->startRange] = glyph;
+ else
+ setGlyphForCharacter (map->next, glyph, c);
+}
+
+
#ifdef _TIMING
static double totalCGGetAdvancesTime = 0;
#endif
@@ -470,7 +483,12 @@ static bool hasMissingGlyphs(ATSGlyphVector *glyphs)
break;
}
- glyphID = glyphForCharacter (characterToGlyphMap, characters[i]);
+ glyphID = glyphForCharacter (characterToGlyphMap, c);
+
+ if (glyphID == 0){
+ 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){
@@ -605,6 +623,11 @@ cleanup:
glyphID = [self extendCharacterToGlyphMapToInclude: c];
}
+ if (glyphID == 0){
+ 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){
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index 16d4101..8af37e9 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -68,6 +68,7 @@ struct GlyphMap {
// Private method to find a font for a character.
+ (NSFont *) findFontLike:(NSFont *)aFont forCharacter:(UInt32)c inLanguage:(NSLanguage *) language;
+ (NSFont *) findFontLike:(NSFont *)aFont forString:(NSString *)string withRange:(NSRange)range inLanguage:(NSLanguage *) language;
+- (NSGlyph)_defaultGlyphForChar:(unichar)uu;
@end
@class NSCGSFont;
@@ -116,6 +117,18 @@ static inline ATSGlyphRef glyphForCharacter (GlyphMap *map, UniChar c)
}
+static void setGlyphForCharacter (GlyphMap *map, ATSGlyphRef glyph, UniChar c)
+{
+ if (map == 0)
+ return;
+
+ if (c >= map->startRange && c <= map->endRange)
+ ((ATSGlyphRef *)map->glyphs)[c-map->startRange] = glyph;
+ else
+ setGlyphForCharacter (map->next, glyph, c);
+}
+
+
#ifdef _TIMING
static double totalCGGetAdvancesTime = 0;
#endif
@@ -470,7 +483,12 @@ static bool hasMissingGlyphs(ATSGlyphVector *glyphs)
break;
}
- glyphID = glyphForCharacter (characterToGlyphMap, characters[i]);
+ glyphID = glyphForCharacter (characterToGlyphMap, c);
+
+ if (glyphID == 0){
+ 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){
@@ -605,6 +623,11 @@ cleanup:
glyphID = [self extendCharacterToGlyphMapToInclude: c];
}
+ if (glyphID == 0){
+ 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){
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list