Unverified Commit 2d9b158f authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Revert "Framework support for font features in text styles (#33230)" (#33444)

This reverts commit 841286d6.
parent 13e9bfcc
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:ui' as ui show ParagraphStyle, TextStyle, StrutStyle, lerpDouble, Shadow, FontFeature; import 'dart:ui' as ui show ParagraphStyle, TextStyle, StrutStyle, lerpDouble, Shadow;
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
...@@ -316,7 +316,6 @@ class TextStyle extends Diagnosticable { ...@@ -316,7 +316,6 @@ class TextStyle extends Diagnosticable {
this.foreground, this.foreground,
this.background, this.background,
this.shadows, this.shadows,
this.fontFeatures,
this.decoration, this.decoration,
this.decorationColor, this.decorationColor,
this.decorationStyle, this.decorationStyle,
...@@ -563,15 +562,6 @@ class TextStyle extends Diagnosticable { ...@@ -563,15 +562,6 @@ class TextStyle extends Diagnosticable {
/// equivalent as order produces differing transparency. /// equivalent as order produces differing transparency.
final List<ui.Shadow> shadows; final List<ui.Shadow> shadows;
/// A list of [FontFeature]s that affect how the font selects glyphs.
///
/// Some fonts support multiple variants of how a given character can be
/// rendered. For example, a font might provide both proportional and
/// tabular numbers, or it might offer versions of the zero digit with
/// and without slashes. [FontFeature]s can be used to select which of
/// these variants will be used for rendering.
final List<ui.FontFeature> fontFeatures;
/// Creates a copy of this text style but with the given fields replaced with /// Creates a copy of this text style but with the given fields replaced with
/// the new values. /// the new values.
/// ///
...@@ -598,7 +588,6 @@ class TextStyle extends Diagnosticable { ...@@ -598,7 +588,6 @@ class TextStyle extends Diagnosticable {
Paint foreground, Paint foreground,
Paint background, Paint background,
List<ui.Shadow> shadows, List<ui.Shadow> shadows,
List<ui.FontFeature> fontFeatures,
TextDecoration decoration, TextDecoration decoration,
Color decorationColor, Color decorationColor,
TextDecorationStyle decorationStyle, TextDecorationStyle decorationStyle,
...@@ -630,7 +619,6 @@ class TextStyle extends Diagnosticable { ...@@ -630,7 +619,6 @@ class TextStyle extends Diagnosticable {
foreground: foreground ?? this.foreground, foreground: foreground ?? this.foreground,
background: background ?? this.background, background: background ?? this.background,
shadows: shadows ?? this.shadows, shadows: shadows ?? this.shadows,
fontFeatures: fontFeatures ?? this.fontFeatures,
decoration: decoration ?? this.decoration, decoration: decoration ?? this.decoration,
decorationColor: decorationColor ?? this.decorationColor, decorationColor: decorationColor ?? this.decorationColor,
decorationStyle: decorationStyle ?? this.decorationStyle, decorationStyle: decorationStyle ?? this.decorationStyle,
...@@ -730,7 +718,6 @@ class TextStyle extends Diagnosticable { ...@@ -730,7 +718,6 @@ class TextStyle extends Diagnosticable {
foreground: foreground, foreground: foreground,
background: background, background: background,
shadows: shadows, shadows: shadows,
fontFeatures: fontFeatures,
decoration: decoration ?? this.decoration, decoration: decoration ?? this.decoration,
decorationColor: decorationColor ?? this.decorationColor, decorationColor: decorationColor ?? this.decorationColor,
decorationStyle: decorationStyle ?? this.decorationStyle, decorationStyle: decorationStyle ?? this.decorationStyle,
...@@ -789,7 +776,6 @@ class TextStyle extends Diagnosticable { ...@@ -789,7 +776,6 @@ class TextStyle extends Diagnosticable {
foreground: other.foreground, foreground: other.foreground,
background: other.background, background: other.background,
shadows: other.shadows, shadows: other.shadows,
fontFeatures: other.fontFeatures,
decoration: other.decoration, decoration: other.decoration,
decorationColor: other.decorationColor, decorationColor: other.decorationColor,
decorationStyle: other.decorationStyle, decorationStyle: other.decorationStyle,
...@@ -843,7 +829,6 @@ class TextStyle extends Diagnosticable { ...@@ -843,7 +829,6 @@ class TextStyle extends Diagnosticable {
background: t < 0.5 ? null : b.background, background: t < 0.5 ? null : b.background,
decoration: t < 0.5 ? null : b.decoration, decoration: t < 0.5 ? null : b.decoration,
shadows: t < 0.5 ? null : b.shadows, shadows: t < 0.5 ? null : b.shadows,
fontFeatures: t < 0.5 ? null : b.fontFeatures,
decorationColor: Color.lerp(null, b.decorationColor, t), decorationColor: Color.lerp(null, b.decorationColor, t),
decorationStyle: t < 0.5 ? null : b.decorationStyle, decorationStyle: t < 0.5 ? null : b.decorationStyle,
decorationThickness: t < 0.5 ? null : b.decorationThickness, decorationThickness: t < 0.5 ? null : b.decorationThickness,
...@@ -869,7 +854,6 @@ class TextStyle extends Diagnosticable { ...@@ -869,7 +854,6 @@ class TextStyle extends Diagnosticable {
foreground: t < 0.5 ? a.foreground : null, foreground: t < 0.5 ? a.foreground : null,
background: t < 0.5 ? a.background : null, background: t < 0.5 ? a.background : null,
shadows: t < 0.5 ? a.shadows : null, shadows: t < 0.5 ? a.shadows : null,
fontFeatures: t < 0.5 ? a.fontFeatures : null,
decoration: t < 0.5 ? a.decoration : null, decoration: t < 0.5 ? a.decoration : null,
decorationColor: Color.lerp(a.decorationColor, null, t), decorationColor: Color.lerp(a.decorationColor, null, t),
decorationStyle: t < 0.5 ? a.decorationStyle : null, decorationStyle: t < 0.5 ? a.decorationStyle : null,
...@@ -903,7 +887,6 @@ class TextStyle extends Diagnosticable { ...@@ -903,7 +887,6 @@ class TextStyle extends Diagnosticable {
: b.background ?? (Paint()..color = b.backgroundColor) : b.background ?? (Paint()..color = b.backgroundColor)
: null, : null,
shadows: t < 0.5 ? a.shadows : b.shadows, shadows: t < 0.5 ? a.shadows : b.shadows,
fontFeatures: t < 0.5 ? a.fontFeatures : b.fontFeatures,
decoration: t < 0.5 ? a.decoration : b.decoration, decoration: t < 0.5 ? a.decoration : b.decoration,
decorationColor: Color.lerp(a.decorationColor, b.decorationColor, t), decorationColor: Color.lerp(a.decorationColor, b.decorationColor, t),
decorationStyle: t < 0.5 ? a.decorationStyle : b.decorationStyle, decorationStyle: t < 0.5 ? a.decorationStyle : b.decorationStyle,
...@@ -936,7 +919,6 @@ class TextStyle extends Diagnosticable { ...@@ -936,7 +919,6 @@ class TextStyle extends Diagnosticable {
: null : null
), ),
shadows: shadows, shadows: shadows,
fontFeatures: fontFeatures,
); );
} }
...@@ -1012,7 +994,6 @@ class TextStyle extends Diagnosticable { ...@@ -1012,7 +994,6 @@ class TextStyle extends Diagnosticable {
foreground != other.foreground || foreground != other.foreground ||
background != other.background || background != other.background ||
!listEquals(shadows, other.shadows) || !listEquals(shadows, other.shadows) ||
!listEquals(fontFeatures, other.fontFeatures) ||
!listEquals(fontFamilyFallback, other.fontFamilyFallback)) !listEquals(fontFamilyFallback, other.fontFamilyFallback))
return RenderComparison.layout; return RenderComparison.layout;
if (color != other.color || if (color != other.color ||
...@@ -1051,7 +1032,6 @@ class TextStyle extends Diagnosticable { ...@@ -1051,7 +1032,6 @@ class TextStyle extends Diagnosticable {
decorationStyle == typedOther.decorationStyle && decorationStyle == typedOther.decorationStyle &&
decorationThickness == typedOther.decorationThickness && decorationThickness == typedOther.decorationThickness &&
listEquals(shadows, typedOther.shadows) && listEquals(shadows, typedOther.shadows) &&
listEquals(fontFeatures, typedOther.fontFeatures) &&
listEquals(fontFamilyFallback, typedOther.fontFamilyFallback); listEquals(fontFamilyFallback, typedOther.fontFamilyFallback);
} }
...@@ -1077,7 +1057,6 @@ class TextStyle extends Diagnosticable { ...@@ -1077,7 +1057,6 @@ class TextStyle extends Diagnosticable {
decorationColor, decorationColor,
decorationStyle, decorationStyle,
shadows, shadows,
fontFeatures,
); );
} }
......
...@@ -719,8 +719,6 @@ class _TextStyleProxy implements TextStyle { ...@@ -719,8 +719,6 @@ class _TextStyleProxy implements TextStyle {
double get wordSpacing => _delegate.wordSpacing; double get wordSpacing => _delegate.wordSpacing;
@override @override
List<Shadow> get shadows => _delegate.shadows; List<Shadow> get shadows => _delegate.shadows;
@override
List<ui.FontFeature> get fontFeatures => _delegate.fontFeatures;
@override @override
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.debug }) => String toString({ DiagnosticLevel minLevel = DiagnosticLevel.debug }) =>
...@@ -783,7 +781,6 @@ class _TextStyleProxy implements TextStyle { ...@@ -783,7 +781,6 @@ class _TextStyleProxy implements TextStyle {
ui.Paint foreground, ui.Paint foreground,
ui.Paint background, ui.Paint background,
List<Shadow> shadows, List<Shadow> shadows,
List<ui.FontFeature> fontFeatures,
TextDecoration decoration, TextDecoration decoration,
Color decorationColor, Color decorationColor,
TextDecorationStyle decorationStyle, TextDecorationStyle decorationStyle,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment