Forgot password?
 Create new account
View 260|Reply 3

pdf字體去重——MathJax-Math-Italic

[Copy link]

3148

Threads

8497

Posts

610K

Credits

Credits
66188
QQ

Show all posts

hbghlyj Posted at 2024-2-9 16:55:17 |Read mode
這帖,我們來研究一下MathJax-Math-Italic怎麼替换。
檢查發現pdf中的字體SubType是<0041> Tj,而pdf中的是<41> Tj,没有了前綴00
所以先打開FontForge用Reencode>Glyph order
Screenshot 2024-02-09 114135.png
再打印成pdf:
Screenshot 2024-02-09 120205.png
$type singlepage.pdf (39.23 KB, Downloads: 35)
這時,再打開,發現已經成了2位的了
Screenshot 2024-02-09 112256.png

3148

Threads

8497

Posts

610K

Credits

Credits
66188
QQ

Show all posts

 Author| hbghlyj Posted at 2024-2-9 19:29:11
$type singlepage.py (664 Bytes, Downloads: 36)
將dzicon.ttf、singlepage.pdf放在同一目錄下,運行singlepage.py更新singlepage.pdf
現在singlepage.pdf上有5種常規字體、dzicon、MathJax-Math-Italic
運行pdflatex 1.tex
$type 1.tex (184 Bytes, Downloads: 43)
運行python replace.py
$type replace.py (1.86 KB, Downloads: 36)

3148

Threads

8497

Posts

610K

Credits

Credits
66188
QQ

Show all posts

 Author| hbghlyj Posted at 2024-2-9 20:06:46
再運行GS
  1. gswin64c.exe -sDEVICE=pdfwrite -dFirstPage=2 -dNOPAUSE -dQUIET -dBATCH -dPrinted=false -sOutputFile=1_modified_compressed.pdf 1_modified.pdf
Copy the Code

得到
$type 1_modified_compressed.pdf (710.76 KB, Downloads: 36)
pdffonts結果:
Screenshot 2024-02-09 120554.png

3148

Threads

8497

Posts

610K

Credits

Credits
66188
QQ

Show all posts

 Author| hbghlyj Posted at 2024-2-9 20:08:57
這次是把MathJax-Math-Italic 去重了,文件大小由昨天7楼的711.19KB减少到710.76 KB
(因為只有3頁,重複的不多。頁數多了就能體現出來。)

手机版Mobile version|Leisure Math Forum

2025-4-21 01:38 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list