什么是字体的"EM box/EM unit"?在哪里定义 [英] What is a font's "EM box/EM unit" and where is it defined

查看:99
本文介绍了什么是字体的"EM box/EM unit"?在哪里定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CSS3 CSS字体模块第3级(候选人,10月13日)中,第2.3节中仅对"EM框"进行了引用,而对"EM单元"进行了引用.引用如下:

In the CSS3 CSS Fonts Module Level 3 (candidate Oct 13), there is a single reference to the "EM box" and one to the "EM unit" in section 2.3. The quote follows:

[font-size]属性指示字形相对于字体的期望高度.对于可缩放字体,字体大小是应用于字体的EM单位的比例因子. (请注意,某些字形可能会在其EM框外出血.)对于不可缩放的字体,字体大小将转换为绝对单位,并与声明的字体大小匹配,并为两个字体使用相同的绝对坐标空间.匹配的值.

[The font-size] property indicates the desired height of glyphs from the font. For scalable fonts, the font-size is a scale factor applied to the EM unit of the font. (Note that certain glyphs may bleed outside their EM box.) For non-scalable fonts, the font-size is converted into absolute units and matched against the declared font-size of the font, using the same absolute coordinate space for both of the matched values.

什么是"EM盒"或相关的"EM单元"?

What is the "EM box" or the related "EM unit"?

浏览器(和其他用户代理)应该从某个地方(从何处获得)?

Browsers (and other user agents) should get that from somewhere, from where?

推荐答案

在传统的排版中,大写字母M占用的空间及其周围的必填空格始终是正方形.正方形的高度或宽度("em")用作文本使用的空间单位.例如,根据该定义,一个em是一行文本的高度,其中包括了上升和下降空间,但没有任何额外的行间间距.

In traditional typography, the space taken up by a capital letter M and the mandatory whitespace around it is always a square. The height or width of the square, an "em", is used as a unit of space used by the text. For example, from that definition, one em is the height of a line of text with the ascender and descender spaces included but without any additional inter-line spacing.

em的实际大小(以磅为单位(如果您在谈论纸张)或像素(如果您在谈论计算机))取决于所选字体的字体和大小.

The actual size of an em in points (if you're talking about paper) or pixels (if you're talking about computers) depends on the typeface and size of the font you've chosen.

浏览器等从字体中获取此信息,该字体具有一个表,该表提供此类常量,它们可用来指导文本的呈现.

Browsers etc. get this information from the font, which has a table that provides constants of this sort which they can use to guide rendering of text.

这篇关于什么是字体的"EM box/EM unit"?在哪里定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆