Skip to content

Tab character in <ol> for font weights bellow w400 #327

@viniciusaro

Description

@viniciusaro

Hi, I've noticed a weird character that looks like a tab in <li> elements for ordered lists. It happens only when the content needs a line break and the font weight is w300 or less. Any clues how to solve that?

Here's a minimal example that reproduces the problem (library version 1.0.0):

import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';

import 'package:flutter_html/style.dart';

const htmlData = """
<ol>
<li>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</li>
</ol>
""";

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) => MaterialApp(home: MyHomePage());
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('flutter_html Example'),
      ),
      body: SingleChildScrollView(
        child: Html(
          data: htmlData,
          style: {
            "*" : Style(fontWeight: FontWeight.w300)
          }
        ),
      ),
    );
  }
}
The Flutter version is 1.17.3 as stated running flutter doctor
• Flutter version 1.17.3 at [...]
• Framework revision b041144f83 (12 days ago), 2020-06-04 09:26:11 -0700
• Engine revision ee76268252
• Dart version 2.8.4

This is a print of a list with FontWeight.w300

Simulator Screen Shot - iPhone 11 Pro - 2020-06-16 at 11 45 23

This is a print of a list with FontWeight.w400

Simulator Screen Shot - iPhone 11 Pro - 2020-06-16 at 11 45 27

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions