You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Arial as font.sans-serif in a figure will produce an EPS file that can't be opened or converted to PDF. In my case, using any other font, e.g. Bitstream Vera Sans or Liberation Sans produces a valid EPS.
Something going wrong with the carriage returns right before Hebrew?:
b'%%Copyright: \xa9 2015 The Monotype Corporation. All Rights Reserved. \r\rHebrew OpenType Layout logic copyright \xa9 2003 & 2007, Ralph Hancock & John Hudson. This layout logic for Biblical Hebrew is open source software under the MIT License; see embedded license description for details.\r\n'
b'/Notice (\xa9 2015 The Monotype Corporation. All Rights Reserved. \r\rHebrew OpenType Layout logic copyright \xa9 2003 & 2007, Ralph Hancock & John Hudson. This layout logic for Biblical Hebrew is open source software under the MIT License; see embedded license description for details. Arial is a trademark of The Monotype Corporation.) def\r\n'
That line comes directly from the arial.ttf file in the conversion from TTF to Type 3 in ttconv. I suspect that ttconv needs to escape/sanitize/normalize those newlines rather than just copying it over blindly. Does setting ps.fonttype to 42 work as a workaround (at the expense of some file size)?
#5414 will hopefully someday address this by replacing the font-subsetting code.
I believe Microsoft releases Arial, but I doubt we'll convince them to fix it -- I think more likely we'll have to work around it, even if it's to hardcode a workaround to particular non-standard fonts like this.
Activity
petebachant commentedon Jan 17, 2016
Looks like the EPS file is leaving in lines that should be commented:
petebachant commentedon Jan 17, 2016
Something going wrong with the carriage returns right before
Hebrew?:tacaswell commentedon Jan 17, 2016
I assume this on windows?
petebachant commentedon Jan 17, 2016
Indeed. FWIW, the EPS wouldn't open on Linux either. I removed the carriage returns from
\r\r\Hebrewand they work now.tacaswell commentedon Jan 17, 2016
I meant generated on windows.
On Sun, Jan 17, 2016, 09:06 Pete Bachant notifications@github.com wrote:
mdboom commentedon Jan 18, 2016
That line comes directly from the
arial.ttffile in the conversion from TTF to Type 3 inttconv. I suspect thatttconvneeds to escape/sanitize/normalize those newlines rather than just copying it over blindly. Does settingps.fonttypeto 42 work as a workaround (at the expense of some file size)?#5414 will hopefully someday address this by replacing the font-subsetting code.
petebachant commentedon Jan 18, 2016
Nope, unfortunately, setting
rcParams["ps.fonttype"] = 42has the same issue.MMCMA commentedon Mar 16, 2016
I suppose there is no fix yet to the problem?
petebachant commentedon Mar 16, 2016
I used this as a workaround for now:
MMCMA commentedon Mar 16, 2016
Great, thanks.
MMCMA commentedon Mar 18, 2016
If this adds anything to solving the problem, I don't face the problem on win7 (only on win8.1). Can't check win10 at the moment.
tacaswell commentedon Mar 18, 2016
@mdboom Can you point me to where this code is?
Is this something we can report upstream against windows (or who ever the source of that font file is)?
MMCMA commentedon Mar 21, 2016
FYI, the problem appears on win10 as well.
mdboom commentedon Mar 21, 2016
@tacaswell: The new font subsetting code lives in freetypy -- not done yet, but it already might do better on this particular problem. https://github.com/matplotlib/freetypy/blob/master/lib/freetypy/subset.py
I believe Microsoft releases Arial, but I doubt we'll convince them to fix it -- I think more likely we'll have to work around it, even if it's to hardcode a workaround to particular non-standard fonts like this.
[-]Arial font produces unreadable EPS[/-][+]Some Microsoft fonts produce unreadable EPS[/+]QuLogic commentedon Jun 1, 2016
#6525 has pointed out that this occurs with Calibri as well.