Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You need to delete the file and not just rename it, and there might be another file that you need to symlink into that directory (see my last contribution) to actually make it work.
Also, some background:
X has two font systems. There's the old one, which is queried by xfontsel and xlsfonts, and the new one, called FontConfig, which is configured using files in /etc/fonts/conf.d and which Gumeric (now) actually uses. A query using xfontsel or xlsfonts will tell you whether the font is installed at all. It is, so good; we just need to make in available to Fontconfig.
apt package fontconfig is installed and is the latest version: 2.13.1-2ubuntu3
But, how do I run this program? FontConfig and fontconfig give command not found, and doing locate on both forms do not show such an executable.
Thanks,
Jon
No, I did everything in that message, no error message, but it is still the same.
YES, I can tell gnumeric to use courier new, but I have to do this for every file and region of cells that don't show up properly. So, I deleted 70-no-bitmaps.conf and created the link for 70-yes-bitmaps.conf
Thanks for the help.
Jon
Well, I unpacked the files in xfonts-100dpi_1.0.3.tar.gz, went down to font-adobe-100dpi and did ./configure make and sudo make install, it built a bunch of files like courR12-ISO8859-##.bdf, where ## is a number between 1 and 15. Still doesn't show up properly in font-manager. (it shows as blocks with numbers in them.)
fc-list | grep courR shows a bunch of fonts like:
/usr/share/fonts/X11/75dpi/courR12-ISO8859-1.pcf.gz: Courier:style=Regular
/usr/share/fonts/X11/75dpi/courR12.pcf.gz: Courier:style=Regular
/usr/share/fonts/X11/100dpi/courR12.pcf.gz: Courier:style=Regular
/usr/share/fonts/X11/100dpi/courR12-ISO8859-1.pcf.gz: Courier:style=Regular
So, it knows something is there... In fact, it looks like they were all there ALL ALONG, as the same fonts
are there for the 75dpi, but they have older dates.
Are these .pcf.gz fonts the right form for X to use?
backtracking a bit....DavidMcCann has already mentioned he has searched and downloaded a font called Courier New.
Is that the real name you are looking for?
No, I have existing (old) spreadsheets that call for "courier' NOT "Courier New".
I can easily select a bunch of cells and change font to "Courier New", but that is tedious and error-prone
for hundreds of spreadsheets. It would be simplest to just make "Courier" available. Courier New does exist
on the system.
backtracking a bit....DavidMcCann has already mentioned he has searched and downloaded a font called Courier New.
Is that the real name you are looking for?
This was covered in posts #1, #6 and #18. :/
Quote:
Originally Posted by jon Elson
If there was a way to have gnumeric know to use courier new whenever courier is called for, or some kind of macro program to go through all gnumeric and xls files and change courier to courier new, that would fix my situation. But, I am trying to AVOID having to do this manually.
Depending on the specifics of the file format, this might be as simple as loop + Sed (although it could also be a lot more involved).
Can you backup and edit a single file then compare the before and after to see what has changed?
Quote:
Originally Posted by jon Elson
Well, I have downloaded a legacy courier.ttf file, and put it in my /usr/share/fonts/truetype directory, and it shows up correctly in gnome-font-viewer, but not in font-manager or gnumeric.
I'm not sure how to determine this, but are you sure Gnumeric is looking for a TTF file? (I have a Courier font that is a FON file, which is bitmap not vector; may or not be the same as the PCF one you tried.)
Presumably there's some place in the Gnumeric source code and/or saved file that will identify what format(s) it accepts.
This was covered in posts #1, #6 and #18. :/
I'm not sure how to determine this, but are you sure Gnumeric is looking for a TTF file? (I have a Courier font that is a FON file, which is bitmap not vector; may or not be the same as the PCF one you tried.)
I have no idea what font format gnumeric uses, although for screen presentation, bitmaps seem to make the most sense. But, ALSO the font-manager utility in Ubuntu shows the same blocks with hex numbers for "Courier".
Thanks,
Jon
Depending on the specifics of the file format, this might be as simple as loop + Sed (although it could also be a lot more involved).
Can you backup and edit a single file then compare the before and after to see what has changed?
WOW, this actually looks like it will work! I had to do a bunch of stuff to force gunzip to unzip the .gnumeric file into pure ASCII XML, then the editing was easy with emacs, then recompress, rename and it seems to work. I just changed all occurrences of "Courier" to "Courier New" and the spreadsheets look fine.
Not sure how difficult it would be to create a script to do this.
Doesn't sound like it'd be too bad, especially if it extracts a single file. (For decompression you may want "unzip" rather than "gunzip", specifically "unzip -p" may avoid needing to creating a temporary file.)
For editing, there are dedicated tools for dealing with XML via command line/scripts - I think XMLStarlet is the favoured one.
Well, the problem has been beaten into submission, but not actually solved.
I wrote a script to :
copy the .gnumeric file to .gz
gunzip the file to ASCII XML
sed all ocurrences of "Courier" to "Courier New"
gzip the file
rename to .gnumeric
and voila, the fields that were unreadable are now visible.
Some older files I had that were created by the NExS spreadsheet program had some formulas that did not convert properly, so those had to be dealt with manually.
So, at least partly, I was able to automate the process.
Thanks for all the suggestions, guys!
Jon
I guess you could also use the ssconvert tool that comes with Gnumeric.
At the very least, you can directly unpack .gnumeric files with it.
And converting to a spreadsheet format that doesn't support fonts (e.g. OLEO, or SC) and then back to .gnumeric might just force Gnumeric to use default font.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.