| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 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 "SkFontDescriptor.h" | 8 #include "SkFontDescriptor.h" |
| 9 #include "SkStream.h" | 9 #include "SkStream.h" |
| 10 #include <SkData.h> | 10 #include "SkData.h" |
| 11 | 11 |
| 12 enum { | 12 enum { |
| 13 // these must match the sfnt 'name' enums | 13 // these must match the sfnt 'name' enums |
| 14 kFontFamilyName = 0x01, | 14 kFontFamilyName = 0x01, |
| 15 kFullName = 0x04, | 15 kFullName = 0x04, |
| 16 kPostscriptName = 0x06, | 16 kPostscriptName = 0x06, |
| 17 | 17 |
| 18 // These count backwards from 0xFF, so as not to collide with the SFNT | 18 // These count backwards from 0xFF, so as not to collide with the SFNT |
| 19 // defines for names in its 'name' table. | 19 // defines for names in its 'name' table. |
| 20 kFontIndex = 0xFD, | 20 kFontIndex = 0xFD, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 stream->writePackedUInt(kSentinel); | 99 stream->writePackedUInt(kSentinel); |
| 100 | 100 |
| 101 if (fFontData) { | 101 if (fFontData) { |
| 102 size_t length = fFontData->getLength(); | 102 size_t length = fFontData->getLength(); |
| 103 stream->writePackedUInt(length); | 103 stream->writePackedUInt(length); |
| 104 stream->writeStream(fFontData, length); | 104 stream->writeStream(fFontData, length); |
| 105 } else { | 105 } else { |
| 106 stream->writePackedUInt(0); | 106 stream->writePackedUInt(0); |
| 107 } | 107 } |
| 108 } | 108 } |
| OLD | NEW |