网页伪造域名_在网页上制作和伪造普通字

网页伪造域名

Ordinals are “counting words” like 1ˢᵗ, 2ⁿᵈ and 19ᵗʰ: they are characters that express position in a series. So-called “superior” letters are used to present some abbreviations in a similar way, such as Mᴹᴱ for the French “Madame”. All of these are forms of superscripted text, commonly used for references to footnotes, chemical compounds, and mathematical exponents.

普通字是“计数字”,例如1ˢᵗ,2ⁿᵈ和19ᵗʰ:它们是表示系列位置的字符 。 所谓的“上级”字母以类似的方式表示某些缩写,例如法语“ Madame”的Mᴹᴱ。 所有这些都是上标文本的形式,通常用于引用脚注,化合物和数学指数。

Unfortunately, superscripted text can be difficult to create and typeset correctly on the web. If you want to use finely detailed layout that includes ordinals on your pages, there are several possible solutions:

不幸的是,上标文本可能很难在网络上正确创建和排版。 如果要使用在页面上包含普通字符的精细布局,可以采用以下几种解决方案:

最佳选择:OpenType (Best option: OpenType)

A well-crafted typeface has ordinals built in, and an embedded OpenType font should have the capacity to display them. Conversion to ordinals happens automatically in applications like Microsoft Word, but not in browsers, where it must be turned on with CSS.

精心设计的字体内置有常规字体,并且嵌入式OpenType字体具有显示这些字体的能力。 转换为普通字符会自动在Microsoft Word之类的应用程序中发生,但不会在必须使用CSS启用的浏览器中发生。

Depending on the typeface and its range of ordinal characters, you may apply the CSS to all paragraphs, only certain elements, or <span> elements with classes. In this case, I’ll choose the latter:

根据字体及其顺序字符的范围,可以将CSS应用于所有段落,仅某些元素或带有class的 <span>元素 。 在这种情况下,我将选择后者:

span.ord {
	font-variant-numeric: ordinal;
	-moz-font-feature-settings: "ordn";
	-ms-font-feature-settings: "ordn";
	-webkit-font-feature-settings: "ordn";
	font-feature-settings: "ordn";
}

Applied to this paragraph:

应用于本段:

<p>The <span class="ord">1st</span> place prize is awarded to
Constance Yeargood.

Results in (in this case, displayed using the embedded Source Sans Pro typeface):

结果(在这种情况下,使用嵌入式Source Sans Pro字体显示):

The 1st place prize is awarded to Constance Yeargood.

第一名奖项授予康斯Yeargood。

Once the CSS is applied, the effect is also true for higher numbers:

一旦应用了CSS,对于更大的数字,效果也是如此:

<p>In the next two minutes humanity will take more photographs than it did 
during the entire <span class="ord">19th</span> century.

Creates:

创建:

In the next two minutes humanity will take more photographs than it did during the entire 19th century.

在接下来的两分钟内,人类将拍摄比整个19世纪更多的照片。

Note that ordinals are not the only effect of this CSS: character strings like “No.1” will be automatically converted to the numero sign plus the associated number, if the typeface supports it:

请注意,普通字符并不是此CSS的唯一作用:诸如“ No.1”之类的字符串将自动转换为数字符号以及相关的数字(如果字体支持):

Please visit us at No23 Charing Cross Road

请访问我们的No23查令十字路

Modern browsers have good support for ordinals, with the disappointing exception of their mobile cousins, at least at their current state. This situation is complicated by the fact that ordinals are best supported in OpenType fonts (.otf). While .woff should support the feature, font hosts often strip it out when converting from .otf to .woff. As a result, relatively few webfonts have glyphs that support the feature, although their numbers are growing: right now, it’s something of a hit-and-miss affair. Take care when purchasing and using web fonts, and inspect their features closely.

现代的浏览器对普通用户提供了很好的支持 ,除了他们的移动表亲之外,令人失望的是,至少在当前状态下如此。 这种情况由于OpenType字体( .otf )最好地支持普通字体而变得复杂。 虽然.woff 应该支持该功能,但字体宿主通常在将.otf转换为.woff时将其删除 。 结果,尽管字体的数量在增加,但相对来说很少有支持该功能的字形:目前,这是一桩偶然的事情。 购买和使用网络字体时请多加注意,并仔细检查其功能。

Ordinals tend to work best with lining figures, i.e. numerals that are all the same height, and sit on the same baseline. As this is the default numeral style in most typefaces, it shouldn’t worry you too much, but it’s worthwhile to double-check.

普通字符倾向于最适合衬砌图形,即所有高度相同且位于相同基线上的数字。 由于这是大多数字体中的默认数字样式,因此您不必担心太多,但值得仔细检查。

2ⁿᵈ解决方案:Unicode字符 (2ⁿᵈ solution: Unicode characters)

If your chosen web font does not have OpenType features and/or does not have the correct glyphs, you can usually fake ordinals by using Unicode characters. Again, these must be built into the typeface, but they are far more common. They can be entered as HTML entities using decimal notation, it’s usually easiest to simply copy and paste the characters into your text. I’ve left them here for you as a reference:

如果您选择的Web字体不具有OpenType功能和/或不具有正确的字形,则通常可以使用Unicode字符来伪造普通字体。 同样,这些必须内置在字体中,但它们更为常见。 可以使用十进制表示法将它们作为HTML实体输入,通常最简单的方法是将字符复制并粘贴到文本中。 我把它们留在这里供您参考:

Unicode character setGlyphs
Superscript numerals⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹
Subscript numerals₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉
Superscript ordinal characters1ˢᵗ, 2ⁿᵈ, 3ʳᵈ, 4ᵗʰ
All uppercase superscript Latin charactersᴬ ᴮ ᴰ ᴱ ᴳ ᴴ ᴵ ᴶ ᴷ ᴸ ᴹ ᴺ ᴼ ᴾ ᴿ ᵀ ᵁ ᵂ
All lowercase superscript Latin charactersᵃ ᵇ ᶜ ᵈ ᵉ ᶠ ᵍ ʰ ⁱ ʲ ᵏ ˡ ᵐ ⁿ ᵒ ᵖ ʳ ˢ ᵗ ᵘ ᵛ ʷ ˣ ʸ ᶻ
Unicode字符集 字形
上标数字 ¹³⁷⁸⁸
下标数字 ₁₂₂₈₈₈₈
上标序数字符 1ˢᵗ,2ⁿᵈ,3ʳᵈ,4ᵗʰ
所有大写上标拉丁字符 ᴰᴱᵂᵁᵂᵂᵁᵁᵂᵁ
所有小写​​的上标拉丁字符 ᵇᵉᶻᶻᶻᶻʸᶻᶻʸᶻᶻʸ

Presented as a string of characters, you may find that the lowercase ordinals “jump” up and down a great deal in some typefaces; both Latin sets are also missing characters that are not commonly used for ordinals, such as the letter Q.

用一串字符表示,您可能会发现小写字母在某些字体中上下“跳跃”很多。 这两个拉丁集也都缺少通常不常用的字符,例如字母Q。

<sup>和实体 (<sup> & Entities)

Alternatively, you can place ordinal characters inside a <sup> tag. (Or, if the characters are intended to appear below the baseline, the <sub> element). If it is supported in the typeface, the browser should use the appropriate Unicode glyphs (shown above) to display the characters inside the tag:

另外,您可以在<sup>标记内放置序数字符。 (或者,如果打算将字符显示在基线之下 ,请使用<sub>元素)。 如果字体支持,浏览器应使用适当的Unicode字形(如上所示)在标记内显示字符:

<p>The 2<sup>ND</sup> runner-up is Mythorpe Marmaduke.

Produces:

产生:

The 2ND runner-up is Mythorpe Marmaduke.

第2 亚军是Mythorpe马默杜克。

For powers or limited footnotes, there are also HTML entities:

对于权力或有限的脚注,也有HTML实体:

HTML EntitiesProduce
&ampsup1;   &ampsup2;   &ampsup3;¹   ²   &sup3
HTML实体 生产
&ampsup1; &ampsup2; &ampsup3; ¹²&sup3

These solutions come with a few potential problems:

这些解决方案存在一些潜在的问题:

sub, sup { line-height: 0; }
  • the typeface may not have the correct Unicode characters, in which case it will use a substitute from another font, or not display the glyph at all.

    字体可能没有正确的Unicode字符,在这种情况下,它将使用另一种字体的替代物,或者根本不显示该字形。
  • as noted, the Unicode superscript characters do not always sit perfectly on the same baseline.

    如前所述,Unicode上标字符并不总是完全位于同一基线上。
  • Superscripted characters may not be correctly sized, requiring more CSS to set it in proportion to the body text.

    上标字符的大小可能不正确,需要更多CSS才能与正文文本成比例设置。

结论 (Conclusion)

The typesetter’s goal should always be make text easy to read, so there is no one solution that can pointed to as being “correct”. The question is always “given this typeface used in this way under these reading conditions, what is the clearest way to present this text?”

排版人员的目标应该始终是使文本易于阅读 ,因此没有一种解决方案可以指出是“正确的”。 问题总是“鉴于在这种阅读条件下以这种方式使用这种字体,呈现此文本的最清晰方法是什么?”

If a word like loft appears similar to 10th on your pages, then you should probably use ordinals to clarify the text; which technique you use depends on the browser and typeface. Sometimes you might only want to use ordinals on headings; in other cases, it might be the entire body text.

如果喜欢阁楼的一个词出现类似至10日在您的网页,那么你或许应该使用序号,以澄清文本; 您使用哪种技术取决于浏览器和字体。 有时您可能只想在标题上使用普通字; 在其他情况下,可能是整个正文。

An extensive use of exponents and other mathematical expressions usually requires moving from the solutions described here to a technology like MathML.

广泛使用指数和其他数学表达式通常需要从此处描述的解决方案过渡到MathML之类的技术。

翻译自: https://thenewcode.com/994/Making-and-Faking-Ordinals-on-Web-Pages

网页伪造域名

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值