Ubuntu Firefox的呈现方式不同 [英] Ubuntu Firefox renders differently

查看:151
本文介绍了Ubuntu Firefox的呈现方式不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与其他浏览器相比,Ubuntu上的Firefox似乎呈现出一些HTML差别很大。特别是Ubuntu上的某些字体/样式变得更大,依靠相同数量的换行符保持对齐的文本列不再与Ubuntu Firefox对齐。



我已经给了一些在iWeb中制作的HTML,并且它在除了Ubuntu上的Firefox之外的所有主流浏览器上正确显示。 (在Windows上的Firefox工作正常)



我在Ubuntu上运行Firefox 3.0.12,并关闭了Ubuntu Firefox Modifications附加组件。



有什么可能导致与Ubuntu的Firefox这个有问题的差异?



更新:
我我发现在我自己的机器本地存储的HTML副本实际上呈现正确对齐的列,但是当在线查看时,它变得不对齐。



我试过安装微软字体软件包,但是没有帮助。
$ b 更新2:
列问题似乎至少有两个问题。一个是,iWeb将其中一列分成两个代码块,并放在另一列的代码中。一旦我确定每个列是由一个连续的代码块创建,并删除了一些现在冗余的div,在Ubuntu上的对齐方式好得多,但并不完美。这些更改似乎并没有影响到其他浏览器上的渲染。



使用Firebug进行挖掘,似乎可以通过删除字体完全修复Ubuntu上的问题所有相关文本的大小属性。然而,这又打破了所有其他浏览器的一致性 - 现在我又回到原点了。
$ b (是的,我知道HTML的设计方式是一个不好的做法,但我刚刚给了代码,所以我没有太多的选择)

解决方案

也许这是因为字体在Windows和Linux上的处理方式不同。或者,也许你在Windows上使用的字体没有安装或Ubuntu机器?



这个问题似乎并不限于Firefox:谷歌搜索了一下,例如,我发现与OpenOffice相同的帖子。



在jaunty中有一个名为 ttf-mscorefonts-installer 这应该有助于这个:它安装字体,如:




  • Andale Mono

  • Arial Black
  • Arial(Gras,Italique,Italique Gras)
  • 漫画Sans MS(Gras) (Gras,Italique,Italique Gras)

  • 格鲁吉亚(Gras,Italique,Italique Gras)

  • 影响


  • Trebuchet(Gras,Italique,Italique Gras)
  • Verdana(Gras,Italique,Italique Gras)
  • Webdings



(对不起,我的系统是法文的) gras意思是大胆;你可能猜到了italique的意思italic^^)





作为旁注,这个:


特别是
Ubuntu上的一些字体/样式正在变得更大,
列的文本依靠相等的
换行符来保持
aligned不再与
Ubuntu Firefox对齐。


绝对不是一个好习惯。



您遇到未安装字体的问题(可能);但是如何将浏览器设置为:


  • 缩放特定网站的字体

  • 或定义最小的字体大小?



几乎所有的浏览器都可以做到这一点 - 不仅仅是firefox,也不是Linux ...



有些人这样做 - 我这样做:我的眼睛不完美 ,并且我发现有时难以阅读的字体太小,所以我通常在Firefox中设置最小的字体大小。是的,它破坏了一些网站上的设计: - ($ / b
$ b< p>如果我这样做,我想我不是唯一的:有越来越多的例如,我的祖父最近有一台电脑,我不得不把他的屏幕分辨率设置为类似的东西他的19p液晶显示屏上的1024x780,以及最大字体大小的窗口,这样他就可以阅读...而且,这使得使用电脑的人几乎都会哭泣,但这是他唯一可以读的方式。 >


Firefox on Ubuntu seems to render some HTML considerably differently compared to other browsers. In particular some fonts/styles on Ubuntu are becoming much larger and columns of text which rely on equal numbers of line breaks to keep them aligned are no longer aligned on Ubuntu Firefox.

I have have been given some HTML which was made in iWeb and it displays correctly on all major browsers except for Firefox on Ubuntu. (Firefox on Windows works fine)

I am running Firefox 3.0.12 on Ubuntu and I have the Ubuntu Firefox Modifications add-on turned off.

What could be causing this problematic discrepancy with Firefox on Ubuntu?

Update: I've discovered that a copy of the HTML stored locally on my own machine actually renders the columns correctly aligned but when viewed online it becomes unaligned.

I've tried installing the Microsoft fonts package but that hasn't helped.

Update 2: With the columns issue, there seems to be at least two problems. One is that iWeb broke one of the columns into two blocks of code and placed it around the code for the other column. Once I made sure each column was created by a contiguous block of code and removed some now redundant divs, the alignment was a lot better on Ubuntu but not perfect. These changes didn't seem to affect the rendering on other browsers either.

Digging around with Firebug, it seems that I can fix the problem on Ubuntu completely by removing the font-size attributes for all relevant text. However this then breaks the alignment on all the other browsers - now I'm back to square one again.

(And yeah, I know that the way the HTML is designed is kinda bad practice, but I've just been given the code so I don't really have much choice)

解决方案

Maybe it's because fonts are not dealt with the same way on Windows and on Linux ? Or maybe the fonts you are using on windows are not installed or the Ubuntu machine ?

That "problem" doesn't seem to be limited to Firefox : Googling a bit, I found posts that said the same with OpenOffice, for instance.

In jaunty there is package called ttf-mscorefonts-installer that should help about that : it installs fonts like :

  • Andale Mono
  • Arial Black
  • Arial (Gras, Italique, Italique Gras)
  • Comic Sans MS (Gras)
  • Courier New (Gras, Italique, Italique Gras)
  • Georgia (Gras, Italique, Italique Gras)
  • Impact
  • Times New Roman (Gras, Italique, Italique Gras)
  • Trebuchet (Gras, Italique, Italique Gras)
  • Verdana (Gras, Italique, Italique Gras)
  • Webdings

(sorry, my system is in french ; "gras" means "bold" ; you probably guessed that "italique" means "italic" ^^ )


As a sidenote, this :

In particular some fonts/styles on Ubuntu are becoming much larger and columns of text which rely on equal numbers of line breaks to keep them aligned are no longer aligned on Ubuntu Firefox.

Is definitly not a good practice.

You are encountering a problem with fonts that are not installed (probably) ; but what about a user that sets his browser to :

  • either zoom the fonts for a particular website
  • or define a minimal font size ?

That can be done in almost any browser -- not only firefox nor Linux...

And some people do that -- I do : my eyes are not perfect (not that bad either), and I find too small fonts sometimes hard to read, so I generally set a minimal font size in Firefox ; and, yes, it destroys design on some websites :-(

And if I do that, I guess I'm not the only one : there are more and more quite old people on the Internet, that have troubles with their eyes, for example...
For instance, my grand-father recently got a computer ; I had to set his screen resolution to something like 1024x780 on his 19p LCD screen, and maximal font size in windows, so that he could read... And yeah, that makes everyone who uses his computer almost cry ^^ But it's the only way he could read...

这篇关于Ubuntu Firefox的呈现方式不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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