| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkFontHost_DEFINED | 10 #ifndef SkFontHost_DEFINED |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 * stored in the typeface of the caller. It is provided as an aid to choose | 113 * stored in the typeface of the caller. It is provided as an aid to choose |
| 114 * the best next logical font. e.g. If the original font was bold or serif, | 114 * the best next logical font. e.g. If the original font was bold or serif, |
| 115 * but the 2nd in the logical chain was plain, then a subsequent call to | 115 * but the 2nd in the logical chain was plain, then a subsequent call to |
| 116 * get the 3rd can still inspect the original, and try to match its | 116 * get the 3rd can still inspect the original, and try to match its |
| 117 * stylistic attributes. | 117 * stylistic attributes. |
| 118 */ | 118 */ |
| 119 static SkTypeface* NextLogicalTypeface(SkFontID currFontID, SkFontID origFon
tID); | 119 static SkTypeface* NextLogicalTypeface(SkFontID currFontID, SkFontID origFon
tID); |
| 120 | 120 |
| 121 private: | 121 private: |
| 122 | 122 |
| 123 /** Return a new stream to read the font data, or null if the uniqueID does | |
| 124 not match an existing typeface. .The caller must call stream->unref() | |
| 125 when it is finished reading the data. | |
| 126 */ | |
| 127 static SkStream* OpenStream(SkFontID uniqueID); | |
| 128 | |
| 129 /** Return a new, closest matching typeface given either an existing family | 123 /** Return a new, closest matching typeface given either an existing family |
| 130 (specified by a typeface in that family) or by a familyName and a | 124 (specified by a typeface in that family) or by a familyName and a |
| 131 requested style. | 125 requested style. |
| 132 1) If familyFace is null, use familyName. | 126 1) If familyFace is null, use familyName. |
| 133 2) If familyName is null, use data (UTF-16 to cover). | 127 2) If familyName is null, use data (UTF-16 to cover). |
| 134 3) If all are null, return the default font that best matches style | 128 3) If all are null, return the default font that best matches style |
| 135 */ | 129 */ |
| 136 static SkTypeface* CreateTypeface(const SkTypeface* familyFace, | 130 static SkTypeface* CreateTypeface(const SkTypeface* familyFace, |
| 137 const char familyName[], | 131 const char familyName[], |
| 138 SkTypeface::Style style); | 132 SkTypeface::Style style); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 SkFontDescriptor. | 166 SkFontDescriptor. |
| 173 */ | 167 */ |
| 174 static SkTypeface* Deserialize(SkStream*); | 168 static SkTypeface* Deserialize(SkStream*); |
| 175 | 169 |
| 176 /////////////////////////////////////////////////////////////////////////// | 170 /////////////////////////////////////////////////////////////////////////// |
| 177 | 171 |
| 178 friend class SkTypeface; | 172 friend class SkTypeface; |
| 179 }; | 173 }; |
| 180 | 174 |
| 181 #endif | 175 #endif |
| OLD | NEW |