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
Copy file name to clipboardExpand all lines: content/posts/GSoC_2021_MidTerm/index.md
+2-9Lines changed: 2 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,15 +40,8 @@ Something which one of my mentors said which _really_ stuck with me:
40
40
> Matplotlib isn't a font library, and shouldn't try to be one.
41
41
42
42
It's really easy to fall into the trap of trying to do _everything_ within your own project, which ends up rather _hurting_ itself.
43
-
<hr>
44
-
45
-
To give an analogy, <ins>Google Docs</ins> try to do _a lot_ of things with its platform, from basic text editing to full-fledged project management.
46
-
47
-
Compared with <ins>Notion</ins>, whose whole _niche_ is to provide a platform for project management (among other things), **some people tend to choose the latter for their specific needs.**
48
-
49
-
<hr>
50
43
51
-
Since this analogy holds true even for Matplotlib, it uses external dependencies like [FreeType](https://www.freetype.org/), [ttconv](https://github.com/sandflow/ttconv), and newly proposed [fontTools](https://github.com/fonttools/fonttools) to handle font subsetting, embedding, rendering, and related stuff.
44
+
Since this holds true even for Matplotlib, it uses external dependencies like [FreeType](https://www.freetype.org/), [ttconv](https://github.com/sandflow/ttconv), and newly proposed [fontTools](https://github.com/fonttools/fonttools) to handle font subsetting, embedding, rendering, and related stuff.
52
45
53
46
PS: If that font stuff didn't make sense, I would recommend going through a friendly tutorial I wrote, which is all about [Matplotlib and Fonts](https://matplotlib.org/stable/users/fonts.html)!
54
47
## Unexpected Complications
@@ -57,7 +50,7 @@ Matplotlib uses an external dependency `ttconv` which was initially forked into
57
50
58
51
Over the time, there were a lot of issues with it which were either hard to fix, or didn't attract a lot of attention. (See the above paragraph for a valid reason)
59
52
60
-
One major utility which is still used is `convert_ttf_to_ps`, which takes a _font path_ as input and converts it into a Type 3 or Type 42 PostScript font, which can be embedded within PS/EPS output documents. The guide I wrote (mentioned just above the recent heading) contains decent descriptions, the differences between these type of fonts, etc.
53
+
One major utility which is still used is `convert_ttf_to_ps`, which takes a _font path_ as input and converts it into a Type 3 or Type 42 PostScript font, which can be embedded within PS/EPS output documents. The guide I wrote ([link](https://matplotlib.org/stable/users/fonts.html)) contains decent descriptions, the differences between these type of fonts, etc.
61
54
62
55
#### So we need to convert that _font path_ input to a _font buffer_ input.
63
56
Why do we need to? Type 42 subsetting isn't really supported by ttconv, so we use a new dependency called fontTools, whose 'full-time job' is to subset Type 42 fonts for us (among other things).
0 commit comments