OLD | NEW |
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 "SkFontHost_FreeType_common.h" | 8 #include "SkFontHost_FreeType_common.h" |
9 #include "SkFontDescriptor.h" | 9 #include "SkFontDescriptor.h" |
10 #include "SkFontMgr.h" | 10 #include "SkFontMgr.h" |
11 #include "SkFontMgr_custom.h" | 11 #include "SkFontMgr_custom.h" |
12 #include "SkDescriptor.h" | 12 #include "SkDescriptor.h" |
13 #include "SkOSFile.h" | 13 #include "SkOSFile.h" |
14 #include "SkPaint.h" | 14 #include "SkPaint.h" |
15 #include "SkRTConf.h" | 15 #include "SkRTConf.h" |
16 #include "SkString.h" | 16 #include "SkString.h" |
17 #include "SkStream.h" | 17 #include "SkStream.h" |
18 #include "SkThread.h" | |
19 #include "SkTSearch.h" | 18 #include "SkTSearch.h" |
20 #include "SkTypefaceCache.h" | 19 #include "SkTypefaceCache.h" |
21 #include "SkTArray.h" | 20 #include "SkTArray.h" |
22 | 21 |
23 #include <limits> | 22 #include <limits> |
24 | 23 |
25 /** The base SkTypeface implementation for the custom font manager. */ | 24 /** The base SkTypeface implementation for the custom font manager. */ |
26 class SkTypeface_Custom : public SkTypeface_FreeType { | 25 class SkTypeface_Custom : public SkTypeface_FreeType { |
27 public: | 26 public: |
28 SkTypeface_Custom(const SkFontStyle& style, bool isFixedPitch, | 27 SkTypeface_Custom(const SkFontStyle& style, bool isFixedPitch, |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 addTo->appendTypeface(tf); | 504 addTo->appendTypeface(tf); |
506 } | 505 } |
507 } | 506 } |
508 | 507 |
509 const SkEmbeddedResourceHeader* fHeader; | 508 const SkEmbeddedResourceHeader* fHeader; |
510 }; | 509 }; |
511 | 510 |
512 SkFontMgr* SkFontMgr_New_Custom_Embedded(const SkEmbeddedResourceHeader* header)
{ | 511 SkFontMgr* SkFontMgr_New_Custom_Embedded(const SkEmbeddedResourceHeader* header)
{ |
513 return new SkFontMgr_Custom(EmbeddedSystemFontLoader(header)); | 512 return new SkFontMgr_Custom(EmbeddedSystemFontLoader(header)); |
514 } | 513 } |
OLD | NEW |