FS#56728 - [xfig] Fonts screen are always rendered with the same font with the same size.

Attached to Project: Arch Linux
Opened by Olivier (olive) - Friday, 15 December 2017, 09:38 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 16 December 2017, 10:17 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Eric Belanger (Snowman)
Antonio Rojas (arojas)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Xfig renders always the same font with the same size whatever you choose.

Additional info:
* package version(s)
3.2.6-1
* config and/or log files etc.
Default config

Steps to reproduce:
Launch xfig (with default config). Click the T tool and add some text; then change the font size or use another font. The font on the screen does not change and is always rendered as the same font.

This is due to a wrong patch applied by Archlinux. Recompile without the "xfig-3.2.5-urwfonts.patch" and the problem is solved.
P.S. this problem seems somewhat related to this old problem; but I don't think it is the same:  FS#47808 
This task depends upon

Closed by  Antonio Rojas (arojas)
Saturday, 16 December 2017, 10:17 GMT
Reason for closing:  Fixed
Additional comments about closing:  xfig 3.6.2-2
Comment by Antonio Rojas (arojas) - Friday, 15 December 2017, 19:54 GMT
Have you tested this? I recompiled the package without the patch and still can't change the font.
Comment by Olivier (olive) - Saturday, 16 December 2017, 08:57 GMT
After more testing, I discover that it works if you remove the patch AND install xorg-fonts-75dpi and xorg-fonts-100dpi. I had these two package installed and I didn't notice.

From what I understand, xfig rely on the old way for rendering fonts (it use the Xorg XLFD fonts; not freetype or fontconfig, etc.). Xorg seems unable to display otf fonts for some reason (retrieve the XLFD name in fonts.dir in the corresponding font directory and try with xfontsel: nothing is displayed). The unpatched xfig don't try that and use pixel fonts instead and thus it works. The patch try to load the otf fonts and it doesn't work for the previous reason. Note that the displayed font would not actually be exactly the same as the font that would be included in exported eps files (these refers to the postscript fonts); we might notice small distortions.

So if the inability to Xorg to display otf font is real; we definitively need to remove the patch and add the packages above as dependency. If this inability is a bug; then better to fix the bug in Xorg and leave the patch. Older version of gsfonts came with fonts in another format that Xorg understood; so the patch worked with this old version.


Comment by Antonio Rojas (arojas) - Saturday, 16 December 2017, 09:38 GMT
I installed those two packages and still can't change the font - is there something else missing?
Comment by Olivier (olive) - Saturday, 16 December 2017, 09:50 GMT
You install the two mentioned packages AND use and unpatched xfig? Maybe logout and relogin (or reboot) (to be sure xorg refresh its knowledge of fonts). Can you try to display the font that xfig try to load in xfontsel (that's the fonts that he patch changed, for example: -*-times-medium-r-normal-- or -*-helvetica-medium-r-normal--) .
What's the output of xlsfonts?

Have you any error message if you launch xfig from a terminal? Note that I use Xorg directly (not wayland); it shouldn't make a difference (because xfig will be launched under Xorg anyway) but who know?

Note that there still may be one or two fonts that don't work (if they have no corresponding pixel fonts), but the usual fonts works for me.
Comment by Antonio Rojas (arojas) - Saturday, 16 December 2017, 10:16 GMT
Right, restarting did it. Thanks for the clarification.

Loading...