OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 0xbfe99999a0000000, // NSFontWeightUltraLight | 50 0xbfe99999a0000000, // NSFontWeightUltraLight |
51 0xbfe3333340000000, // NSFontWeightThin | 51 0xbfe3333340000000, // NSFontWeightThin |
52 0xbfd99999a0000000, // NSFontWeightLight | 52 0xbfd99999a0000000, // NSFontWeightLight |
53 0x0000000000000000, // NSFontWeightRegular | 53 0x0000000000000000, // NSFontWeightRegular |
54 0x3fcd70a3e0000000, // NSFontWeightMedium | 54 0x3fcd70a3e0000000, // NSFontWeightMedium |
55 0x3fd3333340000000, // NSFontWeightSemibold | 55 0x3fd3333340000000, // NSFontWeightSemibold |
56 0x3fd99999a0000000, // NSFontWeightBold | 56 0x3fd99999a0000000, // NSFontWeightBold |
57 0x3fe1eb8520000000, // NSFontWeightHeavy | 57 0x3fe1eb8520000000, // NSFontWeightHeavy |
58 0x3fe3d70a40000000, // NSFontWeightBlack | 58 0x3fe3d70a40000000, // NSFontWeightBlack |
59 }; | 59 }; |
60 ASSERT(fontWeight >= 0 && fontWeight <= 8); | 60 DCHECK_GE(fontWeight, 0); |
| 61 DCHECK_LE(fontWeight, 8); |
61 CGFloat* weight = reinterpret_cast<CGFloat*>(&nsFontWeights[fontWeight]); | 62 CGFloat* weight = reinterpret_cast<CGFloat*>(&nsFontWeights[fontWeight]); |
62 return *weight; | 63 return *weight; |
63 } | 64 } |
64 } | 65 } |
65 | 66 |
66 namespace blink { | 67 namespace blink { |
67 | 68 |
68 const NSFontTraitMask SYNTHESIZED_FONT_TRAITS = | 69 const NSFontTraitMask SYNTHESIZED_FONT_TRAITS = |
69 (NSBoldFontMask | NSItalicFontMask); | 70 (NSBoldFontMask | NSItalicFontMask); |
70 | 71 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 6, // FontWeight500 | 311 6, // FontWeight500 |
311 8, // FontWeight600 | 312 8, // FontWeight600 |
312 9, // FontWeight700 | 313 9, // FontWeight700 |
313 10, // FontWeight800 | 314 10, // FontWeight800 |
314 12, // FontWeight900 | 315 12, // FontWeight900 |
315 }; | 316 }; |
316 return app_kit_font_weights[font_weight]; | 317 return app_kit_font_weights[font_weight]; |
317 } | 318 } |
318 | 319 |
319 } // namespace blink | 320 } // namespace blink |
OLD | NEW |