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 28 matching lines...) Expand all Loading... |
39 struct SameSizeAsFontDescription { | 39 struct SameSizeAsFontDescription { |
40 FontFamily familyList; | 40 FontFamily familyList; |
41 RefPtr<FontFeatureSettings> m_featureSettings; | 41 RefPtr<FontFeatureSettings> m_featureSettings; |
42 String locale; | 42 String locale; |
43 float sizes[4]; | 43 float sizes[4]; |
44 // FXIME: Make them fit into one word. | 44 // FXIME: Make them fit into one word. |
45 uint32_t bitfields; | 45 uint32_t bitfields; |
46 uint32_t bitfields2 : 7; | 46 uint32_t bitfields2 : 7; |
47 }; | 47 }; |
48 | 48 |
49 COMPILE_ASSERT(sizeof(FontDescription) == sizeof(SameSizeAsFontDescription), Fon
tDescription_should_stay_small); | 49 static_assert(sizeof(FontDescription) == sizeof(SameSizeAsFontDescription), "Fon
tDescription should stay small"); |
50 | 50 |
51 TypesettingFeatures FontDescription::s_defaultTypesettingFeatures = 0; | 51 TypesettingFeatures FontDescription::s_defaultTypesettingFeatures = 0; |
52 | 52 |
53 bool FontDescription::s_useSubpixelTextPositioning = false; | 53 bool FontDescription::s_useSubpixelTextPositioning = false; |
54 | 54 |
55 FontWeight FontDescription::lighterWeight(FontWeight weight) | 55 FontWeight FontDescription::lighterWeight(FontWeight weight) |
56 { | 56 { |
57 switch (weight) { | 57 switch (weight) { |
58 case FontWeight100: | 58 case FontWeight100: |
59 case FontWeight200: | 59 case FontWeight200: |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesSt
ate | 219 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesSt
ate |
220 || historicalLigaturesState() == FontDescription::EnabledLigaturesSt
ate | 220 || historicalLigaturesState() == FontDescription::EnabledLigaturesSt
ate |
221 || contextualLigaturesState() == FontDescription::EnabledLigaturesSt
ate) { | 221 || contextualLigaturesState() == FontDescription::EnabledLigaturesSt
ate) { |
222 m_typesettingFeatures |= blink::Ligatures; | 222 m_typesettingFeatures |= blink::Ligatures; |
223 } | 223 } |
224 } | 224 } |
225 } | 225 } |
226 | 226 |
227 } // namespace blink | 227 } // namespace blink |
OLD | NEW |