Home | History | Annotate | Download | only in ports
      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 
     18 SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
     19                                      const char famillyName[],
     20                                      const void* data, size_t bytelength,
     21                                      SkTypeface::Style style) {
     22     SkASSERT(!"SkFontHost::FindTypeface unimplemented");
     23     return NULL;
     24 }
     25 
     26 SkTypeface* SkFontHost::CreateTypefaceFromStream(SkStream*) {
     27     SkASSERT(!"SkFontHost::CreateTypeface unimplemented");
     28     return NULL;
     29 }
     30 
     31 SkTypeface* SkFontHost::CreateTypefaceFromFile(char const*) {
     32     SkASSERT(!"SkFontHost::CreateTypefaceFromFile unimplemented");
     33     return NULL;
     34 }
     35 
     36 // static
     37 SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics(
     38         uint32_t fontID,
     39         SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo) {
     40     SkASSERT(!"SkFontHost::GetAdvancedTypefaceMetrics unimplemented");
     41     return NULL;
     42 }
     43 
     44 void SkFontHost::FilterRec(SkScalerContext::Rec* rec) {
     45 }
     46 
     47 ///////////////////////////////////////////////////////////////////////////////
     48 
     49 bool SkFontHost::ValidFontID(uint32_t uniqueID) {
     50     SkASSERT(!"SkFontHost::ResolveTypeface unimplemented");
     51     return false;
     52 }
     53 
     54 SkStream* SkFontHost::OpenStream(uint32_t uniqueID) {
     55     SkASSERT(!"SkFontHost::OpenStream unimplemented");
     56     return NULL;
     57 }
     58 
     59 size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
     60                                int32_t* index) {
     61     SkDebugf("SkFontHost::GetFileName unimplemented\n");
     62     return 0;
     63 }
     64 
     65 ///////////////////////////////////////////////////////////////////////////////
     66 
     67 void SkFontHost::Serialize(const SkTypeface* face, SkWStream* stream) {
     68     SkASSERT(!"SkFontHost::Serialize unimplemented");
     69 }
     70 
     71 SkTypeface* SkFontHost::Deserialize(SkStream* stream) {
     72     SkASSERT(!"SkFontHost::Deserialize unimplemented");
     73     return NULL;
     74 }
     75 
     76 ///////////////////////////////////////////////////////////////////////////////
     77 
     78 SkScalerContext* SkFontHost::CreateScalerContext(const SkDescriptor* desc) {
     79     SkASSERT(!"SkFontHost::CreateScalarContext unimplemented");
     80     return NULL;
     81 }
     82 
     83 SkFontID SkFontHost::NextLogicalFont(SkFontID currFontID, SkFontID origFontID) {
     84     return 0;
     85 }
     86 
     87 
     88 ///////////////////////////////////////////////////////////////////////////////
     89 
     90 size_t SkFontHost::ShouldPurgeFontCache(size_t sizeAllocatedSoFar) {
     91     return 0;   // nothing to do (change me if you want to limit the font cache)
     92 }
     93 
     94 int SkFontHost::ComputeGammaFlag(const SkPaint& paint) {
     95     return 0;
     96 }
     97 
     98 void SkFontHost::GetGammaTables(const uint8_t* tables[2]) {
     99     tables[0] = NULL;   // black gamma (e.g. exp=1.4)
    100     tables[1] = NULL;   // white gamma (e.g. exp= 1/1.4)
    101 }
    102 
    103