| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2011 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 paint->setVerticalText(platformData.orientation() == Vertical); | 65 paint->setVerticalText(platformData.orientation() == Vertical); |
| 66 SkTypeface* typeface = SkCreateTypefaceFromCTFont(platformData.ctFont()); | 66 SkTypeface* typeface = SkCreateTypefaceFromCTFont(platformData.ctFont()); |
| 67 SkAutoUnref autoUnref(typeface); | 67 SkAutoUnref autoUnref(typeface); |
| 68 paint->setTypeface(typeface); | 68 paint->setTypeface(typeface); |
| 69 paint->setFakeBoldText(platformData.m_syntheticBold); | 69 paint->setFakeBoldText(platformData.m_syntheticBold); |
| 70 paint->setTextSkewX(platformData.m_syntheticOblique ? -SK_Scalar1 / 4 : 0); | 70 paint->setTextSkewX(platformData.m_syntheticOblique ? -SK_Scalar1 / 4 : 0); |
| 71 paint->setAutohinted(false); // freetype specific | 71 paint->setAutohinted(false); // freetype specific |
| 72 paint->setLCDRenderText(shouldSmoothFonts); | 72 paint->setLCDRenderText(shouldSmoothFonts); |
| 73 paint->setSubpixelText(true); | 73 paint->setSubpixelText(true); |
| 74 | 74 |
| 75 #if OS(DARWIN) | 75 #if OS(MACOSX) |
| 76 // When using CoreGraphics, disable hinting when webkit-font-smoothing:antia
liased is used. | 76 // When using CoreGraphics, disable hinting when webkit-font-smoothing:antia
liased is used. |
| 77 // See crbug.com/152304 | 77 // See crbug.com/152304 |
| 78 if (font->fontDescription().fontSmoothing() == Antialiased) | 78 if (font->fontDescription().fontSmoothing() == Antialiased) |
| 79 paint->setHinting(SkPaint::kNo_Hinting); | 79 paint->setHinting(SkPaint::kNo_Hinting); |
| 80 #endif | 80 #endif |
| 81 | 81 |
| 82 if (font->fontDescription().textRenderingMode() == GeometricPrecision) | 82 if (font->fontDescription().textRenderingMode() == GeometricPrecision) |
| 83 paint->setHinting(SkPaint::kNo_Hinting); | 83 paint->setHinting(SkPaint::kNo_Hinting); |
| 84 } | 84 } |
| 85 | 85 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 paint.setLooper(0); | 173 paint.setLooper(0); |
| 174 } | 174 } |
| 175 | 175 |
| 176 gc->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, textRect, pai
nt); | 176 gc->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, textRect, pai
nt); |
| 177 } | 177 } |
| 178 if (font->platformData().orientation() == Vertical) | 178 if (font->platformData().orientation() == Vertical) |
| 179 gc->restore(); | 179 gc->restore(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace WebCore | 182 } // namespace WebCore |
| OLD | NEW |