doutan2111 2016-12-06 15:26
浏览 112
已采纳

Roboto字体下延器在Safari中无法正确呈现

I'm making my first steps learning to code. I have been taking some courses on Internet and now I'm developing a Wordpress child theme so I can continue learning from the practice.

The thing is that I'm using a Google font called Roboto. It works perfectly on Google Chrome but when I use Safari the descenders of my characters doesn't render correctly. This is an example for the "g" and the "j":

enter image description here

You can find the link here:http://mmparis.com/SMtestsite/paintings/beijing/

I uploaded this font using the functions.php file:

function wpb_add_google_fonts() {

wp_enqueue_style( 'wpb-google-fonts', 'https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i', false ); 
}

add_action( 'wp_enqueue_scripts', 'wpb_add_google_fonts' );

I've been looking for a lot of tutorials and posts here but I can't find the reason or the solution. Do you have some suggestion?

Thank you

  • 写回答

1条回答 默认 最新

  • doucuo1642 2016-12-06 15:43
    关注

    I had a quick inspect in Chrome on Windows and it looks like some of the padding is sitting over the bottom of the text.

    enter image description here

    Try adding height:30px; to .menu-toggle and see if that works. It should stop the padding sitting on it.

    .menu-toggle {
        height: 30px;
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 爬取1-112页所有帖子的标题但是12页后要登录后才能 我使用selenium模拟登录 账号密码输入后 会报错 不知道怎么弄了
  • ¥30 关于用python写支付宝扫码付异步通知收不到的问题
  • ¥50 vue组件中无法正确接收并处理axios请求
  • ¥15 隐藏系统界面pdf的打印、下载按钮
  • ¥15 MATLAB联合adams仿真卡死如何解决(代码模型无问题)
  • ¥15 基于pso参数优化的LightGBM分类模型
  • ¥15 安装Paddleocr时报错无法解决
  • ¥15 python中transformers可以正常下载,但是没有办法使用pipeline
  • ¥50 分布式追踪trace异常问题
  • ¥15 人在外地出差,速帮一点点