bugGNU Octave - Bugs: bug #44668, "fontname" is ignored...

 
 

bug #44668: "fontname" is ignored for OpenGL printing

Submitted by:  Ben Abbott <bpabbott>
Submitted on:  Mon 30 Mar 2015 01:30:06 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Pantxo Diribarne <pantxo>
Originator Name: Ben AbbottOpen/Closed: Closed
Release: 3.8.2Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 02 Apr 2015 06:50:20 PM UTC, comment #4:

Thanks Ben, I pushed the patch here:
http://hg.savannah.gnu.org/hgweb/octave/rev/1929d9218ac0

Closing report.

Pantxo Diribarne <pantxo>
Project MemberIn charge of this item.
Wed 01 Apr 2015 12:06:54 AM UTC, comment #3:

I applied the patch to the stable branch and tried the script below.

In each case I got the desired result.

I didn't try applying to the default branch because building the default branch on MacOS 10.10 is currently broken.

Ben Abbott <bpabbott>
Project Member
Tue 31 Mar 2015 10:28:43 PM UTC, comment #2:

I attached a patch that fixes the issue for me and also adds support for bold an italic fonts in printed output.

(file #33501)

Pantxo Diribarne <pantxo>
Project MemberIn charge of this item.
Mon 30 Mar 2015 02:43:33 PM UTC, comment #1:

Hi Ben,

The gl2ps utility only supports a few fonts [1], i.e. those that are "guaranteed to be available to the viewer application". Our implementation substitutes any unsupported font by Helvetica.
In this case, the problem is that Octave expects lowercase and thus doesn't recognize "Courier" as it expects you to write it "courier". I'll fix this by lowercasing the fontname before comparison with supported fonts.

If I replace "Courier" by "courier" in your example the eps actually uses courier font. The workaround is thus to use lowercase fontnames among "courier", "times-roman" (or "times"),"zapfdingbats" or "symbol".

[1] http://geuz.org/gl2ps/#tthFtNtAAC

Pantxo Diribarne <pantxo>
Project MemberIn charge of this item.
Mon 30 Mar 2015 01:30:06 PM UTC, original submission:

All the text produced by simple script below

are Helvetica

I'm running 3.8.2 on Mac OS 10.10 (Yosemite). I expected this problem also exists for the development branch. Unfortunately, I'm presently unable to build the default branch, so I've marked this as a bug for 3.8.2.

In the event that others get a different result, I've attached my eps-file.

Ben Abbott <bpabbott>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #33501:  fix_printfonts.patch added by pantxo (2KiB - text/x-diff)
file #33490:  test.eps added by bpabbott (6KiB - application/postscript)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by bpabbott (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Apr 2015 06:50:20 PM UTCpantxoStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Tue 31 Mar 2015 10:28:43 PM UTCpantxoAttached File-=>Added fix_printfonts.patch, #33501
    Mon 30 Mar 2015 02:43:33 PM UTCpantxoStatusNone=>Confirmed
      Assigned toNone=>pantxo
    Mon 30 Mar 2015 01:30:07 PM UTCbpabbottAttached File-=>Added test.eps, #33490

    Back to the top


    Powered by Savane 3.1-cleanup1