| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "WebFontRendering.h" | 32 #include "WebFontRendering.h" |
| 33 | 33 |
| 34 #include "core/platform/graphics/FontPlatformData.h" | 34 #include "core/platform/graphics/FontPlatformData.h" |
| 35 | 35 |
| 36 #if OS(LINUX) && !OS(ANDROID) | 36 #if OS(LINUX) |
| 37 #include "WebFontInfo.h" | 37 #include "WebFontInfo.h" |
| 38 #endif | 38 #endif |
| 39 | 39 |
| 40 using WebCore::FontPlatformData; | 40 using WebCore::FontPlatformData; |
| 41 | 41 |
| 42 namespace WebKit { | 42 namespace WebKit { |
| 43 | 43 |
| 44 // static | 44 // static |
| 45 void WebFontRendering::setHinting(SkPaint::Hinting hinting) | 45 void WebFontRendering::setHinting(SkPaint::Hinting hinting) |
| 46 { | 46 { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 68 // static | 68 // static |
| 69 void WebFontRendering::setSubpixelRendering(bool useSubpixelRendering) | 69 void WebFontRendering::setSubpixelRendering(bool useSubpixelRendering) |
| 70 { | 70 { |
| 71 FontPlatformData::setSubpixelRendering(useSubpixelRendering); | 71 FontPlatformData::setSubpixelRendering(useSubpixelRendering); |
| 72 } | 72 } |
| 73 | 73 |
| 74 // static | 74 // static |
| 75 void WebFontRendering::setSubpixelPositioning(bool useSubpixelPositioning) | 75 void WebFontRendering::setSubpixelPositioning(bool useSubpixelPositioning) |
| 76 { | 76 { |
| 77 FontPlatformData::setSubpixelPositioning(useSubpixelPositioning); | 77 FontPlatformData::setSubpixelPositioning(useSubpixelPositioning); |
| 78 #if OS(LINUX) && !OS(ANDROID) | 78 #if OS(LINUX) |
| 79 WebFontInfo::setSubpixelPositioning(useSubpixelPositioning); | 79 WebFontInfo::setSubpixelPositioning(useSubpixelPositioning); |
| 80 #endif | 80 #endif |
| 81 } | 81 } |
| 82 | 82 |
| 83 // static | 83 // static |
| 84 void WebFontRendering::setLCDOrder(SkFontHost::LCDOrder order) | 84 void WebFontRendering::setLCDOrder(SkFontHost::LCDOrder order) |
| 85 { | 85 { |
| 86 SkFontHost::SetSubpixelOrder(order); | 86 SkFontHost::SetSubpixelOrder(order); |
| 87 } | 87 } |
| 88 | 88 |
| 89 // static | 89 // static |
| 90 void WebFontRendering::setLCDOrientation(SkFontHost::LCDOrientation orientation) | 90 void WebFontRendering::setLCDOrientation(SkFontHost::LCDOrientation orientation) |
| 91 { | 91 { |
| 92 SkFontHost::SetSubpixelOrientation(orientation); | 92 SkFontHost::SetSubpixelOrientation(orientation); |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace WebKit | 95 } // namespace WebKit |
| OLD | NEW |