Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(966)

Unified Diff: src/ports/SkFontHost_win.cpp

Issue 2222523003: SkPDF/SkAdvancedTypefaceMetrics: simplify ATM, PDF takes over (Closed) Base URL: https://skia.googlesource.com/skia.git@SkPDF_no_kHAdvance
Patch Set: rebase and nit Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ports/SkFontHost_mac.cpp ('k') | src/ports/SkTypeface_win_dw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_win.cpp
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index fa5c9722b81b8aca73e82c48e28b37298f54bc01..a2d9da7a39461ce4d7e1d209a744e74816ccbb3e 100644
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -1818,29 +1818,6 @@ SkAdvancedTypefaceMetrics* LogFontTypeface::onGetAdvancedTypefaceMetrics(
}
}
- if (perGlyphInfo & kHAdvance_PerGlyphInfo) {
- info->setGlyphWidths(
- glyphCount,
- glyphIDs,
- glyphIDsCount,
- SkAdvancedTypefaceMetrics::GetAdvance([hdc](int gId, int16_t* advance) {
- // Initialize the MAT2 structure to
- // the identify transformation matrix.
- static const MAT2 mat2 = {
- SkScalarToFIXED(1), SkScalarToFIXED(0),
- SkScalarToFIXED(0), SkScalarToFIXED(1)};
- int flags = GGO_METRICS | GGO_GLYPH_INDEX;
- GLYPHMETRICS gm;
- if (GDI_ERROR == GetGlyphOutline(hdc, gId, flags, &gm, 0, nullptr, &mat2)) {
- return false;
- }
- SkASSERT(advance);
- *advance = gm.gmCellIncX;
- return true;
- })
- );
- }
-
Error:
ReturnInfo:
SelectObject(hdc, savefont);
« no previous file with comments | « src/ports/SkFontHost_mac.cpp ('k') | src/ports/SkTypeface_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698