Bugzilla – Bug 119890
xfig does not display fonts correctly - change font and change is not displayed
Last modified: 2006-03-08 14:23:48 UTC
Summary: xfig does not display fonts correctly - change font and change is not displayed Salutation: Mr. Language: english Name: Mike Rose Mail: mr349@cam.ac.uk Language: english Packagename: xfig-3.2.4-68 Component: Other Productname: SUSE LINUX Versionname: SUSE LINUX 9.3 Platform: i386 Severity: Normal bug: Work is seriously hindered Description hardware: nope, happens on various hardware. Description how to reproduce: 1. How to reproduce: start xfig using the text tool write some text select the text with the edit tool, change the font and font-size apply the font changes display of text does not change 2. This is not working: font display 3. Error messages and logfiles If I save the xfig file and then open it with xfig under Suse 9.1 Pro then the text displays correctly. xfig is linked against slightly newer libraries in Ssue 9.3 so maybe that is the cause? ** This bugreport was generated by STTS-FB ** You can have a look at the original message at: ** http://feedback.suse.de/cgi-bin/history.pl?&ticket=20050928990000066
I cannot reproduce this. Works fine for me on SuSE Linux 10.0.
I alos cannot reproduce this. It works fine for me on SuSE Linux 9.3, just after `Apply' in the Edit Panel I see the new size with the new font. Please be sure to have installed package xorg-x11-fonts-scalable.
The package "ghostscript-fonts-std" is also necessary. If this package is not installed, the problem occurs as described in the original comment. But "ghostscript-fonts-std" is required by xfig, i.e. it can only be missing if the user ignored the requirement.
Move bug to product "SUSE LInux 10.0" to make it visible for the reporter.
ghostscript-fonts-std in installed: rpm -qa | grep ghostscript ghostscript-fonts-std-8.15rc1-16
Ahmm ... I can not reproduce this bug. It worsk just fine here. Do you have installed xorg-x11-fonts-scalable.
I think xfig doesn't use any of the fonts in xorg-x11-fonts-scalable. Nevertheless please check whether you have this package installed and whether it makes a difference. The package ghostscript-fonts-std contains the URW fonts which are used almost exclusively in the SuSE package of xfig because of the patch "xfig.3.2.4-urw-fonts.dif" applied to our xfig package. Without that patch, xfig used bitmap fonts for display on screen which are available only in a discrete set of sizes and therefore the size didn't always change when you changed the font-size with the edit tool. Only if you did hit the next available size in bitmap form, the size really changed. For printing, printer resident PostScript fonts were used, which are scalable. Therefore the sizes of the bitmap fonts seen on screen were often very different from the font sizes in the printed output. To fix this problem, we patched xfig to use the scalable URW fonts, which are a compatible to the standard printer resident PostScript fonts. Ghostscript uses them for that purpose. By using the URW fonts, we could achieve that the fonts scale nicely to all sizes on screen and that the display on screen looks much more similar to the printout. Because exactly this is not working for you, my first guess was that something is wrong with your URW fonts. You say you have the package installed. Are the fonts accessible via the X11 core fonts system as well? I.e. are the URW fonts listed by "xlsfonts"? Please check with xlsfonts | grep -i urw What is the output of this command?
Maybe the fonts are not found in the font path. What does xset q | grep -A1 Font reports and what happend after xset fp+ /usr/share/ghostscript/fonts
More info: We fixed this by recompiling the xfig rpms without the urw fonts. We do not have a urw font entry in our X11 config: " Section "Files" RgbPath "/usr/X11R6/lib/X11/rgb" FontPath "/usr/X11R6/lib/X11/fonts/Type1/" FontPath "/usr/X11R6/lib/X11/fonts/CID/" FontPath "/usr/X11R6/lib/X11/fonts/misc/:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" FontPath "/usr/X11R6/lib/X11/fonts/75dpi/" FontPath "/usr/X11R6/lib/X11/fonts/misc/" FontPath "/usr/X11R6/lib/X11/fonts/truetype" EndSection " because we run many different unices and like remote display to work across all of them. Suse xfig seems to be using non-standard font names, rather than the canonical ones. Lack of xorg.conf urw font entry means that fonts directory (magically built during installation) does not have the urw fonts in it. Hope that helps.
If you use xfig without the URW fonts patch, the sizes on screen will jump, i.e. not all sizes will make a difference on screen although all sizes make a difference in printout. That is very inconvenient as well. Often on screen it looks like as if a text fits into a box for example, but when printing it suddenly doesn't or vice versa. Using the URW fonts fixes this problem, the display on screen and the printout then look almost identical.
Thanks for reopening, Mike (Rose). Now we can finally close this with the correct resolution: INVALID. You're using a font setup, which is *not* supported at all by SUSE LINUX 10.0.
As xfig is much more usable with the URW fonts, I think it is a better solution to put the URW directory back into your font path and solve the problem with the remote display on other Unix machines by installing the URW fonts there as well. That's very easy, just copy the directory /usr/share/ghostscript/fonts/ from your SuSE Linux machine to some place on the other Unix machine and add it to your font path there.
(In reply to comment #12) We've not noticed a problem with fonts "jumping" on screen. Postscript fonts not printing out as displayed? not seen that either. Yes, maybe we could install /usr/share/ghostscript/fonts/ from SuSE Linux on all our UNIX machines, but what about remote users on other countries, people with laptops, etc. ?? I guess we could suggest they all do the same... Scientific collaboration and all that - we have lots of users from all over the world logging in remotely. Non-standard fonts cause everyone problems. Surely xfig should be able to cope with and without the urw fonts?
See initial report: It was such a report which has lead to the urw font patch. And as you can see on the report your removal cause similar reports. OK one could buy the real Adobe fonts to avoid fonts "jumping", but for the SuSE Linux box this is simply noop.
Example from the xfit.3.2.4-urw-fonts.dif: +/* {"-*-times-medium-r-normal--", (struct xfont*) NULL}, */ + {"-URW-*Nimbus Roman No9 L-medium-r-normal--", (struct xfont*) NULL}, /* Times-Roman */ I.e. the patch replaces "-*-times-medium-r-normal--" with the compatible URW font here. The original pattern matches only the following fonts: mfabian@magellan:/work/SRC/all/xfig$ xlsfonts -fn "-*-times-medium-r-normal--*" | grep "iso8859-1$" -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 -adobe-times-medium-r-normal--11-80-100-100-p-54-iso8859-1 -adobe-times-medium-r-normal--12-120-75-75-p-64-iso8859-1 -adobe-times-medium-r-normal--14-100-100-100-p-74-iso8859-1 -adobe-times-medium-r-normal--14-140-75-75-p-74-iso8859-1 -adobe-times-medium-r-normal--17-120-100-100-p-84-iso8859-1 -adobe-times-medium-r-normal--18-180-75-75-p-94-iso8859-1 -adobe-times-medium-r-normal--20-140-100-100-p-96-iso8859-1 -adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1 -adobe-times-medium-r-normal--25-180-100-100-p-125-iso8859-1 -adobe-times-medium-r-normal--34-240-100-100-p-170-iso8859-1 -adobe-times-medium-r-normal--8-80-75-75-p-44-iso8859-1 mfabian@magellan:/work/SRC/all/xfig$ which are bitmap fonts from the xorg-x11-fonts-75dpi and xorg-x11-fonts-100dpi packages. As you can see, only some sizes are available. If you try to use sizes which are not available, xfig will use the closest available size on display. But when printing, xfig will not use these bitmap fonts, it will just write the names for the standard PostScript fonts into the PostScript output, in this case "Times-Roman". As the printer (or Ghostscript using the URW fonts) can scale "Times-Roman" to any requested sizes, all sizes are possible when printing. Mike Rose> Postscript fonts not printing out as displayed? not seen Mike Rose> that either. I always suffered from the problem, I still remember that it was like that in 1994 when I was using Xfig on HP-UX although I didn't understand why this happened back than. I just adjusted the size on screen until the printout came out correctly and accepted that it didn't look right on screen. Werner> OK one could buy the real Adobe fonts to avoid fonts "jumping", but Werner> for the SuSE Linux box this is simply noop. And it would be the same problem as with the URW fonts if these fonts are not installed everywhere. Mike Rose> Non-standard fonts cause everyone problems. The URW fonts are probably the most widespread scalable PostScript fonts nowadays. I would say they are almost standard. Mike Rose> Surely xfig should be able to cope with and without the urw fonts? Please ask the upstream xfig developers for that feature. Although possible, this isn't easy. As you can see from the xfig.3.2.4-urw-fonts.dif, currently xfig can only use one font for each of the standard PostScript fonts. And this is hardcoded in the C-source, not in a config file. The best solution would be to have this in a config file and to be able to write a list of XLFDs for each font, i.e. first try -URW-*Nimbus Roman No9 L-medium-r-normal--* and if that pattern is not available fall back to -*-times-medium-r-normal--* Even better would be to change xfig not to use X11 core fonts but rather use Xft2/fontconfig instead. Xft2/fontconfig uses client side font rendering, i.e. in that case the fonts would always be used on the machine where xfig was started, no matter where the display is. I.e. you could display the xfig window on a machine which doesn't have decent fonts at all and it would still work. And, with some extra work, it would be possible to embed the exact fonts which were used on screen into the PostScript output (Because with Xft2/fontconfig you can ask where the font files used are, you cannot do this with the X11 core font system). This would allow you to use many more fonts with xfig, not only the standard set of PostScript fonts a PostScript printer has to support. And nevertheless the resulting PostScript files would be portable and could be printed anywhere because they already contain the fonts. All this would need a major redesign of the font stuff in xfig, this is nothing SuSE can do.
Thank you for the very detailed and full answer - most interesting. Why not use the "standard" PostScript names for those fonts, via a list of aliases? Ghostscript does this, no? Perhaps it would be dodgy putting the foundary name as "adobe" in the fonts, when it isn't (PostScript does not sepecify foundary, X11 can, xfig does), but then the patch would be to wildcard the foundary in xfig? I guess that Nimbus is now more standard than Times in the Linux world.
Due to license problems the wildcards of e.g. -*-times-medium-r-normal-- for Times Adobe do not fit with -URW-*Nimbus Roman No9 L-medium-r-normal-- for the Nimbus replacement and -*-*-medium-r-normal-- is much to less to catch the correct font. And yes ghostscript has an alias mapping but this is more a replacment mapping. For the next release I've changed the detection in such way that if the Nimbus fonts are not installed, the next step is to search for the Adobe fonts and if this fails the normal fallback applies.
Eric Varoquaux, on March 2: I have a recent install of SuSE 10.0, with the URW fonts installed in /usr/X11R6/lib/X11/fonts/URW as well as declared in xorg.conf. The screen fonts in the implementation of SuSE 10.0 of xfig simply won´t adjust !! No change of size on the screen at all. The printout seems OK. Needless to say, xfig is hardly functional with such a bug. I had other problems with fonts in X applications, particularly with emacs which, out of the box, would not display anything (solved in .Xresources). Most X applications have ridiculously small screen fonts. My font paths in xorg.conf are as follows: FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/100dpi" FontPath "/usr/X11R6/lib/X11/fonts/misc/" FontPath "/usr/X11R6/lib/X11/fonts/Type1" FontPath "/usr/X11R6/lib/X11/fonts/75dpi" FontPath "/usr/X11R6/lib/X11/fonts/truetype/" FontPath "/usr/X11R6/lib/X11/fonts/URW/" FontPath "/usr/X11R6/lib/X11/fonts/uni/" I have tried to install the rpm of the official xfig.org site but there are unresolved dependencies (libpng.so.2). Can anyone suggest a wayout? Linuxian thanks Eric
Created attachment 71769 [details] Other implementation of xfig I have found a way-out. Install from Mandriva 2006 transfig-3.2.5-0.2mdk.x86_64.rpm xfig-3.2.5-0.2mdk.x86_64.rpm Copy /usr/X11R6/lib/X11/app-defaults/Xfig and Xfig-color to /etc/X11/app-defaults/ Happy again Eric