8000 something wrong with TextStyle.TextDecoration params · Issue #25607 · flutter/flutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

something wrong with TextStyle.TextDecoration params #25607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dishcheng opened this issue Dec 20, 2018 · 7 comments
Closed

something wrong with TextStyle.TextDecoration params #25607

dishcheng opened this issue Dec 20, 2018 · 7 comments
Labels
a: typography Text rendering, possibly libtxt engine flutter/engine repository. See also e: labels.

Comments

@dishcheng
Copy link
dishcheng commented Dec 20, 2018

I want a single underline but it shows double underline
image
image

It shows on my HuaWei7x ,but My friends doesn't show this

@dishcheng
Copy link
Author

if the text content without (") at the content head ,It shows single underline ,like this "长城环球通自由行信用卡美加澳线下消费返现",it is ok。Another,if the text is "环球精彩 一卡尽享境外消费满额最惠",it shows double underline ,but if is "环球精彩一卡尽享境外消费满额最惠"(without Blank bewteen 彩 and 一),it show single

@zoechi zoechi added engine flutter/engine repository. See also e: labels. a: typography Text rendering, possibly libtxt labels Dec 20, 2018
@zoechi
Copy link
Contributor
zoechi commented Dec 20, 2018

Please add the output of flutter doctor -v.

@zoechi zoechi added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 20, 2018
@zoechi zoechi added this to the Goals milestone Dec 20, 2018
@dishcheng
Copy link
Author

image

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 20, 2018
@bonoogi
Copy link
bonoogi commented Feb 13, 2019

same issue happen to me. and not only TextDecoration.underline. also happened to TextDecoration.overline

Screenshots

simulator screen shot - iphone xs max - 2019-02-13 at 14 37 54
simulator screen shot - iphone xs max - 2019-02-13 at 14 38 06

Code

const roman = "ABCD";
  const korean = "가나다라";
  const chinese = "诶比西迪";
  const japanese = "あいうえ";
  const space = " ";
  final style = TextStyle(
    color: Colors.black,
    fontSize: 30.0,
    decoration: TextDecoration.underline, // or overline
  );
MaterialApp(
      home: Scaffold(
        body: ListView(
          children: <Widget>[
            Text("Only Korean",),
            Text(
              korean,
              style: style,
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("With whitespace",),
            Text(
              korean + space,
              style: style,
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("With Roman",),
            Text(
              roman + korean,
              style: style,
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("With Japanese",),
            Text(
              korean + japanese,
              style: style,
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("With Chinese",),
            Text(
              korean + chinese,
              style: style,
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("With All",),
            Text(
              roman + korean + chinese + japanese,
              style: style,
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("Common TextStyle",),
            RichText(
              text: TextSpan(
                style: style,
                children: [
                  TextSpan(text: roman,),
                  TextSpan(text: korean,),
                  TextSpan(text: chinese,),
                  TextSpan(text: japanese,),
                ]
              )
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("Each TextStyle",),
            RichText(
              text: TextSpan(
                children: [
                  TextSpan(text: roman, style: style,),
                  TextSpan(text: korean, style: style,),
                  TextSpan(text: chinese, style: style,),
                  TextSpan(text: japanese, style: style,),
                ]
              )
            ),
          ],
        ),
      ),
    )

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.3 18D109, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.3)
[✓] IntelliJ IDEA Community Edition (version 2018.3.3)
[✓] VS Code (version 1.31.1)
[✓] Connected device (1 available)

• No issues found!

@jason-simmons
Copy link
Member

Duplicate of #30041

@jason-simmons jason-simmons marked this as a duplicate of #30041 Mar 29, 2019
@bonoogi
Copy link
bonoogi commented Mar 30, 2019

thank you @jason-simmons !
I have just test it. There's only one line exactly. But something is wrong to line's y position.
plz check screenshot below.

Screenshot on LGM V30

Screenshot_2019-03-30-14-55-23

Screenshot on iOS(iPhone XS Max) Simulator

Simulator Screen Shot - iPhone XS Max - 2019-03-30 at 14 52 11

code

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Main(),
    );
  }
}

const roman = "ABCD";
const korean = "가나다라";
const chinese = "诶比西迪";
const japanese = "あいうえ";
const space = " ";
final style = TextStyle(
  color: Colors.black,
  fontSize: 30.0,
  decoration: TextDecoration.underline, // or overline
);

class Main extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: ListView(
          children: <Widget>[
            Text("Only Korean",),
            Text(
              korean,
              style: style,
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("With whitespace",),
            Text(
              korean + space,
              style: style,
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("With Roman",),
            Text(
              roman + korean,
              style: style,
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("With Japanese",),
            Text(
              korean + japanese,
              style: style,
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("With Chinese",),
            Text(
              korean + chinese,
              style: style,
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("With All",),
            Text(
              roman + korean + chinese + japanese,
              style: style,
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("Common TextStyle",),
            RichText(
              text: TextSpan(
                style: style,
                children: [
                  TextSpan(text: roman,),
                  TextSpan(text: korean,),
                  TextSpan(text: chinese,),
                  TextSpan(text: japanese,),
                ]
              )
            ),
            Padding(padding: EdgeInsets.only(top: 24,)),
            Text("Each TextStyle",),
            RichText(
              text: TextSpan(
                children: [
                  TextSpan(text: roman, style: style,),
                  TextSpan(text: korean, style: style,),
                  TextSpan(text: chinese, style: style,),
                  TextSpan(text: japanese, style: style,),
                ]
              )
            ),
          ],
        ),
      );
  }
}

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.4.8-pre.18, on Mac OS X 10.14.4 18E226, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.3)
[✓] IntelliJ IDEA Community Edition (version 2018.3.3)
[✓] VS Code (version 1.32.3)
[✓] Connected device (1 available)

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: typography Text rendering, possibly libtxt engine flutter/engine repository. See also e: labels.
Projects
None yet
Development

No branches or pull requests

4 participants
0