gpt4 book ai didi

html - 在 CSS 中,我的自定义字体的底部被截断了(g 和 y)

转载 作者:太空狗 更新时间:2023-10-29 15:23:33 25 4
gpt4 key购买 nike

我不明白为什么在我的段落中落在线条下方的字母(如 g 和 y)会被截断。我尝试将行高设置得更高,但它仍然切断了它们。我在 px、pt 和 em 中玩过字体大小,但仍然没有运气。现在,当我将字体大小设置得更大(如 3.0em)时,问题就消失了。但我需要字体大约是这个大小。

这是链接:http://sportegy.com/font-test/font-test.html

您需要使用链接并查看我拥有的 .ttf 字体才能真正看到问题所在。不过,我也会在这里粘贴我的 HTML。

<html>
<head>
<style>
@font-face {
font-family: lib-font;
src: url('css/LiberationSansNarrow-Regular.ttf');
}
@font-face {
font-family: lib-bold;
src: url('css/LiberationSansNarrow-Bold.ttf');
}
</style>
</head>
<body>

<span style='font-family: lib-font;color: #232322;font-size: 1.0em;'>
The quick brown foxy was jumping over the green doggy.<br/>
The quick brown foxy was jumping over the green doggy.<br/>
The quick brown foxy was jumping over the green doggy.<br/>
The quick brown foxy was jumping over the green doggy.<br/>
The quick brown foxy was jumping over the green doggy.
</span>

最佳答案

尝试

line-height: normal;

似乎修复了一个 few people's problems .

关于html - 在 CSS 中,我的自定义字体的底部被截断了(g 和 y),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14804698/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com