Skip to content

text: Bold text is sometimes way bolder than intended #500

Open
@chrisbobbe

Description

@chrisbobbe

See how bold the sender names and topic headers are in this screenshot on the office Android device, compared to a better alternative:

Current Better alternative
image image

The "better alternative" can be reached in this case by commenting out a line in weightVariableTextStyle:

diff --git lib/widgets/text.dart lib/widgets/text.dart
index 1a80cee4b..04d001bbd 100644
--- lib/widgets/text.dart
+++ lib/widgets/text.dart
@@ -69,7 +69,7 @@ TextStyle weightVariableTextStyle(BuildContext? context, {
     // This use of `fontWeight` shouldn't affect glyphs in the preferred,
     // "wght"-axis font. If it does, see for debugging:
     //   https://github.com/zulip/zulip-flutter/issues/65#issuecomment-1550666764
-    fontWeight: clampVariableFontWeight(value),
+    // fontWeight: clampVariableFontWeight(value),
 
     inherit: true);
 }

It seems that the comment about "This use of fontWeight shouldn't [etc.]" has proven helpful: the use of fontWeight is indeed affecting glyphs in Source Sans 3. The "see for debugging" link is relevant, but I plan to replace it with a link to an upstream Flutter issue with the triaged-engine label: that's flutter/flutter#136779 .

Removing that fontWeight line would be sad; it exists for the sake of glyphs that can't be rendered in the primary font family (like Source Sans 3) and might need to be rendered in a fallback font that doesn't have a "wght" axis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-designVisual and UX designbeta feedbackThings beta users have specifically asked forupstreamWould benefit from work in Flutter or another upstream

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions