LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 09-25-2021, 11:05 AM   #16
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,249

Rep: Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323

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.
 
Old 09-25-2021, 03:25 PM   #17
jon Elson
Member
 
Registered: May 2018
Posts: 60

Original Poster
Rep: Reputation: Disabled
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
 
Old 09-25-2021, 03:41 PM   #18
jon Elson
Member
 
Registered: May 2018
Posts: 60

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post
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
 
Old 09-25-2021, 07:07 PM   #19
jon Elson
Member
 
Registered: May 2018
Posts: 60

Original Poster
Rep: Reputation: Disabled
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?
 
Old 09-25-2021, 11:56 PM   #20
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
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?

If so, there is another way of getting it use your package manager to install
ttf-mscorefonts-installer

debian package tells you what it does
https://packages.debian.org/bullseye...onts-installer

after it installs run this command
Code:
for family in "Courier New"; do   echo -n "$family: ";   fc-match "$family"; done
My result is
Courier New: Courier_New.ttf: "Courier New" "Regular"

ref
https://jichu4n.com/posts/how-to-set...ases-on-linux/

It is probably safer to then do a full reboot before opening gnumeric and trying again YMMV

Last edited by aus9; 09-25-2021 at 11:58 PM.
 
Old 09-26-2021, 09:14 AM   #21
jon Elson
Member
 
Registered: May 2018
Posts: 60

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by aus9 View Post
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.

Thanks,
Jon
 
Old 09-26-2021, 09:17 AM   #22
jon Elson
Member
 
Registered: May 2018
Posts: 60

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by aus9 View Post
after it installs run this command
Code:
for family in "Courier New"; do   echo -n "$family: ";   fc-match "$family"; done
My result is
Courier New: Courier_New.ttf: "Courier New" "Regular"
Here's what I get for Courier (I get the same result as you for "courier New":

for family in "Courier"; do echo -n "$family: "; fc-match "$family"; done
Courier: pcrr8a.pfb: "Courier" "Regular"
 
Old 09-26-2021, 09:25 AM   #23
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,628

Rep: Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557
Quote:
Originally Posted by aus9 View Post
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 View Post
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 View Post
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.


Last edited by boughtonp; 09-26-2021 at 09:33 AM.
 
Old 09-26-2021, 11:01 AM   #24
jon Elson
Member
 
Registered: May 2018
Posts: 60

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by boughtonp View Post
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
 
Old 09-26-2021, 11:22 AM   #25
jon Elson
Member
 
Registered: May 2018
Posts: 60

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by boughtonp View Post

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.

Thanks,
Jon
 
Old 09-26-2021, 11:45 AM   #26
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,628

Rep: Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557

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.

 
Old 09-26-2021, 02:19 PM   #27
jon Elson
Member
 
Registered: May 2018
Posts: 60

Original Poster
Rep: Reputation: Disabled
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
 
Old 09-29-2021, 03:46 PM   #28
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
firefox 3.0.4 replace courier with Courier New font m --help Linux - Desktop 5 05-15-2009 10:06 AM
posfix with courier maildrop and courier-imap Anuragn Linux - Enterprise 4 01-17-2007 04:33 AM
Configuring courier-imap courier-pop redsky Debian 1 06-02-2004 03:09 PM
Configuring courier-imap courier-pop redsky Linux - Software 0 06-01-2004 12:06 PM
Courier > Procmail > Courier problem bowker Linux - Software 0 03-14-2004 05:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration