Ver código fonte

use thinner antialiasing for mac

Mike L 3 anos atrás
pai
commit
7ae578c8cb
2 arquivos alterados com 5 adições e 4 exclusões
  1. 2 2
      dist/webshot.js
  2. 3 2
      src/webshot.ts

+ 2 - 2
dist/webshot.js

@@ -101,8 +101,8 @@ class Webshot extends CallableInstance {
                             'section+div{overflow:hidden} section+*>*{position:relative!important} article{border-bottom:1px solid!important} ' +
                             'main section+div>ul{width:auto!important;padding:16px 0!important} main section+div>ul>div>li{padding:6px 2px 12px!important}',
                     }))
-                        .then(() => page.addStyleTag({
-                        content: '*{font-family:-apple-system,".Helvetica Neue DeskInterface",Hiragino Sans,Hiragino Sans GB,sans-serif!important}',
+                        .then(() => page.addStyleTag({ content: '*{font-family:-apple-system,".Helvetica Neue DeskInterface",Hiragino Sans,Hiragino Sans GB,sans-serif!important}' +
+                            '*{-webkit-font-smoothing:antialiased!important}',
                     }))
                         .then(() => page.evaluate(() => {
                         let time = document.querySelector('div>div>time');

+ 3 - 2
src/webshot.ts

@@ -140,8 +140,9 @@ class Webshot extends CallableInstance<[LazyMediaItem[], (...args) => void, numb
               'section+div{overflow:hidden} section+*>*{position:relative!important} article{border-bottom:1px solid!important} ' +
               'main section+div>ul{width:auto!important;padding:16px 0!important} main section+div>ul>div>li{padding:6px 2px 12px!important}',
             }))
-            .then(() => page.addStyleTag({
-              content: '*{font-family:-apple-system,".Helvetica Neue DeskInterface",Hiragino Sans,Hiragino Sans GB,sans-serif!important}',
+            .then(() => page.addStyleTag({content:
+              '*{font-family:-apple-system,".Helvetica Neue DeskInterface",Hiragino Sans,Hiragino Sans GB,sans-serif!important}' +
+              '*{-webkit-font-smoothing:antialiased!important}',
             }))
             // display absolute date and time, remove time element in thread and remove "comment limited" notice
             .then(() => page.evaluate(() => {