fix vertical text on Lion
M src/ports/SkFontHost_mac_coretext.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@2906 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
ae814c7476
commit
5d80f903cf
@ -667,6 +667,7 @@ SkScalerContext_Mac::SkScalerContext_Mac(const SkDescriptor* desc)
|
||||
} else {
|
||||
fVerticalMatrix.preRotate(SkIntToScalar(90));
|
||||
}
|
||||
fVerticalMatrix.postScale(SK_Scalar1, -SK_Scalar1);
|
||||
}
|
||||
fGlyphCount = SkToU16(numGlyphs);
|
||||
fDoSubPosition = SkToBool(fRec.fFlags & kSubpixelPositioning_Flag);
|
||||
@ -791,8 +792,13 @@ void SkScalerContext_Mac::getVerticalOffset(CGGlyph glyphID, SkIPoint* offset) c
|
||||
SkFloatToScalar(vertOffset.height)};
|
||||
SkPoint floatOffset;
|
||||
fVerticalMatrix.mapPoints(&floatOffset, &trans, 1);
|
||||
if (isLion()) {
|
||||
// Lion changed functionality from Snow Leopard, though it's not clear why
|
||||
// this is required here; it was found through trial and error.
|
||||
fUnitMatrix.mapPoints(&floatOffset, 1);
|
||||
}
|
||||
offset->fX = SkScalarRound(floatOffset.fX);
|
||||
offset->fY = -SkScalarRound(floatOffset.fY);
|
||||
offset->fY = SkScalarRound(floatOffset.fY);
|
||||
}
|
||||
|
||||
/* from http://developer.apple.com/fonts/TTRefMan/RM06/Chap6loca.html
|
||||
|
Loading…
Reference in New Issue
Block a user