Some fonts do not measure correctly in Mountain Lion,
carrying over a bug from Lion. Add the check appropriately. Review URL: https://codereview.appspot.com/6026045 git-svn-id: http://skia.googlecode.com/svn/trunk@3675 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
5e508b9156
commit
32a0fb051f
@ -219,6 +219,10 @@ static bool isLion() {
|
||||
return darwinVersion() == 11;
|
||||
}
|
||||
|
||||
static bool isMountainLion() {
|
||||
return darwinVersion() == 12;
|
||||
}
|
||||
|
||||
static bool isLCDFormat(unsigned format) {
|
||||
return SkMask::kLCD16_Format == format || SkMask::kLCD32_Format == format;
|
||||
}
|
||||
@ -1024,7 +1028,7 @@ void SkScalerContext_Mac::generateMetrics(SkGlyph* glyph) {
|
||||
|
||||
// Get the metrics
|
||||
bool lionAdjustedMetrics = false;
|
||||
if (isLion()) {
|
||||
if (isLion() || isMountainLion()) {
|
||||
if (cgGlyph < fGlyphCount && cgGlyph >= getAdjustStart()
|
||||
&& generateBBoxes()) {
|
||||
lionAdjustedMetrics = true;
|
||||
|
Loading…
Reference in New Issue
Block a user