Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: sky/sdk/lib/painting/text_style.dart

Issue 1189483007: Pared the FontWeight constants down to normal and bold. Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'dart:sky'; 5 import 'dart:sky';
6 6
7 enum FontWeight { 7 enum FontWeight {
8 w100, 8 w100,
9 w200, 9 w200,
10 w300, 10 w300,
11 w400, 11 w400,
12 w500, 12 w500,
13 w600, 13 w600,
14 w700, 14 w700,
15 w800, 15 w800,
16 w900 16 w900
17 } 17 }
18 18
19 const thin = FontWeight.w100;
20 const extraLight = FontWeight.w200;
21 const light = FontWeight.w300;
22 const normal = FontWeight.w400; 19 const normal = FontWeight.w400;
23 const medium = FontWeight.w500;
24 const semiBold = FontWeight.w600;
25 const bold = FontWeight.w700; 20 const bold = FontWeight.w700;
26 const extraBold = FontWeight.w800;
27 const black = FontWeight.w900;
28 21
29 enum TextAlign { 22 enum TextAlign {
30 left, 23 left,
31 right, 24 right,
32 center 25 center
33 } 26 }
34 27
35 class TextStyle { 28 class TextStyle {
36 const TextStyle({ 29 const TextStyle({
37 this.color, 30 this.color,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 result.add('${prefix}fontSize: $fontSize'); 119 result.add('${prefix}fontSize: $fontSize');
127 if (fontWeight != null) 120 if (fontWeight != null)
128 result.add('${prefix}fontWeight: $fontWeight'); 121 result.add('${prefix}fontWeight: $fontWeight');
129 if (textAlign != null) 122 if (textAlign != null)
130 result.add('${prefix}textAlign: $textAlign'); 123 result.add('${prefix}textAlign: $textAlign');
131 if (result.isEmpty) 124 if (result.isEmpty)
132 return '${prefix}<no style specified>'; 125 return '${prefix}<no style specified>';
133 return result.join('\n'); 126 return result.join('\n');
134 } 127 }
135 } 128 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698