[webkit-changes] cvs commit: WebKit/WebCoreSupport.subproj
WebTextRenderer.m
Geoffrey
ggaren at opensource.apple.com
Fri Jul 8 17:48:25 PDT 2005
ggaren 05/07/08 17:48:25
Modified: . ChangeLog
WebCoreSupport.subproj WebTextRenderer.m
Log:
Rolled in patch by opendarwin.org at mitzpettel.com
-fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=3818
Fallback font doesn't have requested weight in ATSUI-rendered text
Reviewed by mjs.
* WebCoreSupport.subproj/WebTextRenderer.m:
(-[WebTextRenderer _createATSUTextLayoutForRun:style:]):
Revision Changes Path
1.3213 +12 -0 WebKit/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebKit/ChangeLog,v
retrieving revision 1.3212
retrieving revision 1.3213
diff -u -r1.3212 -r1.3213
--- ChangeLog 5 Jul 2005 23:21:23 -0000 1.3212
+++ ChangeLog 9 Jul 2005 00:48:22 -0000 1.3213
@@ -1,3 +1,15 @@
+2005-07-08 Geoffrey Garen <ggaren at apple.com>
+
+ Rolled in patch by opendarwin.org at mitzpettel.com
+
+ -fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=3818
+ Fallback font doesn't have requested weight in ATSUI-rendered text
+
+ Reviewed by mjs.
+
+ * WebCoreSupport.subproj/WebTextRenderer.m:
+ (-[WebTextRenderer _createATSUTextLayoutForRun:style:]):
+
2005-07-05 Adele Peterson <adele at apple.com>
Rolling out changes for <rdar://problem/3792529> REGRESSION (Mail): Tabs do not work the way they did in Panther (especially useful in plain text mail)
1.178 +17 -0 WebKit/WebCoreSupport.subproj/WebTextRenderer.m
Index: WebTextRenderer.m
===================================================================
RCS file: /cvs/root/WebKit/WebCoreSupport.subproj/WebTextRenderer.m,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -r1.177 -r1.178
--- WebTextRenderer.m 5 Jul 2005 23:21:31 -0000 1.177
+++ WebTextRenderer.m 9 Jul 2005 00:48:25 -0000 1.178
@@ -1485,6 +1485,9 @@
ATSUTextLayout layout;
UniCharCount runLength;
+ ATSUFontID ATSUSubstituteFont;
+ UniCharArrayOffset substituteOffset;
+ UniCharCount substituteLength;
OSStatus status;
[self _initializeATSUStyle];
@@ -1521,6 +1524,20 @@
status = ATSUSetTransientFontMatching (layout, YES);
if(status != noErr)
FATAL_ALWAYS ("ATSUSetTransientFontMatching failed(%d)", status);
+
+ substituteOffset = run->from;
+ while ((status = ATSUMatchFontsToText(layout, substituteOffset, kATSUToTextEnd, &ATSUSubstituteFont, &substituteOffset, &substituteLength)) == kATSUFontsMatched || status == kATSUFontsNotMatched) {
+ NSFont *substituteFont = [self _substituteFontForCharacters:run->characters+substituteOffset length:substituteLength families:style->families];
+ if (substituteFont) {
+ WebTextRenderer *substituteRenderer = [[WebTextRendererFactory sharedFactory] rendererWithFont:substituteFont usingPrinterFont:usingPrinterFont];
+ [substituteRenderer _initializeATSUStyle];
+ if (substituteRenderer && substituteRenderer->_ATSUSstyle)
+ ATSUSetRunStyle(layout, substituteRenderer->_ATSUSstyle, substituteOffset, substituteLength);
+ // ignoring errors
+ }
+ substituteOffset += substituteLength;
+ };
+ // ignoring errors in font substitution
return layout;
}
More information about the webkit-changes
mailing list