GnuCash
Contact   Instructions
Bug 797054 - Reports are rendered in Greek glyphs
Summary: Reports are rendered in Greek glyphs
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Reports (show other bugs)
Version: 3.4
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: reports
QA Contact: reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-18 14:29 EST by lenrsmith
Modified: 2021-02-27 12:55 EST (History)
6 users (show)

See Also:


Attachments
Example of rendered glyphs (8.20 KB, image/png)
2019-01-18 14:29 EST, lenrsmith
no flags Details
Example HTML Output (232 bytes, text/html)
2019-01-18 15:42 EST, lenrsmith
no flags Details
Report Tmp File (4.40 KB, text/html)
2019-01-31 21:56 EST, lenrsmith
no flags Details
Stylesheet Fonts Screenshot (131.53 KB, image/png)
2020-06-20 16:10 EDT, Paul Chandler
no flags Details

Description lenrsmith 2019-01-18 14:29:38 EST
Created attachment 373132 [details]
Example of rendered glyphs

I cannot use any report in version 3.4. The text is rendered in Greek glyphs despite the system locale settings. The text is not translated into Greek. If I copy and paste the text into another editor it renders with the correct glyphs.
Comment 1 John Ralls 2019-01-18 15:35:33 EST
Cool. Please export the HTML (there's an "Export..." button on the report toolbar) and attach it?
Comment 2 lenrsmith 2019-01-18 15:42:50 EST
Created attachment 373133 [details]
Example HTML Output

Here is an example of the HTML output.
Comment 3 John Ralls 2019-01-18 18:33:10 EST
And of course it displays normally if you open it in Safari.

Not only can I not replicate this, I can't see any way it can happen: Even if you'd somehow managed to get libwebkit (which we use for displaying report pages) to use a Greek single-byte character set, there's no consistent offset that transforms the ascii characters in the html to the Greek correspondents, so some programmatic transliteration has gotten applied. (There's a tool for that at https://stevemorse.org/greek/eng2grk.html, but it produces a different string: 
Ταξ Ινβοις 
Νο ινβοις [h]ας μπην σελεκτεντ πλεας υς δ Οπτιονς μενυ το σελεκτ ονε
).
Comment 4 lenrsmith 2019-01-21 16:57:12 EST
Thanks, John. I am just getting back to this. Yeah, I have no idea what is going on. Everything worked before with ~2.6. I upgraded to 3.4 after upgrading to MacOS 10.14.2. If I can provide any further information, I will be glad to do so. At the moment, I am stuck building invoices manually in a spreadsheet.
Comment 5 John Ralls 2019-01-21 18:10:23 EST
Exporting seems to work OK, so just export, open the file in your normal browser, and print.
Comment 6 John Ralls 2019-01-21 18:11:11 EST
For that matter, have you tried printing from GnuCash? Does it print out in Greek letters too?
Comment 7 lenrsmith 2019-01-21 18:17:54 EST
I have exported to PDF with the same result. The export to HTML and print from browser is an okay temporary solution. It is not viable long term.
Comment 8 lenrsmith 2019-01-21 18:20:39 EST
Just printed directly from Gnucash, and the results are the same.
Comment 9 John Ralls 2019-01-21 18:30:24 EST
And "are the same" no doubt means "comes out in Greek letters".

You're using the Gnucash.app that I build, right?

Can you try creating a new user, switching to that user, and running GnuCash? That will test whether it's something in your environment (a Safari or Chrome plugin maybe) that's somehow affecting the webkit built into GnuCash.
Comment 10 lenrsmith 2019-01-22 14:28:56 EST
Created a new user and ran GnuCash under that account. Still got Greek letters in the invoice output.

Re: "You're using the Gnucash.app that I build, right?" I am not sure what you are asking? I use Gnucash.app that I downloaded from Sourceforge via the Gnucash website.
Comment 11 John Ralls 2019-01-22 15:00:48 EST
Yes, that's the one I build.

One last straw to grasp: With a report open in GnuCash find $TMPDIR/gnc-report-XXXXXX.html and attach that. The easiest way to get it to where you can attach it is to open Terminal and type

   cp $TMPDIR/gnc-report<TAB> ~

where <TAB> means press the tab key and ~ is shift `, the key to the left of 1.
Comment 12 lenrsmith 2019-01-31 21:56:27 EST
Created attachment 373149 [details]
Report Tmp File
Comment 13 lenrsmith 2019-01-31 21:57:54 EST
Finally got another minute to look at this. Attached the temporary file you requested, and I opened it and looked at the HTML. Looks fine from what I can see. I also uninstalled the extra keyboards I had loaded to make sure they were not part of the problem. Still no joy.
Comment 14 Paul Chandler 2020-06-20 16:10:28 EDT
Created attachment 373743 [details]
Stylesheet Fonts Screenshot

I managed to accidentally reproduce this issue and found that, if the original issue was the same as mine, it can be fixed by replacing the font "None" with real fonts (I was going to say true fonts but that might be a little misleading, although I'm sure it would work).

From the Edit menu select Stylesheets, then Default and opt to edit it. Click on the Fonts tab and select your preferred font for each box. Save the changes and retry the report.
Comment 15 Wm 2020-11-01 04:50:13 EST
@Paul did a font get deleted for that to happen ?  I'm guessing you didn't delete it on purpose but as far as I can tell you can't set a font to "None" so either it needed to be there beforehand or gnc presumed a font that wasn't present or something else ??
Comment 16 Geert Janssens 2020-11-03 03:55:33 EST
There have been other "font-not-found" related bugs recently (for example bug 797995). The symptoms are not exactly the same but perhaps the cause is ?

You could try the manual fix in bug 797995 to check if that also brings back the missing fonts.
Comment 17 John Ralls 2020-11-03 11:52:28 EST
(In reply to Geert Janssens from comment #16)
> There have been other "font-not-found" related bugs recently (for example
> bug 797995). The symptoms are not exactly the same but perhaps the cause is ?
> 
> You could try the manual fix in bug 797995 to check if that also brings back
> the missing fonts.

The manual fix in bug 797995 applies only to Gnucash.app 4.2 and was caused by a mistake I made in gtk-osx. Previous versions, including  GnuCash 3.4, had a more complete list of font directories. That said, Apple at some point added a directory misnamed /System/Library/Fonts/Supplemental and moved all of the commonly used font files there. Adding that as the first <dir>...</dir> entry in fonts.conf might have a beneficial effect.

The bit about None has to do with a Pango change from a year or so ago, which set the system ui font on macOS to .AppleSystemUIFont; apparently someone thought that passing that to CoreText would return a reference to the actual system ui font because Apple changes that from time to time. It doesn't, so I've added a test in GnuCash that falls back to Arial if the system ui font comes up empty. That will be in 4.3. Based on the example html from the second attachment that's not at play either; when it does the attribute is "font-family: .AppleSystemUIFont, Sans-Serif;" but in the attachment it's just Sans.
Comment 18 Wm 2020-11-04 13:46:38 EST Comment hidden (offtopic)
Comment 19 John Ralls 2021-02-27 12:55:06 EST
MacOS font issues are resolved in GnuCash 4.3 and later.

Note You need to log in before you can comment on or make changes to this bug.