reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 1 | /* Copyright 2006-2008, The Android Open Source Project |
| 2 | ** |
| 3 | ** Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | ** you may not use this file except in compliance with the License. |
| 5 | ** You may obtain a copy of the License at |
| 6 | ** |
| 7 | ** http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | ** |
| 9 | ** Unless required by applicable law or agreed to in writing, software |
| 10 | ** distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | ** See the License for the specific language governing permissions and |
| 13 | ** limitations under the License. |
| 14 | */ |
| 15 | |
| 16 | #include "SkFontHost.h" |
| 17 | |
reed@android.com | b1d9d2e | 2009-03-04 17:37:51 +0000 | [diff] [blame] | 18 | SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace, |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 19 | const char famillyName[], |
agl@chromium.org | 5f6a076 | 2010-04-20 22:06:40 +0000 | [diff] [blame] | 20 | const void* data, size_t bytelength, |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 21 | SkTypeface::Style style) { |
| 22 | SkASSERT(!"SkFontHost::FindTypeface unimplemented"); |
| 23 | return NULL; |
| 24 | } |
| 25 | |
reed@android.com | b1d9d2e | 2009-03-04 17:37:51 +0000 | [diff] [blame] | 26 | SkTypeface* SkFontHost::CreateTypefaceFromStream(SkStream*) { |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 27 | SkASSERT(!"SkFontHost::CreateTypeface unimplemented"); |
| 28 | return NULL; |
| 29 | } |
| 30 | |
joe.gregorio | acb8fb0 | 2009-01-06 17:02:39 +0000 | [diff] [blame] | 31 | SkTypeface* SkFontHost::CreateTypefaceFromFile(char const*) { |
| 32 | SkASSERT(!"SkFontHost::CreateTypefaceFromFile unimplemented"); |
| 33 | return NULL; |
| 34 | } |
| 35 | |
vandebo@chromium.org | 2a22e10 | 2011-01-25 21:01:34 +0000 | [diff] [blame] | 36 | // static |
vandebo@chromium.org | c48b2b3 | 2011-02-02 02:11:22 +0000 | [diff] [blame] | 37 | SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics( |
| 38 | uint32_t fontID, bool perGlyphInfo) { |
| 39 | SkASSERT(!"SkFontHost::GetAdvancedTypefaceMetrics unimplemented"); |
vandebo@chromium.org | 2a22e10 | 2011-01-25 21:01:34 +0000 | [diff] [blame] | 40 | return NULL; |
| 41 | } |
| 42 | |
reed@android.com | 2a645c9 | 2009-09-27 20:41:46 +0000 | [diff] [blame] | 43 | void SkFontHost::FilterRec(SkScalerContext::Rec* rec) { |
| 44 | } |
| 45 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 46 | /////////////////////////////////////////////////////////////////////////////// |
| 47 | |
reed@android.com | b1d9d2e | 2009-03-04 17:37:51 +0000 | [diff] [blame] | 48 | bool SkFontHost::ValidFontID(uint32_t uniqueID) { |
| 49 | SkASSERT(!"SkFontHost::ResolveTypeface unimplemented"); |
| 50 | return false; |
| 51 | } |
| 52 | |
| 53 | SkStream* SkFontHost::OpenStream(uint32_t uniqueID) { |
| 54 | SkASSERT(!"SkFontHost::OpenStream unimplemented"); |
| 55 | return NULL; |
| 56 | } |
| 57 | |
reed@android.com | ac98154 | 2009-07-31 16:17:01 +0000 | [diff] [blame] | 58 | size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length, |
| 59 | int32_t* index) { |
| 60 | SkDebugf("SkFontHost::GetFileName unimplemented\n"); |
| 61 | return 0; |
| 62 | } |
| 63 | |
reed@android.com | b1d9d2e | 2009-03-04 17:37:51 +0000 | [diff] [blame] | 64 | /////////////////////////////////////////////////////////////////////////////// |
| 65 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 66 | void SkFontHost::Serialize(const SkTypeface* face, SkWStream* stream) { |
| 67 | SkASSERT(!"SkFontHost::Serialize unimplemented"); |
| 68 | } |
| 69 | |
| 70 | SkTypeface* SkFontHost::Deserialize(SkStream* stream) { |
| 71 | SkASSERT(!"SkFontHost::Deserialize unimplemented"); |
| 72 | return NULL; |
| 73 | } |
| 74 | |
| 75 | /////////////////////////////////////////////////////////////////////////////// |
| 76 | |
| 77 | SkScalerContext* SkFontHost::CreateScalerContext(const SkDescriptor* desc) { |
| 78 | SkASSERT(!"SkFontHost::CreateScalarContext unimplemented"); |
| 79 | return NULL; |
| 80 | } |
| 81 | |
reed@android.com | a14ea0e | 2009-03-17 17:59:53 +0000 | [diff] [blame] | 82 | uint32_t SkFontHost::NextLogicalFont(uint32_t fontID) { |
| 83 | return 0; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 84 | } |
| 85 | |
joe.gregorio | acb8fb0 | 2009-01-06 17:02:39 +0000 | [diff] [blame] | 86 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 87 | /////////////////////////////////////////////////////////////////////////////// |
| 88 | |
| 89 | size_t SkFontHost::ShouldPurgeFontCache(size_t sizeAllocatedSoFar) { |
| 90 | return 0; // nothing to do (change me if you want to limit the font cache) |
| 91 | } |
| 92 | |
| 93 | int SkFontHost::ComputeGammaFlag(const SkPaint& paint) { |
| 94 | return 0; |
| 95 | } |
| 96 | |
| 97 | void SkFontHost::GetGammaTables(const uint8_t* tables[2]) { |
| 98 | tables[0] = NULL; // black gamma (e.g. exp=1.4) |
| 99 | tables[1] = NULL; // white gamma (e.g. exp= 1/1.4) |
| 100 | } |
| 101 | |