-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See previous commit for description of pdftex.map. The vast majority of entries (dozens of thousands) in pdftex.map actually end up being unused, and their parsing is just wasted. This patch takes advantage of the fact that we can quickly recover the tex font name from pdftex.map entries (it's just the first word), so we can very quickly build a mapping of tex font names to unparsed pdftex.map entries, and then only parse the few entries that we'll need on-demand. This speeds up e.g. ``` python -c 'from pylab import *; rcParams["text.usetex"] = True; plot(); savefig("/tmp/test.pdf")' ``` by ~700ms (~20%) on the matplotlib macos.
- Loading branch information
Showing
2 changed files
with
63 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
% used by test_dviread.py | ||
TeXfont1 PSfont1 <font1.pfb <font1.enc | ||
TeXfont2 PSfont2 <font2.enc <font2.pfa | ||
TeXfont3 PSfont3 "1.23 UnknownEffect" <[enc3.foo <font3.pfa | ||
TeXfont3 PSfont3 "1.23 UnknownEffect" <[enc3.foo < font3.pfa | ||
TeXfont4 PSfont4 "-0.1 SlantFont 2.2 ExtendFont" <font4.enc <font4.pfa | ||
TeXfont5 PSfont5 <encoding1.enc <encoding2.enc <font5.pfb | ||
TeXfont6 PSfont6 | ||
TeXfont7 PSfont7 <font7.enc | ||
TeXfont8 PSfont8 <font8.pfb | ||
TeXfont7 PSfont7 < font7.enc | ||
TeXfont8 PSfont8 <<font8.pfb | ||
TeXfont9 </absolute/font9.pfb |