blob: 9c61b84f21f1b982bb9e58688fbe72b719f80fb9 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
2/*
3 * Copyright 2008 The Android Open Source Project
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
reed@android.com8a1c16f2008-12-17 15:59:43 +00009
10#include "SkFontHost.h"
11
reed@android.comb1d9d2e2009-03-04 17:37:51 +000012SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
reed@android.com8a1c16f2008-12-17 15:59:43 +000013 const char famillyName[],
agl@chromium.org5f6a0762010-04-20 22:06:40 +000014 const void* data, size_t bytelength,
reed@android.com8a1c16f2008-12-17 15:59:43 +000015 SkTypeface::Style style) {
16 SkASSERT(!"SkFontHost::FindTypeface unimplemented");
17 return NULL;
18}
19
reed@android.comb1d9d2e2009-03-04 17:37:51 +000020SkTypeface* SkFontHost::CreateTypefaceFromStream(SkStream*) {
reed@android.com8a1c16f2008-12-17 15:59:43 +000021 SkASSERT(!"SkFontHost::CreateTypeface unimplemented");
22 return NULL;
23}
24
joe.gregorioacb8fb02009-01-06 17:02:39 +000025SkTypeface* SkFontHost::CreateTypefaceFromFile(char const*) {
26 SkASSERT(!"SkFontHost::CreateTypefaceFromFile unimplemented");
27 return NULL;
28}
29
vandebo@chromium.org2a22e102011-01-25 21:01:34 +000030// static
vandebo@chromium.orgc48b2b32011-02-02 02:11:22 +000031SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics(
vandebo@chromium.org325cb9a2011-03-30 18:36:29 +000032 uint32_t fontID,
33 SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo) {
vandebo@chromium.orgc48b2b32011-02-02 02:11:22 +000034 SkASSERT(!"SkFontHost::GetAdvancedTypefaceMetrics unimplemented");
vandebo@chromium.org2a22e102011-01-25 21:01:34 +000035 return NULL;
36}
37
reed@android.com2a645c92009-09-27 20:41:46 +000038void SkFontHost::FilterRec(SkScalerContext::Rec* rec) {
39}
40
reed@android.com8a1c16f2008-12-17 15:59:43 +000041///////////////////////////////////////////////////////////////////////////////
42
reed@android.comb1d9d2e2009-03-04 17:37:51 +000043bool SkFontHost::ValidFontID(uint32_t uniqueID) {
44 SkASSERT(!"SkFontHost::ResolveTypeface unimplemented");
45 return false;
46}
47
48SkStream* SkFontHost::OpenStream(uint32_t uniqueID) {
49 SkASSERT(!"SkFontHost::OpenStream unimplemented");
50 return NULL;
51}
52
reed@android.comac981542009-07-31 16:17:01 +000053size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
54 int32_t* index) {
55 SkDebugf("SkFontHost::GetFileName unimplemented\n");
56 return 0;
57}
58
reed@android.comb1d9d2e2009-03-04 17:37:51 +000059///////////////////////////////////////////////////////////////////////////////
60
reed@android.com8a1c16f2008-12-17 15:59:43 +000061void SkFontHost::Serialize(const SkTypeface* face, SkWStream* stream) {
62 SkASSERT(!"SkFontHost::Serialize unimplemented");
63}
64
65SkTypeface* SkFontHost::Deserialize(SkStream* stream) {
66 SkASSERT(!"SkFontHost::Deserialize unimplemented");
67 return NULL;
68}
69
70///////////////////////////////////////////////////////////////////////////////
71
72SkScalerContext* SkFontHost::CreateScalerContext(const SkDescriptor* desc) {
73 SkASSERT(!"SkFontHost::CreateScalarContext unimplemented");
74 return NULL;
75}
76
reed@google.com7d26c592011-06-13 13:01:10 +000077SkFontID SkFontHost::NextLogicalFont(SkFontID currFontID, SkFontID origFontID) {
reed@android.coma14ea0e2009-03-17 17:59:53 +000078 return 0;
reed@android.com8a1c16f2008-12-17 15:59:43 +000079}
80
joe.gregorioacb8fb02009-01-06 17:02:39 +000081
reed@android.com8a1c16f2008-12-17 15:59:43 +000082///////////////////////////////////////////////////////////////////////////////
83
84size_t SkFontHost::ShouldPurgeFontCache(size_t sizeAllocatedSoFar) {
85 return 0; // nothing to do (change me if you want to limit the font cache)
86}
87
88int SkFontHost::ComputeGammaFlag(const SkPaint& paint) {
89 return 0;
90}
91
92void SkFontHost::GetGammaTables(const uint8_t* tables[2]) {
93 tables[0] = NULL; // black gamma (e.g. exp=1.4)
94 tables[1] = NULL; // white gamma (e.g. exp= 1/1.4)
95}
96