OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2006, 2007, 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2006, 2007, 2008, 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 HarfBuzzFace* FontPlatformData::harfBuzzFace() const | 250 HarfBuzzFace* FontPlatformData::harfBuzzFace() const |
251 { | 251 { |
252 if (!m_harfBuzzFace) | 252 if (!m_harfBuzzFace) |
253 m_harfBuzzFace = HarfBuzzFace::create(const_cast<FontPlatformData*>(this
), uniqueID()); | 253 m_harfBuzzFace = HarfBuzzFace::create(const_cast<FontPlatformData*>(this
), uniqueID()); |
254 | 254 |
255 return m_harfBuzzFace.get(); | 255 return m_harfBuzzFace.get(); |
256 } | 256 } |
257 | 257 |
258 void FontPlatformData::getRenderStyleForStrike(const char* font, int sizeAndStyl
e) | 258 void FontPlatformData::getRenderStyleForStrike(const char* font, int sizeAndStyl
e) |
259 { | 259 { |
260 WebKit::WebFontRenderStyle style; | 260 blink::WebFontRenderStyle style; |
261 | 261 |
262 #if OS(ANDROID) | 262 #if OS(ANDROID) |
263 style.setDefaults(); | 263 style.setDefaults(); |
264 #else | 264 #else |
265 if (!font || !*font) | 265 if (!font || !*font) |
266 style.setDefaults(); // It's probably a webfont. Take the system default
s. | 266 style.setDefaults(); // It's probably a webfont. Take the system default
s. |
267 else if (WebKit::Platform::current()->sandboxSupport()) | 267 else if (blink::Platform::current()->sandboxSupport()) |
268 WebKit::Platform::current()->sandboxSupport()->getRenderStyleForStrike(f
ont, sizeAndStyle, &style); | 268 blink::Platform::current()->sandboxSupport()->getRenderStyleForStrike(fo
nt, sizeAndStyle, &style); |
269 else | 269 else |
270 WebKit::WebFontInfo::renderStyleForStrike(font, sizeAndStyle, &style); | 270 blink::WebFontInfo::renderStyleForStrike(font, sizeAndStyle, &style); |
271 #endif | 271 #endif |
272 | 272 |
273 style.toFontRenderStyle(&m_style); | 273 style.toFontRenderStyle(&m_style); |
274 } | 274 } |
275 | 275 |
276 void FontPlatformData::querySystemForRenderStyle() | 276 void FontPlatformData::querySystemForRenderStyle() |
277 { | 277 { |
278 getRenderStyleForStrike(m_family.data(), (((int)m_textSize) << 2) | (m_typef
ace->style() & 3)); | 278 getRenderStyleForStrike(m_family.data(), (((int)m_textSize) << 2) | (m_typef
ace->style() & 3)); |
279 | 279 |
280 // Fix FontRenderStyle::NoPreference to actual styles. | 280 // Fix FontRenderStyle::NoPreference to actual styles. |
(...skipping 11 matching lines...) Expand all Loading... |
292 m_style.useAutoHint = useSkiaAutoHint; | 292 m_style.useAutoHint = useSkiaAutoHint; |
293 if (m_style.useSubpixelPositioning == FontRenderStyle::NoPreference) | 293 if (m_style.useSubpixelPositioning == FontRenderStyle::NoPreference) |
294 m_style.useSubpixelPositioning = useSkiaSubpixelPositioning; | 294 m_style.useSubpixelPositioning = useSkiaSubpixelPositioning; |
295 if (m_style.useAntiAlias == FontRenderStyle::NoPreference) | 295 if (m_style.useAntiAlias == FontRenderStyle::NoPreference) |
296 m_style.useAntiAlias = useSkiaAntiAlias; | 296 m_style.useAntiAlias = useSkiaAntiAlias; |
297 if (m_style.useSubpixelRendering == FontRenderStyle::NoPreference) | 297 if (m_style.useSubpixelRendering == FontRenderStyle::NoPreference) |
298 m_style.useSubpixelRendering = useSkiaSubpixelRendering; | 298 m_style.useSubpixelRendering = useSkiaSubpixelRendering; |
299 } | 299 } |
300 | 300 |
301 } // namespace WebCore | 301 } // namespace WebCore |
OLD | NEW |