| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Nicholas Shanks <contact@nickshanks.com> | 2 * Copyright (C) 2007 Nicholas Shanks <contact@nickshanks.com> |
| 3 * Copyright (C) 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008 Apple 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 } | 124 } |
| 125 | 125 |
| 126 static const AtomicString& defaultLocale() | 126 static const AtomicString& defaultLocale() |
| 127 { | 127 { |
| 128 DEFINE_STATIC_LOCAL(AtomicString, locale, ()); | 128 DEFINE_STATIC_LOCAL(AtomicString, locale, ()); |
| 129 if (locale.isNull()) | 129 if (locale.isNull()) |
| 130 locale = AtomicString("en"); | 130 locale = AtomicString("en"); |
| 131 return locale; | 131 return locale; |
| 132 } | 132 } |
| 133 | 133 |
| 134 const AtomicString& FontDescription::locale() const | 134 const AtomicString& FontDescription::locale(bool includeDefault) const |
| 135 { | 135 { |
| 136 if (m_locale.isNull()) | 136 if (m_locale.isNull() && includeDefault) |
| 137 return defaultLocale(); | 137 return defaultLocale(); |
| 138 return m_locale; | 138 return m_locale; |
| 139 } | 139 } |
| 140 | 140 |
| 141 void FontDescription::setTraits(FontTraits traits) | 141 void FontDescription::setTraits(FontTraits traits) |
| 142 { | 142 { |
| 143 setStyle(traits.style()); | 143 setStyle(traits.style()); |
| 144 setVariant(traits.variant()); | 144 setVariant(traits.variant()); |
| 145 setWeight(traits.weight()); | 145 setWeight(traits.weight()); |
| 146 setStretch(traits.stretch()); | 146 setStretch(traits.stretch()); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 234 |
| 235 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesSt
ate | 235 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesSt
ate |
| 236 || historicalLigaturesState() == FontDescription::EnabledLigaturesSt
ate | 236 || historicalLigaturesState() == FontDescription::EnabledLigaturesSt
ate |
| 237 || contextualLigaturesState() == FontDescription::EnabledLigaturesSt
ate) { | 237 || contextualLigaturesState() == FontDescription::EnabledLigaturesSt
ate) { |
| 238 m_typesettingFeatures |= blink::Ligatures; | 238 m_typesettingFeatures |= blink::Ligatures; |
| 239 } | 239 } |
| 240 } | 240 } |
| 241 } | 241 } |
| 242 | 242 |
| 243 } // namespace blink | 243 } // namespace blink |
| OLD | NEW |