| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 #ifndef SkTypeface_DEFINED | 8 #ifndef SkTypeface_DEFINED |
| 9 #define SkTypeface_DEFINED | 9 #define SkTypeface_DEFINED |
| 10 | 10 |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 kNo_PerGlyphInfo = 0x0, // Don't populate any per glyph info. | 334 kNo_PerGlyphInfo = 0x0, // Don't populate any per glyph info. |
| 335 kHAdvance_PerGlyphInfo = 0x1, // Populate horizontal advance data. | 335 kHAdvance_PerGlyphInfo = 0x1, // Populate horizontal advance data. |
| 336 kVAdvance_PerGlyphInfo = 0x2, // Populate vertical advance data. | 336 kVAdvance_PerGlyphInfo = 0x2, // Populate vertical advance data. |
| 337 kGlyphNames_PerGlyphInfo = 0x4, // Populate glyph names (Type 1 only). | 337 kGlyphNames_PerGlyphInfo = 0x4, // Populate glyph names (Type 1 only). |
| 338 kToUnicode_PerGlyphInfo = 0x8 // Populate ToUnicode table, ignored | 338 kToUnicode_PerGlyphInfo = 0x8 // Populate ToUnicode table, ignored |
| 339 // for Type 1 fonts | 339 // for Type 1 fonts |
| 340 }; | 340 }; |
| 341 | 341 |
| 342 /** uniqueID must be unique and non-zero | 342 /** uniqueID must be unique and non-zero |
| 343 */ | 343 */ |
| 344 SkTypeface(const SkFontStyle& style, SkFontID uniqueID, bool isFixedPitch =
false); | 344 SkTypeface(const SkFontStyle& style, bool isFixedPitch = false); |
| 345 virtual ~SkTypeface(); | 345 virtual ~SkTypeface(); |
| 346 | 346 |
| 347 /** Sets the fixedPitch bit. If used, must be called in the constructor. */ | 347 /** Sets the fixedPitch bit. If used, must be called in the constructor. */ |
| 348 void setIsFixedPitch(bool isFixedPitch) { fIsFixedPitch = isFixedPitch; } | 348 void setIsFixedPitch(bool isFixedPitch) { fIsFixedPitch = isFixedPitch; } |
| 349 | 349 |
| 350 friend class SkScalerContext; | 350 friend class SkScalerContext; |
| 351 static SkTypeface* GetDefaultTypeface(Style style = SkTypeface::kNormal); | 351 static SkTypeface* GetDefaultTypeface(Style style = SkTypeface::kNormal); |
| 352 | 352 |
| 353 virtual SkScalerContext* onCreateScalerContext(const SkScalerContextEffects&
, | 353 virtual SkScalerContext* onCreateScalerContext(const SkScalerContextEffects&
, |
| 354 const SkDescriptor*) const =
0; | 354 const SkDescriptor*) const =
0; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 mutable SkOnce fBoundsOnce; | 416 mutable SkOnce fBoundsOnce; |
| 417 bool fIsFixedPitch; | 417 bool fIsFixedPitch; |
| 418 | 418 |
| 419 friend class SkPaint; | 419 friend class SkPaint; |
| 420 friend class SkGlyphCache; // GetDefaultTypeface | 420 friend class SkGlyphCache; // GetDefaultTypeface |
| 421 | 421 |
| 422 typedef SkWeakRefCnt INHERITED; | 422 typedef SkWeakRefCnt INHERITED; |
| 423 }; | 423 }; |
| 424 | 424 |
| 425 #endif | 425 #endif |
| OLD | NEW |