Scribus Forums

Scribus => Text and Typography => Topic started by: dezcat on October 26, 2017, 05:33:42 AM

Title: Font Substitution error @ launch
Post by: dezcat on October 26, 2017, 05:33:42 AM
When I launch Scribus, then open the document I'm working on, I always get an error/warning that there's an issue with Arial..can't be found or similar, and lets me choose a substitute font, which I've done.

Dozens of times.

Trouble is, it never seems to "stick." Next time I open the file, I get the same warning. I always check "make this permanent," Scribus always tells me that I was successful in changing the font.

Is there a way to solve this issue once and for all?

Thank you!
Title: Re: Font Substitution error @ launch
Post by: GarryP on October 26, 2017, 11:08:34 AM
I've never had this issue myself but the problem could possibly come from any number of different things.

Does this happen with every document or just one specific document? If it's just one specific document then there could be a chance that it's trying to access an Arial font that was in the document folder but isn't there anymore. Scribus can use fonts on a document-by-document basis - without you needing to install them - if you put the font file in the same folder as the document. If that font file has been moved/deleted then Scribus might be getting itself confused.

Do you have more than one Arial font installed on your machine? For example, OS X allows you to have multiple fonts with the same name installed and if one that Scribus was using has been "switched off" then that could cause a problem. As far as I know there's no way to tell Scribus to use one or the other.

Do you actually have Arial installed on your machine? Can other applications use it?

If you could give some more information - including which version of Scribus you're using and on which operating system (including version) - then this might be easier to solve. If you can supply the document - or a cut-down version that has the same problem - then that would also make things easier.
Title: Re: Font Substitution error @ launch
Post by: dezcat on October 27, 2017, 04:44:28 AM
GarryP

These are all great troubleshooting ideas. I only have one Scribus document on this machine (Ubuntu 17.04) but it was created on a Mac.

I don't know how to tell whether my Linux install has Arial on it or not; I'm fairly new to Linux. On a Mac, I know *just* where to go.

I tend not to use Arial personally...I assumed it was a default/system font.
Title: Re: Font Substitution error @ launch
Post by: GarryP on October 27, 2017, 10:57:06 AM
I've just checked on a Ubuntu 17.04 installation and Arial doesn't seem to be installed.

You can find out for yourself by going to Search (it's the swirly Ubuntu icon by default at the top-left of the desktop icon bar) and searching for "font" (without the quotes). Select "Font Viewer" to see all of the fonts that are installed.

If you don't want to install Arial you can use DejaVu Sans or Liberation Sans instead. They're not quite the same but similar. Maybe someone else could give a better suggestion.

If you do want Arial, one path would be to:
* Go to Terminal;
* Type "sudo apt-get install msttcorefonts" (without the quotes)
* Give the administrator password if required;
* Accept that extra space will be used when/if asked;
* Accept the licence agreenment when asked (use TAB and ENTER to accept if necessary);
* Exit Terminal by typing EXIT and pressing ENTER.
You should now be able to go back into Font Viewer and see Arial and some other "standard" MS fonts.
They should work fine with Scribus.

I hope this helps.
Title: Re: Font Substitution error @ launch
Post by: dezcat on October 29, 2017, 04:58:22 PM
That is a wealth of information, GarryP!

if I want to get my Scribus document to forget about Arial and NOT install Arial, sounds like I need to make a new Scribus document and re-populate it with images and text, not dragged from the existing "tainted" Scribus document, to make extra sure that no dependencies on Arial are brought over.

Does that sound right?

Thank you
Title: Re: Font Substitution error @ launch
Post by: GarryP on October 30, 2017, 02:07:47 PM
I've not used the font substitution functions of Scribus myself so I can't judge how well they work but since you seem to be having problems with them - from your original post - I'll assume that you need to do something else. (If font substitution isn't working then that's something for the developers to have a look at.)

You shouldn't need to create a new document from scratch but you will probably have some work to do.

If your document uses Styles - character or paragraph - then that's the place to make changes first as it's the quickest.

If you have no existing styles, you could try using the Search/Replace function to change the fonts but that's never worked well for me. It either hangs for ages or crashes the application completely - even on short bits of text.

If none of that is good for you then I would probably recommend creating new Styles - character styles first, then paragraph styles based on the character styles - so that you can then apply the styles quickly to reformat the relevant bits of text. Once you've got the styles set-up - even if they're not quite right - it's very easy to apply them and tweak them later.

Even if you do all of the reformatting you might find that Scribus still insists on having Arial "attached" to the document in some way, and this is sometimes because Arial is often used by the Default Styles. You can change default font in various places that I won't go into here (just yet anyway).

Once you have your document reformatted with styles, and if you are still getting problems with Arial sticking around, you could try opening the SLA in a text editor and searching for where Scribus is using it. Once you're in this sort of situation things get more complicated because the possibilities pile up, so see how you get on with the other things first.

If you do decide to start from scratch then I would recommend creating styles right from the start. They're very easy to create and will save you a whole lot of time and bother later on, especially if you need to choose a different font for whatever reason.
Title: Re: Font Substitution error @ launch
Post by: dezcat on November 14, 2017, 05:38:28 AM
I did end up creating a new scribus document, but prior to that I changed some default font - Arial - in the prefs. I guess Scribus, out of the box, expects to encounter Arial?

My change to that setting ended the problem.
Title: Re: Font Substitution error @ launch
Post by: GarryP on November 14, 2017, 11:14:40 AM
It's good to know that you've managed to get something sorted.
Thanks for telling us as it helps when other people have the same problem.
It's a shame that you had to start from scratch but that's sometimes the best solution.

P.S. I think Scribus defaults to Arial as it's one of the "web-safe fonts" that most people expect to be installed everywhere.
Title: Re: Font Substitution error @ launch
Post by: a.l.e on November 14, 2017, 11:17:58 AM
if i recall it correctly, this has been changed "recently".

now scribus should have a list of preferred fonts (and arial is afaik included).

before that, scribus was picking the first font in alphabetical order. with good chances for arial been picked on a windows computer...
Title: Re: Font Substitution error @ launch
Post by: dezcat on November 14, 2017, 02:11:43 PM
Quote from: GarryP on November 14, 2017, 11:14:40 AM
It's good to know that you've managed to get something sorted.
Thanks for telling us as it helps when other people have the same problem.
It's a shame that you had to start from scratch but that's sometimes the best solution.

P.S. I think Scribus defaults to Arial as it's one of the "web-safe fonts" that most people expect to be installed everywhere.

Yes, I am grateful not only to have found a solution but to be able to help others...it's one of those things about computing that I visualize as having toilet paper stuck to the shoe.

It is curious though, that, upon launching, Scribus wouldn't have "sniffed out" that Arial was not present, and simply let go of it, so Arial must be more important to Scribus than just some font you can pick.

I remember having an experience paring down fonts in Mac OS..fonts I never used and would never dream of using, even as the system font - how folders and menus would appear in Mac OS.

Well, suddenly my browser flipped out and instead of human-readable characters, web pages would load looking like they'd been written in Klingon. The browser was looking for - and unable to find - the fonts it needed to correctly render web pages, even though the font *I* had stipulated was not the missing one. I think it was one of those under-the-hood requirements of the browsers..

The fix was neither easy nor risk-free and IIRC, I ended up doing a re-install.

Yikes!
Title: Re: Font Substitution error @ launch
Post by: Fergus Magus on June 19, 2018, 05:00:21 AM
Under openSUSE I had the same problem. Even though I specified a replacement font and ticked the remember box, it was never remembered. The Ubuntu hint above was the answer, in openSUSE, install fetchmsttfonts, which downloads a bunch of MS fonts, including Arial.

This must be buried deep inside the code, as Arial is not mentioned anywhere in the preferences, and is not used by the default styles.
Title: Re: Font Substitution error @ launch
Post by: wb8nbs on February 22, 2019, 08:30:24 PM
I had the annoying font substitution problem every time I loaded my document. The missing font was "Times Regular" and I would substitute "Times New Roman Regular". It never stuck.

This morning I saw a post where someone edited the SLA file directly in a text editor to fix a font issue. SLA is an XML file so it is plain text. I loaded my SLA into VIM and found the offending font in the third line <DSOCUMENT apparently "Times Regular" was set as the default document font. There were no other occurrences of "Times Regular". I changed it to "Arial Regular" and no more problems.

I do recommend making a backup copy of your document before attempting a direct change like this.
Title: Re: Font Substitution error @ launch
Post by: Fruitdas on November 14, 2023, 12:07:23 PM
For reference anyone with the same problem:
The default font is under:
   Document Setup > Item Tools > Text > Text > Font:
The font here can be substituted with another font on the system/in the document to get rid of the warning.

This thread helped me find this location.