Skip to content

docs: add section on configuring fontconfig search paths#60

Merged
kyamagu merged 1 commit intomainfrom
docs/configuring-fontconfig
Mar 27, 2026
Merged

docs: add section on configuring fontconfig search paths#60
kyamagu merged 1 commit intomainfrom
docs/configuring-fontconfig

Conversation

@kyamagu
Copy link
Copy Markdown
Collaborator

@kyamagu kyamagu commented Mar 27, 2026

Summary

  • Adds a new "Configuring fontconfig" section to the Advanced Topics page
  • Explains that fontconfig uses XML config files and shows where they live (~/.config/fontconfig/fonts.conf, /etc/fonts/)
  • Provides a minimal example for adding a custom font directory via <dir>
  • Notes that fc-cache -f must be run after editing config files
  • Shows how to verify the new path via get_font_dirs()
  • Links to the official fontconfig user documentation

Motivation: A user asked "how can I find a font file not returned by fontconfig?" — the answer was to add a search path in the config file, but this wasn't documented anywhere in the project docs.

Test plan

  • Build docs locally: cd docs/ && make html
  • Verify the new section appears between "Configuration Management" and "Working with Character Sets"
  • Verify the external link to freedesktop.org renders correctly

🤖 Generated with Claude Code

Addresses a common question about fonts not being found by fontconfig,
explaining how to add font directories via XML config files and rebuild
the cache with fc-cache.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 27, 2026 04:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation to help users troubleshoot missing fonts by explaining how to configure fontconfig search paths via config files and how to verify the effective directories from Python.

Changes:

  • Added a “Configuring fontconfig” section describing where fontconfig config files are typically located.
  • Included a minimal fonts.conf example using <dir> to add a custom font directory.
  • Documented cache rebuild (fc-cache -f) and verification via Config.get_current().get_font_dirs().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kyamagu kyamagu merged commit b66e358 into main Mar 27, 2026
8 checks passed
@kyamagu kyamagu deleted the docs/configuring-fontconfig branch March 27, 2026 05:24
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