8000 Remove cutout for missing font file in PdfFile._embedTeXFont. · matplotlib/matplotlib@6bf2230 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6bf2230

Browse files
committed
Remove cutout for missing font file in PdfFile._embedTeXFont.
If fontfile is None, an error would already have been raised earlier in dviFontName (which explicitly checks for this case). (The cutout in _embedTeXFont was introduced first, in ed0066f (2009), but support for that case appears to have been broken a bit later and the check in dviFontName was then introduced in 4fcc0e7 (2016) where it simply improved the clarity of the exception ultimately raised.)
1 parent 03fa1ff commit 6bf2230

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

lib/matplotlib/backends/backend_pdf.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,18 +1021,6 @@ def _embedTeXFont(self, fontinfo):
10211021
0, *map(Name, dviread._parse_enc(fontinfo.encodingfile))],
10221022
}
10231023

1024-
# If no file is specified, stop short
1025-
if fontinfo.fontfile is None:
1026-
_log.warning(
1027-
"Because of TeX configuration (pdftex.map, see updmap option "
1028-
"pdftexDownloadBase14) the font %s is not embedded. This is "
1029-
"deprecated as of PDF 1.5 and it may cause the consumer "
1030-
"application to show something that was not intended.",
1031-
fontinfo.basefont)
1032-
fontdict['BaseFont'] = Name(fontinfo.basefont)
1033-
self.writeObject(fontdictObject, fontdict)
1034-
return fontdictObject
1035-
10361024
# We have a font file to embed - read it in and apply any effects
10371025
t1font = _type1font.Type1Font(fontinfo.fontfile)
10381026
if fontinfo.effects:
3720

0 commit comments

Comments
 (0)
0