Problem with underline positioning for Spanish inverted question mark (¿)
- Dominant language
- Dart
- Stars
- 179k
- Forks
- 31.1k
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
**Problem Description**
When underlining text that starts with the Spanish inverted question mark `¿`, the underline is positioned incorrectly in Flutter compared to other tools.
* **Expected Behavior (e.g., Figma)**: The underline is drawn below the `¿` character.
* **Actual Behavior in Flutter**: The underline appears to cut through the `¿` character.
This likely occurs because the `¿` is not properly recognized as a full glyph that should be included in the text decoration.
**Steps to Reproduce**
1. Create a `Text` widget with an underline.
2. Set its text to a Spanish string starting with `¿`.
### Expected results
The underline should be drawn under the entire text, starting from the baseline of the ¿ character.
### Actual results
The underline is drawn too high, intersecting with the ¿ character.
### Code sample
Code sample
```dart
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
spacing: 10,
children: [
// original figma-like example
Text(
'¿Lo olvidaste?',
style: TextStyle(
letterSpacing: -.01,
fontSize: 15,
height: 20 / 15,
// fontFamily: FontFamily.inter, // bug repeats even on default font
fontWeight: FontWeight.w400,
decoration: TextDecoration.underline,
decorationStyle: TextDecorationStyle.solid,
),
),
// example with bigger font, bug repeats
Text(
'¿Lo olvidaste?',
style: TextStyle(
letterSpacing: -.01,
fontSize: 30,
height: 38 / 30,
// fontFamily: FontFamily.inter,
fontWeight: FontWeight.w400,
decoration: TextDecoration.underline,
decorationStyle: TextDecorationStyle.solid,
),
),
],
),
),
),
);
}
}
```
### Screenshots or Video
Screenshots / Video demonstration
figma (expected):
flutter (actual):
### Logs
_No response_
### Flutter Doctor output
Doctor output
```console
[✓] Flutter (Channel stable, 3.32.7, on macOS 26.0 25A354 darwin-arm64, locale en-RU) [554ms]
• Flutter version 3.32.7 on channel stable at /Users/mozerrr/src/flutter/3.32.7
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision d7b523b356 (3 months ago), 2025-07-15 17:03:46 -0700
• Engine revision 39d6d6e699
• Dart version 3.8.1
• DevTools version 2.45.1
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [1,388ms]
• Android SDK at /Users/mozerrr/Library/Android/sdk
• Platform android-36, build-tools 36.0.0
• 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 21.0.7+-13880790-b1038.58)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 26.0.1) [989ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 17A400
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [92ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2025.1) [91ms]
• 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 21.0.7+-13880790-b1038.58)
[✓] IntelliJ IDEA Ultimate Edition (version 2025.2.1) [91ms]
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 87.1
• Dart plugin version 252.24322.5
[✓] VS Code (version 1.104.3) [9ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (3 available) [6.0s]
• iPhone 16e (mobile) • 3F0B2094-52E6-4CA7-B4AC-60E1F1BAD620 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-26-0 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 26.0 25A354 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 140.0.7339.208
[✓] Network resources [339ms]
• All expected network resources are available.
• No issues found!
```
Contributor guide
Assessment
This issue has not been assessed yet.