fixed: the canvas sizing and DOM sizing differed by 1px

This commit is contained in:
daboe01
2016-11-08 19:52:45 +01:00
parent da0910b1e5
commit a1925e1d0b
+1 -1
View File
@@ -101,7 +101,7 @@ CPStringSizeCachingEnabled = YES;
if (fontHeight === undefined)
fontHeight = CPStringSizeWithFontHeightCache[cssString] = [aFont defaultLineHeightForFont];
size = CGSizeMake(CPStringSizeMeasuringContext.measureText(self).width, fontHeight);
size = CGSizeMake(CPStringSizeMeasuringContext.measureText(self).width + 1, fontHeight);
}
sizeCacheForFont[cacheKey] = size;