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

Side by Side Diff: src/ports/SkFontHost_win.cpp

Issue 2246903002: SkPDF: SkPDFFont class changes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-08-15 (Monday) 21:25:47 EDT 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 unified diff | Download patch
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkTypes.h" 8 #include "SkTypes.h"
9 #if defined(SK_BUILD_FOR_WIN32) 9 #if defined(SK_BUILD_FOR_WIN32)
10 10
(...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 glyphCount = calculateGlyphCount(hdc, fLogFont); 1754 glyphCount = calculateGlyphCount(hdc, fLogFont);
1755 1755
1756 info = new SkAdvancedTypefaceMetrics; 1756 info = new SkAdvancedTypefaceMetrics;
1757 info->fEmSize = otm.otmEMSquare; 1757 info->fEmSize = otm.otmEMSquare;
1758 info->fLastGlyphID = SkToU16(glyphCount - 1); 1758 info->fLastGlyphID = SkToU16(glyphCount - 1);
1759 tchar_to_skstring(lf.lfFaceName, &info->fFontName); 1759 tchar_to_skstring(lf.lfFaceName, &info->fFontName);
1760 // If bit 1 is set, the font may not be embedded in a document. 1760 // If bit 1 is set, the font may not be embedded in a document.
1761 // If bit 1 is clear, the font can be embedded. 1761 // If bit 1 is clear, the font can be embedded.
1762 // If bit 2 is set, the embedding is read-only. 1762 // If bit 2 is set, the embedding is read-only.
1763 if (otm.otmfsType & 0x1) { 1763 if (otm.otmfsType & 0x1) {
1764 info->fFlags = SkTBitOr<SkAdvancedTypefaceMetrics::FontFlags>( 1764 info->fFlags |= SkAdvancedTypefaceMetrics::kNotEmbeddable_FontFlag;
1765 info->fFlags,
1766 SkAdvancedTypefaceMetrics::kNotEmbeddable_FontFlag);
1767 } 1765 }
1768 1766
1769 if (perGlyphInfo & kToUnicode_PerGlyphInfo) { 1767 if (perGlyphInfo & kToUnicode_PerGlyphInfo) {
1770 populate_glyph_to_unicode(hdc, glyphCount, &(info->fGlyphToUnicode)); 1768 populate_glyph_to_unicode(hdc, glyphCount, &(info->fGlyphToUnicode));
1771 } 1769 }
1772 1770
1773 if (glyphCount > 0 && 1771 if (glyphCount > 0 &&
1774 (otm.otmTextMetrics.tmPitchAndFamily & TMPF_TRUETYPE)) { 1772 (otm.otmTextMetrics.tmPitchAndFamily & TMPF_TRUETYPE)) {
1775 info->fType = SkAdvancedTypefaceMetrics::kTrueType_Font; 1773 info->fType = SkAdvancedTypefaceMetrics::kTrueType_Font;
1776 } else { 1774 } else {
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
2483 2481
2484 private: 2482 private:
2485 SkTDArray<ENUMLOGFONTEX> fLogFontArray; 2483 SkTDArray<ENUMLOGFONTEX> fLogFontArray;
2486 }; 2484 };
2487 2485
2488 /////////////////////////////////////////////////////////////////////////////// 2486 ///////////////////////////////////////////////////////////////////////////////
2489 2487
2490 SkFontMgr* SkFontMgr_New_GDI() { return new SkFontMgrGDI; } 2488 SkFontMgr* SkFontMgr_New_GDI() { return new SkFontMgrGDI; }
2491 2489
2492 #endif//defined(SK_BUILD_FOR_WIN32) 2490 #endif//defined(SK_BUILD_FOR_WIN32)
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698