| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Computer, Inc. | 2 * Copyright (C) 2006, 2007 Apple Computer, Inc. |
| 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. | 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. |
| 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } else { | 105 } else { |
| 106 fontManager = SkFontMgr_New_GDI(); | 106 fontManager = SkFontMgr_New_GDI(); |
| 107 // Subpixel text positioning is not supported by the GDI backend. | 107 // Subpixel text positioning is not supported by the GDI backend. |
| 108 s_useSubpixelPositioning = false; | 108 s_useSubpixelPositioning = false; |
| 109 } | 109 } |
| 110 | 110 |
| 111 ASSERT(fontManager); | 111 ASSERT(fontManager); |
| 112 m_fontManager = adoptPtr(fontManager); | 112 m_fontManager = adoptPtr(fontManager); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void FontCache::acceptLanguagesChanged(const String&) | |
| 116 { | |
| 117 // TODO(kojii): Take acceptLanguages into account for ambiguos scripts. | |
| 118 } | |
| 119 | |
| 120 // Given the desired base font, this will create a SimpleFontData for a specific | 115 // Given the desired base font, this will create a SimpleFontData for a specific |
| 121 // font that can be used to render the given range of characters. | 116 // font that can be used to render the given range of characters. |
| 122 PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter( | 117 PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter( |
| 123 const FontDescription& fontDescription, UChar32 character, | 118 const FontDescription& fontDescription, UChar32 character, |
| 124 const SimpleFontData* originalFontData) | 119 const SimpleFontData* originalFontData) |
| 125 { | 120 { |
| 126 // First try the specified font with standard style & weight. | 121 // First try the specified font with standard style & weight. |
| 127 if (fontDescription.style() == FontStyleItalic | 122 if (fontDescription.style() == FontStyleItalic |
| 128 || fontDescription.weight() >= FontWeightBold) { | 123 || fontDescription.weight() >= FontWeightBold) { |
| 129 RefPtr<SimpleFontData> fontData = fallbackOnStandardFontStyle( | 124 RefPtr<SimpleFontData> fontData = fallbackOnStandardFontStyle( |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 if (typefacesMatchesFamily(tf.get(), family)) { | 419 if (typefacesMatchesFamily(tf.get(), family)) { |
| 425 result->setMinSizeForSubpixel(minSizeForSubpixelForFont); | 420 result->setMinSizeForSubpixel(minSizeForSubpixelForFont); |
| 426 break; | 421 break; |
| 427 } | 422 } |
| 428 } | 423 } |
| 429 | 424 |
| 430 return result.release(); | 425 return result.release(); |
| 431 } | 426 } |
| 432 | 427 |
| 433 } // namespace blink | 428 } // namespace blink |
| OLD | NEW |