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

Side by Side Diff: src/pdf/SkPDFFont.cpp

Issue 913143007: Upstream support for sfntly in Google3 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | 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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 <ctype.h> 8 #include <ctype.h>
9 9
10 #include "SkData.h" 10 #include "SkData.h"
11 #include "SkGlyphCache.h" 11 #include "SkGlyphCache.h"
12 #include "SkPaint.h" 12 #include "SkPaint.h"
13 #include "SkPDFCatalog.h" 13 #include "SkPDFCatalog.h"
14 #include "SkPDFCanon.h" 14 #include "SkPDFCanon.h"
15 #include "SkPDFDevice.h" 15 #include "SkPDFDevice.h"
16 #include "SkPDFFont.h" 16 #include "SkPDFFont.h"
17 #include "SkPDFFontImpl.h" 17 #include "SkPDFFontImpl.h"
18 #include "SkPDFStream.h" 18 #include "SkPDFStream.h"
19 #include "SkPDFTypes.h" 19 #include "SkPDFTypes.h"
20 #include "SkPDFUtils.h" 20 #include "SkPDFUtils.h"
21 #include "SkRefCnt.h" 21 #include "SkRefCnt.h"
22 #include "SkScalar.h" 22 #include "SkScalar.h"
23 #include "SkStream.h" 23 #include "SkStream.h"
24 #include "SkTypefacePriv.h" 24 #include "SkTypefacePriv.h"
25 #include "SkTypes.h" 25 #include "SkTypes.h"
26 #include "SkUtils.h" 26 #include "SkUtils.h"
27 27
28 #if defined (SK_SFNTLY_SUBSETTER) 28 #if defined (SK_SFNTLY_SUBSETTER)
29 #include SK_SFNTLY_SUBSETTER 29 #include SK_SFNTLY_SUBSETTER
30 #endif
31
32 #if defined (GOOGLE3)
33 // #including #defines doesn't work in with this build system.
34 #include "typography/font/sfntly/src/sample/chromium/font_subsetter.h"
35 #define SK_SFNTLY_SUBSETTER // For the benefit of #ifdefs below.
30 #endif 36 #endif
31 37
32 // PDF's notion of symbolic vs non-symbolic is related to the character set, not 38 // PDF's notion of symbolic vs non-symbolic is related to the character set, not
33 // symbols vs. characters. Rarely is a font the right character set to call it 39 // symbols vs. characters. Rarely is a font the right character set to call it
34 // non-symbolic, so always call it symbolic. (PDF 1.4 spec, section 5.7.1) 40 // non-symbolic, so always call it symbolic. (PDF 1.4 spec, section 5.7.1)
35 static const int kPdfSymbolic = 4; 41 static const int kPdfSymbolic = 4;
36 42
37 namespace { 43 namespace {
38 44
39 /////////////////////////////////////////////////////////////////////////////// 45 ///////////////////////////////////////////////////////////////////////////////
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 } 1423 }
1418 if (existingFont != NULL) { 1424 if (existingFont != NULL) {
1419 return (existingFont->fFirstGlyphID <= searchGlyphID && 1425 return (existingFont->fFirstGlyphID <= searchGlyphID &&
1420 searchGlyphID <= existingFont->fLastGlyphID) 1426 searchGlyphID <= existingFont->fLastGlyphID)
1421 ? SkPDFFont::kExact_Match 1427 ? SkPDFFont::kExact_Match
1422 : SkPDFFont::kRelated_Match; 1428 : SkPDFFont::kRelated_Match;
1423 } 1429 }
1424 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match 1430 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match
1425 : SkPDFFont::kRelated_Match; 1431 : SkPDFFont::kRelated_Match;
1426 } 1432 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698