分数根本无法正常显示 [英] Fractions Simply Won't Display Properly

查看:55
本文介绍了分数根本无法正常显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一种方法来提供印刷方式

正确分数(而不是诉诸< sup>和< sub>标签)但是已经

因为一半,八分之一,四分之三等b字形的字形不能以正确的字体显示(甚至

始终使用相同的字体)并且似乎完全抵制尝试

通过CSS修复此问题:


<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 Transitional // EN"

" http://www.w3.org/TR/html4/loose.dtd">

< html lang =" en">

< head>

< meta http-equiv =" Content-Type"含量=" text / html的; charset = utf-8">

< meta http-equiv =" Content-Style-Type" content =" text / css">

< meta http-equiv =" Content-Language" content =" en">

< table>

< tr valign =" top">< td>&#x00bc;< / td>< / tr>

< tr valign =" top">< td>&#x00bd;< / td>< / tr>

< tr valign =" top">< td>&#x00be;< / td>< / tr>

< tr valign =" top" ;>< td>⅓< / td>< / tr>

< tr valign =" top">< td>⅔< / td>< / tr>

< tr valign =" top">< td>⅕< / td>< / tr>

< tr valign =" top" >< td>⅖< / td>< / tr>

< tr valign =" top">< td>⅗< / td>< / tr>

< tr valign =" top">< td>⅘< / td>< / tr>

< tr valign =" top"> ;< td>⅙< / td>< / tr>

< tr valign =" top">< td>⅚< / td>< / tr>

< tr valign =" top"& gt;< td>⅛< / td>< / tr>

< tr valign =" top">< td>⅜< / td>< / tr>

< tr valign =" top">< td>⅝< / td>< / tr>

< / table>

< / body>

< / html>


任何解决方案的想法(除了使用像1/2,3 / inline这样的内联4,

等等或其他黑客攻击)?

I''ve been searching in vain for a way to present typographically
correct fractions (not resorting to <sup> and <sub> tags) but have been
frustrated by the fact that the glyphs for one-half, one-eighth,
three-quarters, etc. do not display in the correct typeface (or even
consistently the same typeface) and seem totally resistant to attempt
to fix this through CSS:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Language" content="en">
<table>
<tr valign="top"><td>&#x00bc;</td></tr>
<tr valign="top"><td>&#x00bd;</td></tr>
<tr valign="top"><td>&#x00be;</td></tr>
<tr valign="top"><td>⅓</td></tr>
<tr valign="top"><td>⅔</td></tr>
<tr valign="top"><td>⅕</td></tr>
<tr valign="top"><td>⅖</td></tr>
<tr valign="top"><td>⅗</td></tr>
<tr valign="top"><td>⅘</td></tr>
<tr valign="top"><td>⅙</td></tr>
<tr valign="top"><td>⅚</td></tr>
<tr valign="top"><td>⅛</td></tr>
<tr valign="top"><td>⅜</td></tr>
<tr valign="top"><td>⅝</td></tr>
</table>
</body>
</html>

Any thoughts of a solution (other than using inlines like 1/2, 3/4,
etc. or other hacks)?

推荐答案

se ******* @ gwi.net 写道:
我一直在徒劳寻找一种方式以印刷方式呈现正确的分数(不依赖于< sup>和< sub>但是,由于半个,八分之一,四分之三等字形不能以正确的字体显示(甚至一致),这一事实令人感到沮丧相同的字体)并且似乎完全抵制尝试通过CSS来解决这个问题:
I''ve been searching in vain for a way to present typographically
correct fractions (not resorting to <sup> and <sub> tags) but have been
frustrated by the fact that the glyphs for one-half, one-eighth,
three-quarters, etc. do not display in the correct typeface (or even
consistently the same typeface) and seem totally resistant to attempt
to fix this through CSS:




CSS不会将字形添加到没有字体的字体中有它们。



CSS won''t add glyphs to a font that doesn''t have them.


2005年6月29日星期三, se ** *****@gwi.net 写道:
On Wed, 29 Jun 2005, se*******@gwi.net wrote:
我一直在寻找一种方式来呈现印刷的正确分数(而不是求助)到< sup>和< sub>标签)但是由于半个,八分之一,四分之三等的字形不显示在...中而感到沮丧正确的字体


嗯,正如你在

comp.fonts对同一个问题的回答中提到的那样,有人建议你提出问题

in这种层次结构:这真的是一个关于浏览器的问题,而不是很多关于HTML的问题。就HTML而言,你的& #number;

引用,例如⅓以后,*是*正确的方式,

代表分数字符。每个浏览器都会尽力(

一些最佳值)来显示它们。

(甚至一致的相同字体)


再次,这是一个浏览器问题,实际上,以及间接问题是关于可用字体的问题。正如我所说,其中一些分数是在MS的WGL4中(因此很可能出现在他们提供的
字体中),而有些则不是'' t(因此可能需要一个

专家字体来获取它们)。


理想情况下,浏览器应该通过
$ b工作当所选字体没有

所需字符时,$ b美化相似字体。但是,最后,最好显示

所需的角色(无论风格如何匹配),而不是显示

什么都没有。所以,如果你缺少可用的字体,这就是你要获得的b / b
。这是一个浏览器事实(你可以讨论相关浏览器组中的
,如果你认为它有足够的

兴趣),但是从创作的角度来看看来,我说你正在做的事情是完全正确的(即使你对

结果感到失望)。

并且似乎完全抵制尝试通过CSS修复此问题:
I''ve been searching in vain for a way to present typographically
correct fractions (not resorting to <sup> and <sub> tags) but have been
frustrated by the fact that the glyphs for one-half, one-eighth,
three-quarters, etc. do not display in the correct typeface
Well, as was mentioned in the responses to your same question on
comp.fonts, where it was suggested that you might raise the question
in this hierarchy: that''s really a question about the browser, not so
much about the HTML. As far as HTML is concerned, your &#number;
references, such as ⅓ onwards, *are* the correct way to
represent the fraction characters. Each browser will do its best (for
some value of "best") to display them.
(or even consistently the same typeface)
Again, that''s a browser question, really, as well as being indirectly
a question about the available fonts. As I said, some of those
fractions are in MS''s WGL4 (and thus are likely to be present in their
supplied fonts), whereas others aren''t (and thus might need a
specialist font to get them).

Ideally, browsers are supposed to work their way through
cosmetically-similar fonts when the selected font doesn''t have the
desired character. But, in the end, it''s better to display the
desired character (no matter how bad the style match) than to display
nothing at all. So if you''re short on available fonts, this is what
you''re going to get. That''s a browser fact (which you could discuss
on the relevant browsers group if you think it''s of sufficient
interest), but from the authoring point of view, I say that what
you''re doing is entirely correct (even if you''re disappointed in the
results).
and seem totally resistant to attempt to fix this through CSS:




作为网络情境中的作者,你真的不能指望修复这个

通过CSS [1]。作为作者,你不知道用户可能有哪些字体

和曲目。请注意,CSS允许你使用* b $ b到* name *字体,但是知道字体的名称*绝不*告诉

你确定字体可能是什么字符集包含。


作为读者,最好的办法是禁用

作者的任何字体建议,并修复浏览器以使用最好的字体。得到。


如果你想在你自己的*浏览器上获得更好的结果,你需要

解释更多(在相应的浏览器组上)你已经拥有了什么?b $ b已经用过,你正在使用哪个操作系统,你正在测试哪些浏览器,

你将哪些字体配置为默认值,等等。


但你的读者会得到他们得到的任何东西 - 除非你

设法鼓励他们安装一些更好的字体等。


希望这有帮助

[1] CSS中有可下载字体的提议,但是他们

aren''广泛的实践在网上使用。



As author in a web situation, you really can''t expect to "fix" this
sort of thing through CSS[1]. As author you have no idea what fonts
and repertoires the user may have available. Note that CSS allows you
to *name* fonts, but knowing the name of the font *in no way* tells
you for sure what repertoire of characters that font may contain.

As reader, your best bet is to disable any font suggestions from the
author, and fix your browser to use the best font that you can get.

If you want better results on your *own* browser, you''d need to
explain more (on the appropriate browsers group) about what you''ve got
already, i.e which OS you''re using, which browsers you''re testing,
which fonts you configured to be your default, and so on.

But your readers will be getting whatever they''re getting - unless you
manage to encourage them to install some better fonts, etc.

hope this helps
[1] there have been proposals for downloadable fonts in CSS, but they
aren''t in widespread practical use on the web.


> CSS不会将字形添加到没有它们的字体中。


我知道。我的意思是修复通过CSS是在

字体确实有的情况下特定的字形,但没有显示在

正确的字体,我试图指定像Arial Unicode这样的字体

MS,它仍然没有'''正确渲染。另外,我试图不计算一个字体安装不是标准的半打的人b / b
左右(Arial,Georgia,Times,Helvetica,等人。

> CSS won''t add glyphs to a font that doesn''t have them.

This I know. What I meant by "fixing" via CSS is in the case where the
font does in fact "have" the particular glyph but doesn''t display it in
the correct typeface, I''ve tried to specify a font like Arial Unicode
MS and it still doesn''t render properly. Plus, I''m trying not to count
on someone having a font installed other than the standard half-dozen
or so (Arial, Georgia, Times, Helvetica, et al.)


这篇关于分数根本无法正常显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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