diff options
author | Herb Derby <herb@google.com> | 2018-05-01 11:57:56 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-01 21:12:15 +0000 |
commit | c86c5c0144b85d0bc8ec791f9609ee2d4e7d835a (patch) | |
tree | dc0e00ea79487ce08f90fca2b4408b525271b82c /src/ports | |
parent | 0f91bb874dc3201dbc3cce3b946f66e3e484c6fc (diff) |
Remove devKerning
Dev kerning is not supported by any scalers. This is
mostly removed. The remaining fields fRsbDelta and
fLsbDelta are kept to keep Android compiling.
Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809
Reviewed-on: https://skia-review.googlesource.com/124921
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/ports')
-rw-r--r-- | src/ports/SkFontHost_FreeType.cpp | 10 | ||||
-rw-r--r-- | src/ports/SkFontHost_mac.cpp | 3 | ||||
-rw-r--r-- | src/ports/SkFontHost_win.cpp | 3 | ||||
-rw-r--r-- | src/ports/SkScalerContext_win_dw.cpp | 6 | ||||
-rw-r--r-- | src/ports/SkTypeface_win_dw.cpp | 1 |
5 files changed, 1 insertions, 22 deletions
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 4c4c6d4f65..c5e8a65733 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -994,8 +994,6 @@ void SkScalerContext_FreeType::generateAdvance(SkGlyph* glyph) { fLoadGlyphFlags | FT_ADVANCE_FLAG_FAST_ONLY, &advance ); if (0 == error) { - glyph->fRsbDelta = 0; - glyph->fLsbDelta = 0; const SkScalar advanceScalar = SkFT_FixedToScalar(advance); glyph->fAdvanceX = SkScalarToFloat(fMatrix22Scalar.getScaleX() * advanceScalar); glyph->fAdvanceY = SkScalarToFloat(fMatrix22Scalar.getSkewY() * advanceScalar); @@ -1091,9 +1089,6 @@ bool SkScalerContext_FreeType::shouldSubpixelBitmap(const SkGlyph& glyph, const void SkScalerContext_FreeType::generateMetrics(SkGlyph* glyph) { SkAutoMutexAcquire ac(gFTMutex); - glyph->fRsbDelta = 0; - glyph->fLsbDelta = 0; - FT_Error err; if (this->setupSize()) { @@ -1184,11 +1179,6 @@ void SkScalerContext_FreeType::generateMetrics(SkGlyph* glyph) { } else { glyph->fAdvanceX = SkFDot6ToFloat(fFace->glyph->advance.x); glyph->fAdvanceY = -SkFDot6ToFloat(fFace->glyph->advance.y); - - if (fRec.fFlags & kDevKernText_Flag) { - glyph->fRsbDelta = SkToS8(fFace->glyph->rsb_delta); - glyph->fLsbDelta = SkToS8(fFace->glyph->lsb_delta); - } } } diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp index efd74f6f8e..8047c4352f 100644 --- a/src/ports/SkFontHost_mac.cpp +++ b/src/ports/SkFontHost_mac.cpp @@ -2249,8 +2249,7 @@ void SkTypeface_Mac::onFilterRec(SkScalerContextRec* rec) const { rec->setHinting(SkPaint::kNormal_Hinting); } - unsigned flagsWeDontSupport = SkScalerContext::kDevKernText_Flag | - SkScalerContext::kForceAutohinting_Flag | + unsigned flagsWeDontSupport = SkScalerContext::kForceAutohinting_Flag | SkScalerContext::kLCD_BGROrder_Flag | SkScalerContext::kLCD_Vertical_Flag; diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index 7bc1e298aa..35a0a74b22 100644 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -943,8 +943,6 @@ void SkScalerContext_GDI::generateMetrics(SkGlyph* glyph) { // TODO(benjaminwagner): What is the type of gm.gmCellInc[XY]? glyph->fAdvanceX = (float)((int)gm.gmCellIncX); glyph->fAdvanceY = (float)((int)gm.gmCellIncY); - glyph->fRsbDelta = 0; - glyph->fLsbDelta = 0; if (this->isSubpixel()) { sk_bzero(&gm, sizeof(gm)); @@ -2265,7 +2263,6 @@ void LogFontTypeface::onFilterRec(SkScalerContextRec* rec) const { } unsigned flagsWeDontSupport = SkScalerContext::kVertical_Flag | - SkScalerContext::kDevKernText_Flag | SkScalerContext::kForceAutohinting_Flag | SkScalerContext::kEmbeddedBitmapText_Flag | SkScalerContext::kEmbolden_Flag | diff --git a/src/ports/SkScalerContext_win_dw.cpp b/src/ports/SkScalerContext_win_dw.cpp index 8e73b16047..98d8ca812e 100644 --- a/src/ports/SkScalerContext_win_dw.cpp +++ b/src/ports/SkScalerContext_win_dw.cpp @@ -377,12 +377,6 @@ uint16_t SkScalerContext_DW::generateCharToGlyph(SkUnichar uni) { } void SkScalerContext_DW::generateAdvance(SkGlyph* glyph) { - //Delta is the difference between the right/left side bearing metric - //and where the right/left side bearing ends up after hinting. - //DirectWrite does not provide this information. - glyph->fRsbDelta = 0; - glyph->fLsbDelta = 0; - glyph->fAdvanceX = 0; glyph->fAdvanceY = 0; diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp index 69be774612..69bf7ff034 100644 --- a/src/ports/SkTypeface_win_dw.cpp +++ b/src/ports/SkTypeface_win_dw.cpp @@ -258,7 +258,6 @@ void DWriteFontTypeface::onFilterRec(SkScalerContextRec* rec) const { } unsigned flagsWeDontSupport = SkScalerContext::kVertical_Flag | - SkScalerContext::kDevKernText_Flag | SkScalerContext::kForceAutohinting_Flag | SkScalerContext::kEmbolden_Flag | SkScalerContext::kLCD_Vertical_Flag; |