简体   繁体   English

使用相同的浏览器时,字体在本地服务器和Web服务器上的呈现方式不同

[英]Font renders differently on local and webserver while using the same browser

So I was working on a custom WordPress theme lately. 所以最近我正在研究自定义WordPress主题。 I work on a local Mac OS X machine with xampp. 我在使用xampp的本地Mac OS X计算机上工作。 When I uploaded an early alpha state of the theme to the webs server, I noticed that the font looks differently than on my local machine, as you can see on this picture (left: local right: webserver). 当我将主题的早期字母状态上载到Web服务器时,我注意到该字体的外观与本地计算机上的字体不同,如您在此图片上所见(左:本地右:Web服务器)。

You can see that the font on the local machine is thicker than the font on the webserver. 您会看到本地计算机上的字体比Web服务器上的字体粗。 As font I use TP Sans from Google Fonts and I am also using Google chrome to view both sites. 作为字体,我使用Google字体中的TP Sans,也使用Google chrome浏览这两个站点。 On the local and web server are containing the exact same files of the theme. 在本地和Web服务器上都包含与主题完全相同的文件。

您可以使用Chrome的右键“ Inspect Element”来跟踪影响文本的所有CSS,这也许会导致解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM