Repository: flutter
Issue: textPainter.computeLineMetrics()  the result of LineMetrics  seems error
Labels: framework,engine,a: typography,has reproducible steps,P2,team-framework,triaged-framework,found in release: 3.22,found in release: 3.23

### Steps to reproduce

use TextPainter to measure the text layout

final textSpan = TextSpan(text: text, style: textStyle);
    final textPainter =
    TextPainter(text: textSpan, textDirection: TextDirection.ltr,maxLines: 1,textAlign: TextAlign.left);

    textPainter.layout(minWidth: 0, maxWidth: double.infinity);
    var computeLineMetrics = textPainter.computeLineMetrics();
    for(var line in computeLineMetrics){
      log("line $line");
    }

text_style =TextStyle(inherit: true, color: Color(0xff000000), family: MoliFont, size: 378.0, height: 1.0x)
text = x

### Expected results

![expect](https://github.com/flutter/flutter/assets/15025940/924a7364-7b87-4f42-9c3c-7a357d4771e3)

i want to know the info of red area. the letter ascent descent   not the top bottom.

### Actual results

![actual](https://github.com/flutter/flutter/assets/15025940/780d5ae0-4e4e-41af-ac7a-cf8eb0785d92)
the log print :LineMetrics(hardBreak: true, ascent: 300.8048095703125, descent: 77.19517517089844, unscaledAscent: 300.8048095703125, height: 378.0, width: 193.15798950195312, left: 0.0, baseline: 300.8048095703125, lineNumber: 0)
ascent and descent is not i really want  ,ascent contain the top white area  descent contain the bottom white area.

### Code sample

<details open><summary>Code sample</summary>

```dart
final textSpan = TextSpan(text: text, style: textStyle);
    final textPainter =
    TextPainter(text: textSpan, textDirection: TextDirection.ltr,maxLines: 1,textAlign: TextAlign.left);

    textPainter.layout(minWidth: 0, maxWidth: double.infinity);
    var computeLineMetrics = textPainter.computeLineMetrics();
    for(var line in computeLineMetrics){
      log("line $line");
    }

text_style =TextStyle(inherit: true, color: Color(0xff000000), family: MoliFont, size: 378.0, height: 1.0x)
text = x
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details open><summary>Logs</summary>

```console
LineMetrics(hardBreak: true, ascent: 300.8048095703125, descent: 77.19517517089844, unscaledAscent: 300.8048095703125, height: 378.0, width: 193.15798950195312, left: 0.0, baseline: 300.8048095703125, lineNumber: 0)
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[√] Flutter (Channel stable, 3.22.1, on Microsoft Windows [版本 10.0.19045.4529], locale zh-CN)
    • Flutter version 3.22.1 on channel stable at E:\flutter\sdk\flutter3.22.1\flutter
    • Upstream repository https://github.com/flutter/flutter.git                      
    • Framework revision a14f74ff3a (5 weeks ago), 2024-05-22 11:08:21 -0500          
    • Engine revision 55eae6864b                                                      
    • Dart version 3.4.1
    • DevTools version 2.34.3
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[√] Windows Version (Installed version of Windows is version 10 or higher)

[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.0)
    • Visual Studio at D:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.10.34916.146
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2022.3)
    • Android Studio at D:\Program Files\Android\Android Studio20223121Giraffe
    • 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.6+0-b2043.56-10027231)

[√] Android Studio (version 2023.3)
    • Android Studio at D:\Program Files\Android\Android Studio
    • 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.10+0--11572160)

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [版本 10.0.19045.4529]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 126.0.6478.63
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 126.0.2592.68

[√] Network resources
    • All expected network resources are available.

```

</details>