bugGNU Octave - Bugs: bug #52765, FreeSans default font is non...

 
 

bug #52765: FreeSans default font is non portable in svg printout

Submitter:  Pantxo Diribarne <pantxo>
Submitted:  Sat 30 Dec 2017 01:01:08 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 16 May 2021 05:42:13 PM UTC, comment #3: 

It is actually possible to embed fonts in a SVG files, by turning it into woff2 base64 representation, but the task is hard (and not even Inkscape support it...). We would need to build a font subsets and translate it to woff2 which only complex tools, like fontforge or python's fonttools, can do as far as I know.

Pantxo Diribarne <pantxo>
Group Member
Mon 31 Dec 2018 11:07:06 AM UTC, comment #2: 

@Rik: I think the only portable way to include text in an SVG file is to render glyphs as path. This would also be helpful in order to avoid embedding automatically fonts that may be proprietary into PDF (as we currently do with the svgconvert utility). In any event this is a long term project which can't be done before Octave 5 release, so I marked this bug as won't fix on the bug fix list per your suggestion.

Pantxo Diribarne <pantxo>
Group Member
Mon 31 Dec 2018 04:16:15 AM UTC, comment #1: 

@Pantxo: Is there anything we can realistically do on this bug before the 5.0 release?  I'm tempted to mark this as won't fix on the 5.0 bug list at https://wiki.octave.org/Bug_Fix_List_-_5.0_Release#Bugs_marked_as_regressions.

Rik <rik5>
Group administrator
Sat 30 Dec 2017 01:01:08 PM UTC, original submission:  

FreeSans is now used as the default font. Octave has a copy of this font but SVG viewers don't have access to it on systems where this font is not installed (typically all non linux systems). On Windows, I tried to open an svg produced with the current dev Octave and Inkscape chooses to replace FreeSans by some fallback sans serif font which has very different character spacing. This leads to ugly text rendering.

I see no easy way to handle this:

  • ask users to install FreeSans (the otf font file is present in the Octave install dir)
  • use css style font-family specification to suggest a fallback font (probably Helvetica) which has spacing characteristics closer to FreeSans than the default fallback font (verdana??). Something like


<text style="font-family:FreeSans, Helvetica, sans;"

  • check that FreeSans is installed (use font-config for this) and if not, use the matching font for "Helvetica" when printing.


Pantxo Diribarne <pantxo>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-12-31 pantxo StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code