1

Say we use helvetica for english and some exotic font(from ascii point of view) for another language in a page.

With the font size being equal, one font looks bigger on the eye.

Is there a way to specify different font size for different font used in a page?

Additionally, since the two languages can be intermingled in a line, we need to align them properly after we resize one of the font. Otherwise the smaller font might have bigger line-spacing at top , smaller line-spacing at bottom.

-- edit

Wow fast responses.
Sadly this is user-posted text like SO's question & answer.
Which is not tagged with different classes.

4

3 回答 3

0

我还建议使用 CSS,您可以为每种字体使用两个不同的类。

.font1
{
font-size:10;
color:#000;(you can use any color over here)
}

.font2{
font-size:11;
color:#efe; (you can use any color over here)
}
于 2013-07-11T20:00:53.810 回答
0

您可以使用标签或 CSS 更改字体大小。我建议使用 CSS,因为它更有条理且更易于阅读。

CSS

.firstfont{
font-size: 10px; (or whatever you want)
}

.secondfont{
font-size: 12px; (or whatever you want)
}

在 HTML 中

<div class="firstfont">
This is the first font's text
</div>

<div class="secondfont">
This is the second font's text
</div>

或者,如果您不想使用 CSS,您可以这样做

<div style="font-size:10px">
This is the first font's text
</div>

<div style="font-size:12px">
This is the second font's text
</div>
于 2013-07-11T19:46:18.200 回答
0

您可以轻松地为不同的语言设置不同的字体大小,只要您使用一些标记来区分语言(例如,lang属性)。

但是,如果问题是相同字体大小的文本看起来大小不同,那么基本问题在于您选择的字体。您通常应该使用一种字体来复制文本,选择一种涵盖您需要的所有字符的字体。如果由于某种原因你不能这样做,你应该尝试选择兼容的字体,在大小方面和其他方面。

于 2013-07-11T19:50:38.547 回答