Page MenuHomePhabricator

Add "free" alternate to Frutiger font family (Firo? Arimo?) for SVG rendering support
Closed, DeclinedPublic

Description

A while back Arimo was recomended as an in browser font in connection with Wikimedia projects layout design.

I noted this, and when I needed an alternate for "Frutiger" in an extracted image, I figured that as it was already being recommended for use it would be reasonable to expect that it should be possible to use it as a substitute.

However, the SVG rendering portion of Mediwaiki thought otherwise and applied a 'subsitution' which lead to clipped images.

Would it be possible for support for the Arimo family to be added to the fonts used for rending SVG in MediaWiki on Wikimedia projects.

The reason for this request is that the dimensional data on the diagrams in the PDF here, https://commons.wikimedia.org/wiki/Category:Traffic_Signs_Manual_%28UK%29
are in some cases text based, and using a "metric-compatiable" alternative to Furtiger would be desirable.

Event Timeline

ShakespeareFan00 raised the priority of this task from to Medium.
ShakespeareFan00 updated the task description. (Show Details)
ShakespeareFan00 subscribed.
ShakespeareFan00 renamed this task from SVG Support for Arimo font (or metric compatiable "free" alternate to Furtiger family.? to SVG rednering support for Arimo font (or metric compatiable "free" alternate to Frurtiger family.?.Feb 1 2016, 11:04 PM
ShakespeareFan00 set Security to None.
ShakespeareFan00 renamed this task from SVG rednering support for Arimo font (or metric compatiable "free" alternate to Frurtiger family.? to SVG rendering support for Arimo font (or metric compatible "free" alternate to Frurtiger family.?.Feb 1 2016, 11:48 PM

Thanks for reporting this. How and where can the current problem be seen (testcase URL), and what is the expected behavior?

Aklapper -
The problem arises with the content here - https://commons.wikimedia.org/wiki/Category:Traffic_Signs_Manual_%28UK%29 - The PDF uses Frutiger, meaning that when the figures are extracted in Inkscape (or some other SVG editor) a Font substitution is made, this in some cases leads to text being clipped.

The previous versions which demonstrated the problem were deleted (per Commons policy ), so I don't have a test case to hand, but an extracted figure (To SVG) from any of the TSM volume PDF which has text will show the issue.

Currently , I've been updating the figures to use sans-serif(effectively DejaVu Sans) (and then converting the text to paths), which is a temporary work-around.

I was suggesting Arimo (or Fira) might be a closer match in metrics terms, meaning that with a sutiable fontconfig substitution, I can save myself a lot time this side. and get a figure that's a lot closer to the ones in the PDF, without font data"leaking". I don't have Frutiger ( a propriaetry font) installed in order to be able to generate a test example. Sorry :(

This one is using DejaVu Sans explicitly and the rendering is wrong.

Aklapper renamed this task from SVG rendering support for Arimo font (or metric compatible "free" alternate to Frurtiger family.? to Add "free" alternate to Frurtiger font family (like Arimo?) for SVG rendering support.Feb 5 2016, 12:02 PM
Aklapper lowered the priority of this task from Medium to Low.

Update: I know WHY it broke.

Inkscape and Firefox allow for the processing of "manual kerning" information.

For whatever reason (possibly licensing, makes evil noises about evil patents) , rsvg isn't doing the kerning in the same way, which means the text doesn't render, and becaause the unclipped version goes over the nominal 'viewbox' it gets clipped.

Would you like me to do some further testing?

Inkscape and Firefox allow for the processing of "manual kerning" information.
rsvg isn't doing the kerning in the same way, which means the text doesn't render,

How would adding just another font family on the servers solve that problem?

It wouldn't, and I've opened a separate report on that issue specifically.

I've just done a test in Inkscape using Fira Sans, took out the Manual Kerning, and for practical purposes it's an acceptable match for (Frutiger).

Next problem how to convince people to put Fira on the Wikimedia Servers.

Aklapper renamed this task from Add "free" alternate to Frurtiger font family (like Arimo?) for SVG rendering support to Add "free" alternate to Frurtiger font family (Firo? Arimo?) for SVG rendering support.Feb 9 2016, 10:43 AM
TTO renamed this task from Add "free" alternate to Frurtiger font family (Firo? Arimo?) for SVG rendering support to Add "free" alternate to Frutiger font family (Firo? Arimo?) for SVG rendering support.Feb 9 2016, 11:12 AM
TTO updated the task description. (Show Details)

Next problem how to convince people to put Fira on the Wikimedia Servers.

Is Fira available as a Debian package?

It's a part of the texlive-fonts-extra package.

Currently, we only have the texlive-fonts-recommended package installed.

So we have three possibilities:

  • decide do install all the fonts provided by texlive-fonts-extra
  • defer this bug resolution pending a package only for Fira landed in Debian and Ubuntu
  • maintain ourselves an extra fonts package which will first include fira and will include in the future any open source font needed for SVG rendering

@Dereckson : We already have texlive-fonts-extra installed on the image scalers. While it is not explicity mentioned in puppet's mediawiki::packages::fonts, it gets installed via indirect dependencies. But these are TeX fonts anyway, I don't think they're usable here.

fonts-fira has been requested for packaging in Debian, but some license concerns have been raised at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724629 . I'm not sure how valid these concerns are since there are plenty of font packages in Debian which only ship a TTF file and no font source.

This comment was removed by kaldari.

Neither Firo Sans nor Arimo appear to be metrically equivalent to Frutiger from my tests. Firo Sans is narrower and Arimo is wider. Neither of them seem to based on Frutiger or especially similar to it.

Recommend declining, as there doesn't seem to be a "metric-compatiable" alternative to Frutiger.

The root "problem" is that Frutiger is non-free.

If there was a directly 'metric-equivalent' version, then this thread could be closed easily.

The same could be said of any other popular non-free fonts.

Istok is another possibility. It's unlikely you'll ever get a 100% metrics match.

Closing as Declined, No consensus to implement has emerged.