Changeset 23199 in webkit
- Timestamp:
- Mar 27, 2007 1:59:40 AM (17 years ago)
- Location:
- branches/WindowsMerge/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WindowsMerge/WebCore/ChangeLog
r23198 r23199 1 2007-03-27 Dave Hyatt <hyatt@apple.com> 2 3 Add support for glyph offsets to the GlyphBuffer. 4 5 Reviewed by olliej 6 7 * platform/win/FontWin.cpp: 8 (WebCore::Font::drawGlyphs): 9 * platform/win/UniscribeController.cpp: 10 (WebCore::UniscribeController::shapeAndPlaceItem): 11 1 12 2007-03-26 Antti Koivisto <antti@apple.com> 2 13 -
branches/WindowsMerge/WebCore/platform/win/FontWin.cpp
r23197 r23199 68 68 69 69 CGAffineTransform matrix = CGAffineTransformIdentity; 70 //memcpy(&matrix, [drawFont matrix], sizeof(matrix)); 71 //if ([gContext isFlipped]) { 72 { 73 matrix.b = -matrix.b; 74 matrix.d = -matrix.d; 75 } 70 matrix.b = -matrix.b; 71 matrix.d = -matrix.d; 72 76 73 if (platformData.syntheticOblique()) 77 74 { … … 79 76 matrix = CGAffineTransformConcat(matrix, CGAffineTransformMake(1, 0, skew, 1, 0, 0)); 80 77 } 78 79 // Uniscribe gives us offsets to help refine the positioning of combining glyphs. 80 FloatSize translation = glyphBuffer.offsetAt(from); 81 if (translation.width() || translation.height()) 82 CGAffineTransformTranslate(matrix, translation.width(), translation.height()); 83 81 84 CGContextSetTextMatrix(cgContext, matrix); 82 85 -
branches/WindowsMerge/WebCore/platform/win/UniscribeController.cpp
r23197 r23199 335 335 Glyph glyph = glyphs[k]; 336 336 float advance = advances[k] / 32.0f; 337 float offsetX = offsets[k].du / 32.0f; 338 float offsetY = offsets[k].dv / 32.0f; 337 339 338 340 // Match AppKit's rules for the integer vs. non-integer rendering modes. 339 341 float roundedAdvance = roundf(advance); 340 if (!m_font.isPrinterFont() && !fontData->isSystemFont()) 342 if (!m_font.isPrinterFont() && !fontData->isSystemFont()) { 341 343 advance = roundedAdvance; 342 344 offsetX = roundf(offsetX); 345 offsetY = roundf(offsetY); 346 } 347 343 348 // We special case spaces in two ways when applying word rounding. 344 349 // First, we round spaces to an adjusted width in all fonts. … … 401 406 // translation. 402 407 if (glyphBuffer) 403 glyphBuffer->add(glyph, fontData, advance );408 glyphBuffer->add(glyph, fontData, advance, &FloatSize(offsetX, offsetY)); 404 409 405 410 // Mutate the glyph array to contain our altered advances.
Note: See TracChangeset
for help on using the changeset viewer.