Skip to content

font: render with pango for better fontconfig support#155

Open
rtgiskard wants to merge 1 commit intoemersion:masterfrom
rtgiskard:master
Open

font: render with pango for better fontconfig support#155
rtgiskard wants to merge 1 commit intoemersion:masterfrom
rtgiskard:master

Conversation

@rtgiskard
Copy link

@rtgiskard rtgiskard commented May 18, 2024

cairo_select_font_face() does not support fontconfig fallback, use pango instead

for my case, 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.

But this setup will cause slurp -d to show numbers as all block

cairo_select_font_face() does not support fontconfig fallback,
use pango for better font rendering
@tmccombs
Copy link
Contributor

tmccombs commented Sep 2, 2025

Would it be possible to make pango an optional dependency instead of a required one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants