| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the internal font implementation. | 2 * This file is part of the internal font implementation. |
| 3 * | 3 * |
| 4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2007-2008 Torch Mobile, Inc. | 5 * Copyright (C) 2007-2008 Torch Mobile, Inc. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 class FontDescription; | 50 class FontDescription; |
| 51 class SharedBuffer; | 51 class SharedBuffer; |
| 52 struct WidthIterator; | 52 struct WidthIterator; |
| 53 | 53 |
| 54 enum FontDataVariant { AutoVariant, NormalVariant, SmallCapsVariant, EmphasisMar
kVariant, BrokenIdeographVariant }; | 54 enum FontDataVariant { AutoVariant, NormalVariant, SmallCapsVariant, EmphasisMar
kVariant, BrokenIdeographVariant }; |
| 55 enum Pitch { UnknownPitch, FixedPitch, VariablePitch }; | 55 enum Pitch { UnknownPitch, FixedPitch, VariablePitch }; |
| 56 | 56 |
| 57 class PLATFORM_EXPORT SimpleFontData : public FontData { | 57 class PLATFORM_EXPORT SimpleFontData : public FontData { |
| 58 public: | 58 public: |
| 59 // Used to create platform fonts. | 59 // Used to create platform fonts. |
| 60 static PassRefPtr<SimpleFontData> create(const FontPlatformData& platformDat
a, PassRefPtr<CustomFontData> customData = 0, bool isTextOrientationFallback = f
alse) | 60 static PassRefPtr<SimpleFontData> create(const FontPlatformData& platformDat
a, PassRefPtr<CustomFontData> customData = nullptr, bool isTextOrientationFallba
ck = false) |
| 61 { | 61 { |
| 62 return adoptRef(new SimpleFontData(platformData, customData, isTextOrien
tationFallback)); | 62 return adoptRef(new SimpleFontData(platformData, customData, isTextOrien
tationFallback)); |
| 63 } | 63 } |
| 64 | 64 |
| 65 // Used to create SVG Fonts. | 65 // Used to create SVG Fonts. |
| 66 static PassRefPtr<SimpleFontData> create(PassRefPtr<CustomFontData> customDa
ta, float fontSize, bool syntheticBold, bool syntheticItalic) | 66 static PassRefPtr<SimpleFontData> create(PassRefPtr<CustomFontData> customDa
ta, float fontSize, bool syntheticBold, bool syntheticItalic) |
| 67 { | 67 { |
| 68 return adoptRef(new SimpleFontData(customData, fontSize, syntheticBold,
syntheticItalic)); | 68 return adoptRef(new SimpleFontData(customData, fontSize, syntheticBold,
syntheticItalic)); |
| 69 } | 69 } |
| 70 | 70 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 #endif | 293 #endif |
| 294 else | 294 else |
| 295 width = platformWidthForGlyph(glyph); | 295 width = platformWidthForGlyph(glyph); |
| 296 | 296 |
| 297 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); | 297 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); |
| 298 return width; | 298 return width; |
| 299 } | 299 } |
| 300 | 300 |
| 301 } // namespace WebCore | 301 } // namespace WebCore |
| 302 #endif // SimpleFontData_h | 302 #endif // SimpleFontData_h |
| OLD | NEW |