Skip to content

Commit

Permalink
Add a text file to describe why the page loading is faster
Browse files Browse the repository at this point in the history
  • Loading branch information
ZYFDroid committed Jun 25, 2020
1 parent fcd1ad6 commit 97d70f7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/src/main/assets/why_roboto.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
WHY ROBOTO.TTF
-------------------------------------------
No matter what font is used.
The font is a fallback font to speed up the page loading. The book will try to load font and alternative fonts (and then it will be blocked by CORS or it does not exists at all.). The roboto.ttf is provided when the book try to load fonts that does not exists, Then it will stop loading the other fallback fonts.

为什么会有个ROBOTO.TTF
-------------------------------------------
其实用什么字体都可以
这玩意是一个默认字体,用来加速书的加载,因为有的书在css里弄了一大堆字体和替代字体,然后一打开就开始加载(然后被CORS阻止(并且压根不存在)),加载大量字体导致书页加载缓慢
一旦页面尝试加载不存在的字体,统统返回roboto,这样就不会加载后续的替代字体了,因此提高加载速度(手机上最明显)

0 comments on commit 97d70f7

Please sign in to comment.