Misaligned lineThrough with italic font style on iOS and macOS
- Dominant language
- Dart
- Stars
- 179k
- Forks
- 31.1k
- PR merge metrics
- PR metrics pending
Description
Linked issue: https://github.com/fleather-editor/fleather/issues/467
### Steps to reproduce
1. Run the sample code on iOS/macOS
### Expected results
The line should be vertically aligned and match with the normal font style's line.
### Actual results
The line is misaligned and does not match with the normal font style's line.
### Code sample
Code sample
```dart
import 'package:flutter/material.dart';
void main() {
runApp(const App());
}
class App extends StatelessWidget {
const App({super.key});
@override
Widget build(BuildContext context) => MaterialApp(
theme: ThemeData.light(),
home: Scaffold(
appBar: AppBar(title: Text('Flutter')),
body: Center(
child: RichText(
text: TextSpan(
text: 'Normal Text',
style: TextStyle(
decoration: TextDecoration.lineThrough,
color: Colors.black,
),
children: [
TextSpan(
text: 'Italic Text',
style: TextStyle(fontStyle: FontStyle.italic),
)
]),
),
),
),
);
}
```
### Screenshots or Video
Screenshots / Video demonstration

*macOS, iOS, Android and Web from left to right*
### Flutter Doctor output
Doctor output
```console
[✓] Flutter (Channel stable, 3.29.1, on macOS 15.3.1 24D70 darwin-arm64, locale
en-US) [4.6s]
• Flutter version 3.29.1 on channel stable at
/Users/amirpanahandeh/fvm/versions/3.29.1
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 09de023485 (3 weeks ago), 2025-02-28 13:44:05 -0800
• Engine revision 871f65ac1b
• Dart version 3.7.0
• DevTools version 2.42.2
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[10.8s]
• Android SDK at /SDK
• Platform android-35, build-tools 35.0.0
• ANDROID_HOME = /SDK
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on
this machine.
To manually set the JDK path, use: `flutter config
--jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build
17.0.11+0-17.0.11b1207.24-11852314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.2) [4.7s]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16C5032a
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [19ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.1) [18ms]
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
17.0.11+0-17.0.11b1207.24-11852314)
[✓] VS Code (version 1.98.2) [15ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.106.0
[✓] Connected device (3 available) [18.6s]
• macOS (desktop) • macos • darwin-arm64 •
macOS 15.3.1 24D70 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin •
macOS 15.3.1 24D70 darwin-arm64
• Chrome (web) • chrome • web-javascript •
Google Chrome 134.0.6998.118
! Error: Browsing on the local area network for iPhone. Ensure the device is
unlocked and attached with a cable or associated with the same local area
network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code
-27)
[✓] Network resources [10.8s]
• All expected network resources are available.
• No issues found!
```
Contributor guide
Assessment
This issue has not been assessed yet.