aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2017-02-09 17:15:59 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-09 22:55:34 +0000
commit18ec7b9581d535c79b729b9b311d1a3657f6c550 (patch)
treee12cc33dbde34eaa4245928b0a6d78ed7943f098 /src
parente037d12625b1dbb7952ae8a6553d6830e8b3ebbf (diff)
Replace kCTFontXXXOrientation with kCTFontOrientationXXX.
English has a quite complex order of adjectives, and adjectives come before the noun. However, this order often clashes with the desire for clear hierarchy in naming. In the kingdom of nouns the nouns come first. A great eye at Apple noticed a lack of dicipline in the naming of the orientation constants and ranamed them to conform, deprecating the original names. To avoid warnings which become errors, Skia must now use the new names for these constants. BUG=chromium:408571 Change-Id: I5ccce4a3353157e1e8780c3a169099cec76b7637 Reviewed-on: https://skia-review.googlesource.com/8300 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/ports/SkFontHost_mac.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp
index d072b261a7..d4072255b0 100644
--- a/src/ports/SkFontHost_mac.cpp
+++ b/src/ports/SkFontHost_mac.cpp
@@ -705,9 +705,9 @@ private:
* unrotated glyph, and then the rotation is applied separately.
*
* CT vertical metrics are pre-rotated (in em space, before transform) 90deg clock-wise.
- * This makes kCTFontDefaultOrientation dangerous, because the metrics from
- * kCTFontHorizontalOrientation are in a different space from kCTFontVerticalOrientation.
- * With kCTFontVerticalOrientation the advances must be unrotated.
+ * This makes kCTFontOrientationDefault dangerous, because the metrics from
+ * kCTFontOrientationHorizontal are in a different space from kCTFontOrientationVertical.
+ * With kCTFontOrientationVertical the advances must be unrotated.
*
* Sometimes, creating a copy of a CTFont with the same size but different trasform will select
* different underlying font data. As a result, avoid ever creating more than one CTFont per
@@ -962,13 +962,13 @@ void SkScalerContext_Mac::generateMetrics(SkGlyph* glyph) {
// The following block produces cgAdvance in CG units (pixels, y up).
CGSize cgAdvance;
if (fVertical) {
- CTFontGetAdvancesForGlyphs(fCTFont.get(), kCTFontVerticalOrientation,
+ CTFontGetAdvancesForGlyphs(fCTFont.get(), kCTFontOrientationVertical,
&cgGlyph, &cgAdvance, 1);
// Vertical advances are returned as widths instead of heights.
SkTSwap(cgAdvance.height, cgAdvance.width);
cgAdvance.height = -cgAdvance.height;
} else {
- CTFontGetAdvancesForGlyphs(fCTFont.get(), kCTFontHorizontalOrientation,
+ CTFontGetAdvancesForGlyphs(fCTFont.get(), kCTFontOrientationHorizontal,
&cgGlyph, &cgAdvance, 1);
}
cgAdvance = CGSizeApplyAffineTransform(cgAdvance, fTransform);
@@ -987,7 +987,7 @@ void SkScalerContext_Mac::generateMetrics(SkGlyph* glyph) {
{
// CTFontGetBoundingRectsForGlyphs produces cgBounds in CG units (pixels, y up).
CGRect cgBounds;
- CTFontGetBoundingRectsForGlyphs(fCTFont.get(), kCTFontHorizontalOrientation,
+ CTFontGetBoundingRectsForGlyphs(fCTFont.get(), kCTFontOrientationHorizontal,
&cgGlyph, &cgBounds, 1);
cgBounds = CGRectApplyAffineTransform(cgBounds, fTransform);
@@ -1520,7 +1520,7 @@ SkAdvancedTypefaceMetrics* SkTypeface_Mac::onGetAdvancedTypefaceMetrics(
CGGlyph glyphs[count];
CGRect boundingRects[count];
if (CTFontGetGlyphsForCharacters(ctFont.get(), stem_chars, glyphs, count)) {
- CTFontGetBoundingRectsForGlyphs(ctFont.get(), kCTFontHorizontalOrientation,
+ CTFontGetBoundingRectsForGlyphs(ctFont.get(), kCTFontOrientationHorizontal,
glyphs, boundingRects, count);
for (size_t i = 0; i < count; i++) {
int16_t width = (int16_t) boundingRects[i].size.width;