Flutter dragging out text

212

Since you are using a fitted box and not setting an height but only the width, I'm quite sure that your text is able to expand vertical as much as he wants.

Soo I think that the problem is the font itself. The font you are using is not the original "Futura Bold".

You can see it from the letter capital 'J' and from the letter 't'.

Here's how the original "Futura Bold" shoul be:

Futura bold screenshot

I took that screenshot from:

https://www.fonts.com/font/urw/futura?QueryFontType=Web&src=GoogleWebFonts

Share:
212
Bennett567
Author by

Bennett567

I am a student mainly interested in flutter.

Updated on December 28, 2022

Comments

  • Bennett567
    Bennett567 over 1 year

    I am building a flutter web app, where I want to have some text in the Futura Bold Font. The Text is in a Column, In a Container and in a Fittedbox, like so:

    Container(
              width: MediaQuery.of(context).size.width * 0.9,
              child: FittedBox(
                fit: BoxFit.fitWidth,
                child: Text(
                  'Join to closed beta',
                  textAlign: TextAlign.center,
                  style: TextStyle(
                    fontFamily: 'FuturaBold',
                    color: Colors.white,
                    // fontSize: 50
                  ),
                ),
              ),
            ),
    

    The pubspec.yaml for the font is this:

     fonts:
    - family: FuturaBold
      fonts:
        - asset: lib/assets/fonts/Futura Bold font.ttf
    

    However, the text is drawn out vertically, so instead of looking like this: enter image description here it looks like this: enter image description here. How could I fix this? Thanks.

    • Kushal Goel
      Kushal Goel about 3 years
      Why are you using FittedBox ?