Add TextStyle fontFamily:, extend support for fontWeight:

Defined constants for all 9 CSS font-weight values
with conventional names from the "Common weight
name mapping" section of
https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight.

The FontWeight enum now just enumerates the actual
CSS weight values.

I've moved the TextStyle class into its own file.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1173323004.
This commit is contained in:
Hans Muller
2015-06-17 15:48:21 -07:00
parent 6bec75ad2b
commit 5c961fffb5
3 changed files with 3 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ import 'dart:sky';
import 'dart:math' as math;
import 'package:sky/framework/net/image_cache.dart' as image_cache;
import 'package:sky/app/view.dart';
import 'package:sky/painting/text_style.dart';
import 'package:sky/rendering/box.dart';
import 'package:sky/rendering/block.dart';
import 'package:sky/rendering/flex.dart';

View File

@@ -4,6 +4,7 @@
import 'dart:sky';
import 'package:sky/app/view.dart';
import 'package:sky/painting/text_style.dart';
import 'package:sky/rendering/box.dart';
import 'package:sky/rendering/object.dart';
import 'package:sky/rendering/flex.dart';

View File

@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/painting/text_style.dart';
import 'package:sky/rendering/box.dart';
import 'package:sky/theme2/typography.dart' as typography;
import 'package:sky/widgets/ink_well.dart';
import 'package:sky/widgets/basic.dart';
import 'package:sky/rendering/paragraph.dart';
import 'stock_arrow.dart';
import 'stock_data.dart';