question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FontWeight=Bold doesn't work on macOS

See original GitHub issue

Write the following program and run on macOS:

using Avalonia;
using Avalonia.Controls;
using Avalonia.Logging.Serilog;
using Avalonia.Media;

namespace avaloniatest
{
    class Program
    {
        public static void Main(string[] args) => BuildAvaloniaApp().Start(AppMain, args);

        public static AppBuilder BuildAvaloniaApp()
            => AppBuilder.Configure<App>()
                .UsePlatformDetect()
                .LogToDebug()
                .UseReactiveUI();

        private static void AppMain(Application app, string[] args)
        {          
            var window = new Window() {Content = new TextBlock() {FontWeight = FontWeight.Bold, Text = "fooh"}};

            app.Run(window);
        }
    }
}

I expect that it will show a bold text, but the text in the TextBlock is rendered as normal. Works the same for TextBox.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:18 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
Gillibaldcommented, Jun 16, 2019

Should work when my fix is merged

2reactions
ForNeVeRcommented, Jun 16, 2019

Should we maybe change the default font family on macOS, then? Or is it okay that the default font doesn’t support bold?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Big Sur - Bold text no longer works?
Hey there, that was a typo and I did use command + B. The keyboard is working since it still shows the bold...
Read more >
font-weight bold not working with @font-face, chrome 72
In chrome 72 (mac), the font-weight is not working, in Safari and FF the bold is displayed as expected. a solution to fix...
Read more >
Font with different weights in Mac - Support Questions
On a Mac, I find that fonts with different weights (Bold, Semibold, Regular, Light, Thin) etc. show up with only one font name...
Read more >
Font is installed in font book, but bold does not work
I just recopied the fonts to the Font Book and let it fix itself automatically, and it solved the issue! The Bold mode...
Read more >
Font weights not being recognized by Mac OS Ventura
I looked using Glyphs 3 and could not see a problem. Everything works fine on my machine running Mac OS Monterey. Thanks!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found