Skip to content
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

Hindi font height is not same in all platform #147829

Open
MominRaza opened this issue May 4, 2024 · 1 comment
Open

Hindi font height is not same in all platform #147829

MominRaza opened this issue May 4, 2024 · 1 comment
Labels
in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Comments

@MominRaza
Copy link

MominRaza commented May 4, 2024

Steps to reproduce

Write Hindi devanagari text in Text widget

Expected results

Same height in all platforms

Actual results

For English in Android, Windows and Web height is 20.
For Hindi in Web and Android Height is 21 and in Windows height is 21.

Code sample

Code sample
Column(
  mainAxisAlignment: MainAxisAlignment.center,
  children: [
    const Text('kIsWeb: $kIsWeb'),
    Text('$defaultTargetPlatform'),
    const SizedBox(
      height: 20,
      child: Column(children: [
        Text('हिंदी फ़ॉन्ट की ऊंचाई सभी प्लेटफ़ॉर्म पर समान नहीं है।')
      ]),
    ),
    const SizedBox(
      height: 20,
      child: Column(children: [
        Text('Hindi font height is not the same on all platforms.')
      ]),
    ),
  ],
)

Screenshots or Video

Screenshots / Video demonstration

Android
image

Windows
image

Web
image

@nate-thegrate
Copy link
Member

nate-thegrate commented May 4, 2024

Flutter doesn't come with any pre-packaged font families, so they're different depending on the platform.

You can add a font as an asset in your pubspec.yaml, and then it can be used in every situation. More info here: https://docs.flutter.dev/cookbook/design/fonts

I think this might be working as intended, but if you're using a font from a local asset and you still see the same problem, let me know.

@huycozy huycozy added in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
None yet
Development

No branches or pull requests

3 participants