Problems setting fonts in text reports (linux)

Hello - 9 yr gramps user here, but I have not yet tried to make printable reports in all that time. I would ultimately like to make a printable book, but for now I will settle for a well formatted text report of any type.

My problem is that I am trying to set the fonts to serif (Roman) in, for example, an ahnentafel report, but in spite of creating my own style, it seems to be ignored and sans serif fonts stubbornly persist. (True for any text report I have tried, not just for ahnentafel.) Sans is fine for on-screen, but terrible in print.

I don’t see any relevant errors or warnings on the command line, so I’m not sure what to poke at. A cursory glance through the relevant code hasn’t enlightened me since it seems to do what I would expect, but it seems like my style file is at best being ignored, but hacking the file hasn’t changed the fonts either. A quick lsof shows that NotoSans and several arial fonts (from the webcore package) are in use by gramps, but nothing else. Any hints?

I’m on linux (openSUSE) with a self-compiled gramps-5.1.2 with a minor patch to correct some grammar on the narrative web page output.

I don’t have that Linux distro handy, so these are generic comments. Normally, Gtk is using the fontconfig tool to manage the various font chores. The tool should be set up with configuration files that try to map a ‘Serif’ or a ‘Times’ font to a font that you actually have installed.
I think that the “fc-match --verbose Roman” will report what fontconfig will use when a font named “Roman” is specified. If this is not as desired, you will either have to install other fonts with names that match better, or modify the fontconfig configuration files to get it to select a font you have installed.

Ah, spot on! Running the fc-match command shows that the family is Arial and is calling the arial.ttf file from the webcore package, not a roman file of any sort like it is supposed to. Perhaps since I’m running gramps under KDE, something is not being set properly in my environment. At least I now know where to start looking. Thank you.

Okay, almost. After learning far too much about how modern linux systems pull in fonts, the proper test for fc-match is “serif”, not “Roman”. Unfortunately, this means that gramps will pull in the screen system fonts to generate it’s reports, not a print-quality set of fonts. I suppose that is the price of convenience, but it does mean the generated reports don’t look very nice. Fortunately, the LaTeX outputs are easily hacked, so I can use the PDFs for generating quick drafts, then switch over to LaTeX when I’m getting ready for the final copy. Thanks for getting me pointed in the right direction.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.