| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov | 3 * Copyright (C) 2006 Alexey Proskuryakov |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #include "config.h" | 30 #include "config.h" |
| 31 #include "platform/fonts/SimpleFontData.h" | 31 #include "platform/fonts/SimpleFontData.h" |
| 32 | 32 |
| 33 #include "wtf/MathExtras.h" | 33 #include "wtf/MathExtras.h" |
| 34 | 34 |
| 35 using namespace std; | 35 using namespace std; |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace blink { |
| 38 | 38 |
| 39 const float smallCapsFontSizeMultiplier = 0.7f; | 39 const float smallCapsFontSizeMultiplier = 0.7f; |
| 40 const float emphasisMarkFontSizeMultiplier = 0.5f; | 40 const float emphasisMarkFontSizeMultiplier = 0.5f; |
| 41 | 41 |
| 42 SimpleFontData::SimpleFontData(const FontPlatformData& platformData, PassRefPtr<
CustomFontData> customData, bool isTextOrientationFallback) | 42 SimpleFontData::SimpleFontData(const FontPlatformData& platformData, PassRefPtr<
CustomFontData> customData, bool isTextOrientationFallback) |
| 43 : m_maxCharWidth(-1) | 43 : m_maxCharWidth(-1) |
| 44 , m_avgCharWidth(-1) | 44 , m_avgCharWidth(-1) |
| 45 , m_platformData(platformData) | 45 , m_platformData(platformData) |
| 46 , m_treatAsFixedPitch(false) | 46 , m_treatAsFixedPitch(false) |
| 47 , m_isTextOrientationFallback(isTextOrientationFallback) | 47 , m_isTextOrientationFallback(isTextOrientationFallback) |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 PassRefPtr<SimpleFontData> SimpleFontData::createScaledFontData(const FontDescri
ption& fontDescription, float scaleFactor) const | 257 PassRefPtr<SimpleFontData> SimpleFontData::createScaledFontData(const FontDescri
ption& fontDescription, float scaleFactor) const |
| 258 { | 258 { |
| 259 // FIXME: Support scaled SVG fonts. Given that SVG is scalable in general th
is should be achievable. | 259 // FIXME: Support scaled SVG fonts. Given that SVG is scalable in general th
is should be achievable. |
| 260 if (isSVGFont()) | 260 if (isSVGFont()) |
| 261 return nullptr; | 261 return nullptr; |
| 262 | 262 |
| 263 return platformCreateScaledFontData(fontDescription, scaleFactor); | 263 return platformCreateScaledFontData(fontDescription, scaleFactor); |
| 264 } | 264 } |
| 265 | 265 |
| 266 } // namespace WebCore | 266 } // namespace blink |
| OLD | NEW |