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

allow to set a global font, and render with pango only #6073

Closed
rtgiskard opened this issue May 15, 2024 · 1 comment · Fixed by #6138
Closed

allow to set a global font, and render with pango only #6073

rtgiskard opened this issue May 15, 2024 · 1 comment · Fixed by #6138
Labels
enhancement New feature or request

Comments

@rtgiskard
Copy link
Contributor

rtgiskard commented May 15, 2024

Description

Better to provide a global font-family settings, for overlay, splash and the others, instead of the hard coded sans. There are settings to select font for groupbar and splash, another one for the overlay might need to be add.

And, I'm using a local font config like this:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
	<match target="pattern">
		<test name="family" qual="any"><string>sans-serif</string></test>
		<edit name="family" mode="prepend" binding="strong">
			<string>Symbols Nerd Font</string>
			<string>Inconsolata</string>
			<string>LXGW WenKai Mono</string>
		</edit>
	</match>
</fontconfig>

The symbol only nerd font is the first to match, and then the others as fallback, this works well for my other applications, without the need to install many other nerd patched fonts.

However, hyprland is using cairo_select_font_face() along with pango_layout_set_font_description() to render the fonts, the first one from cairo doesn't support such font glyphs fallback, and pango does, so for my case, the overlay message is all blocks.

It might be better to render only with pango for the project, rather than using both.

If you're willing, I may make the changes and create a PR later

@rtgiskard rtgiskard added the enhancement New feature or request label May 15, 2024
@rtgiskard rtgiskard changed the title [enhance] allow to set a global font family and size, and render with pango [enhance] allow to set a global font, and render with pango only May 15, 2024
@rtgiskard rtgiskard changed the title [enhance] allow to set a global font, and render with pango only allow to set a global font, and render with pango only May 15, 2024
@vaxerski
Copy link
Member

feel free to mr, always welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants