OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "FontPlatformData.h" | 6 #include "FontPlatformData.h" |
7 | 7 |
8 #include "SkPaint.h" | 8 #include "SkPaint.h" |
9 #include "SkTypeface.h" | 9 #include "SkTypeface.h" |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 m_fakeBold = src.m_fakeBold; | 51 m_fakeBold = src.m_fakeBold; |
52 m_fakeItalic = src.m_fakeItalic; | 52 m_fakeItalic = src.m_fakeItalic; |
53 | 53 |
54 return *this; | 54 return *this; |
55 } | 55 } |
56 | 56 |
57 void FontPlatformData::setupPaint(SkPaint* paint) const | 57 void FontPlatformData::setupPaint(SkPaint* paint) const |
58 { | 58 { |
59 const float ts = m_textSize > 0 ? m_textSize : 12; | 59 const float ts = m_textSize > 0 ? m_textSize : 12; |
60 | 60 |
61 paint->setAntiAlias(true); | 61 paint->setAntiAlias(false); |
62 paint->setSubpixelText(false); | 62 paint->setSubpixelText(false); |
63 paint->setTextSize(SkFloatToScalar(ts)); | 63 paint->setTextSize(SkFloatToScalar(ts)); |
64 paint->setTypeface(m_typeface); | 64 paint->setTypeface(m_typeface); |
65 paint->setFakeBoldText(m_fakeBold); | 65 paint->setFakeBoldText(m_fakeBold); |
66 paint->setTextSkewX(m_fakeItalic ? -SK_Scalar1/4 : 0); | 66 paint->setTextSkewX(m_fakeItalic ? -SK_Scalar1/4 : 0); |
67 paint->setTextEncoding(SkPaint::kUTF16_TextEncoding); | 67 paint->setTextEncoding(SkPaint::kUTF16_TextEncoding); |
68 } | 68 } |
69 | 69 |
70 bool FontPlatformData::operator==(const FontPlatformData& a) const | 70 bool FontPlatformData::operator==(const FontPlatformData& a) const |
71 { | 71 { |
(...skipping 28 matching lines...) Expand all Loading... |
100 return h; | 100 return h; |
101 } | 101 } |
102 | 102 |
103 bool FontPlatformData::isFixedPitch() const | 103 bool FontPlatformData::isFixedPitch() const |
104 { | 104 { |
105 notImplemented(); | 105 notImplemented(); |
106 return false; | 106 return false; |
107 } | 107 } |
108 | 108 |
109 } // namespace WebCore | 109 } // namespace WebCore |
OLD | NEW |