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

DefaultFamilyName Error #1281

Closed
GRFTSOL opened this issue Feb 22, 2025 · 3 comments
Closed

DefaultFamilyName Error #1281

GRFTSOL opened this issue Feb 22, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@GRFTSOL
Copy link

GRFTSOL commented Feb 22, 2025

Describe the bug

Uable to launch

Image

last-unhandled-exeption:

Unhandled exception. System.InvalidOperationException: Could not create glyphTypeface. Font family: $Default (key: ). Style: Normal. Weight: Normal. Stretch: Normal
   at Avalonia.Media.Typeface.get_GlyphTypeface()
   at Avalonia.Rendering.Composition.Compositor.get_DiagnosticTextRenderer()
   at Avalonia.Rendering.Composition.Compositor.CreateCompositionTarget(Func`1 surfaces)
   at Avalonia.Rendering.Composition.CompositingRenderer..ctor(IRenderRoot root, Compositor compositor, Func`1 surfaces)
   at Avalonia.Controls.TopLevel..ctor(ITopLevelImpl impl, IAvaloniaDependencyResolver dependencyResolver)
   at Avalonia.Controls.WindowBase..ctor(IWindowBaseImpl impl, IAvaloniaDependencyResolver dependencyResolver)
   at Avalonia.Controls.WindowBase..ctor(IWindowBaseImpl impl)
   at Avalonia.Controls.Window..ctor(IWindowImpl impl)
   at Avalonia.Controls.Window..ctor()
   at FluentAvalonia.UI.Windowing.AppWindow..ctor()
   at Beutl.Views.MainWindow..ctor() in /home/runner/work/beutl/beutl/src/Beutl/Views/MainWindow.axaml.cs:line 14
   at Beutl.App.OnFrameworkInitializationCompleted() in /home/runner/work/beutl/beutl/src/Beutl/App.axaml.cs:line 120
   at Avalonia.AppBuilder.SetupUnsafe()
   at Avalonia.AppBuilder.Setup()
   at Avalonia.AppBuilder.SetupWithLifetime(IApplicationLifetime lifetime)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder)
   at Beutl.Program.Main(String[] args) in /home/runner/work/beutl/beutl/src/Beutl/Program.cs:line 41
fish: Job 1, './Beutl' terminated by signal SIGABRT (Abort)

To Reproduce

run ./Beutl

Expected behavior

No response

Beutl version

1.0.2

OS

Linux

Additional context

OS: Arch Linux
Kernel: 6.13.3-zen
DE: KDE Plasma 6.3.1
WM: Kwin (Wayland)
Beutl Release: 1.0.2 standalone

@GRFTSOL GRFTSOL added the bug Something isn't working label Feb 22, 2025
@yuto-trd
Copy link
Member

Thanks for reporting the issue!

To better understand the details, could you run the following command and share the output?

/usr/bin/fc-match --format %{file}

This will check the system’s default font file.

Also, just a heads-up— even if this issue gets resolved, I can’t guarantee the software will work on Arch Linux.

Appreciate your help!

@GRFTSOL
Copy link
Author

GRFTSOL commented Feb 24, 2025

Thanks for reporting the issue!

To better understand the details, could you run the following command and share the output?

/usr/bin/fc-match --format %{file}

This will check the system’s default font file.

Output:
/usr/local/share/fonts/m/msyh.ttc
I installed Microsoft Yahei since some software I use need it.

Also, just a heads-up— even if this issue gets resolved, I can’t guarantee the software will work on Arch Linux.

Appreciate your help!

That shouldn't be a problem, there's a little tool named debtap, which can convert .deb file to archlinux package.

@GRFTSOL
Copy link
Author

GRFTSOL commented Feb 26, 2025

Can be temporarily solved by changing fontconfig of linux, it's a problem of certain package of font noto-fonts-cjk, bug report: Link
From mid 2024, this .conf file was deleted, it may cause some unexpected fonts fallback, especially when user installed fonts like msyh.ttc or simsun.ttc which likes me.

Solution:
Use your own editor to create a conf, like 64-xxxx.conf, "64" is to ensure it is before 65-nonlatin.conf, for me it is:
sudo vim /etc/fonts/conf.d/64-noto-fonts-fix-oldherl-zh.conf
Configuration:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
        <alias>
                <family>serif</family>
                <prefer>
                        <family>Noto Serif CJK SC</family>
                </prefer>
        </alias>
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>Noto Sans CJK SC</family>
                </prefer>
        </alias>
        <alias>
                <family>monospace</family>
                <prefer>
                        <family>JetBrainsMono Nerd Font Mono</family>
                </prefer>
        </alias>
</fontconfig>

Change font name to your own's or ensure you have installed fonts above, restart would be needed.

Note:

  • Desktop environment UI font shall looks different (maybe "accurate", I didn't realize this inaccurancy before), also ./Beutl can launch flawlessly.
  • I'm not sure this is a correct solution since it need to change a configuration, but should close for now, re-open when someone has better solution.

@GRFTSOL GRFTSOL closed this as completed Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants