搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

What make the text look differnt on the same web page in different browsers?

  • 4 回覆
  • 0 有這個問題
  • 1 次檢視
  • 最近回覆由 minajahan

more options

Hello,

BBC Urdu web page look better on Vivaldi. Is it possible to do it also in Firefox?

Thanks!

Hello, BBC Urdu web page look better on Vivaldi. Is it possible to do it also in Firefox? Thanks!
附加的畫面擷圖

被選擇的解決方法

Here's how to use a font override if you decide to give it a try:

(1) Install the Stylus extension from the Add-ons site.

(2) Click its toolbar button to open its drop-down menu, then click Manage to open its dashboard view.

(3) In the left column, click the "Write new style" button.

(4) Click in the code editor box on the right and paste the following code block, making sure to copy/paste both of the } at the end. Stylus should display the importer shown in the first attached screenshot. Click the Overwrite style button to accept the conversion.

@-moz-document url-prefix("https://www.bbc.com/urdu") {
/*** Fix custom web font definition for BBC Urdu ***/

/* Create new font name definitions */
@font-face {
  font-family:BBCReithQalam;
  font-weight:400;
  font-style:normal;
  src:url('https://ws-downloads.files.bbci.co.uk/fonts/ReithQalam/v1.210/normal.woff2') format('woff2'),
  url('https://ws-downloads.files.bbci.co.uk/fonts/ReithQalam/v1.210/normal.woff') format('woff');
  font-display: optional;
}
@font-face {
  font-family:BBCReithQalam;
  font-weight:700;
  font-style:normal;
  src:url('https://ws-downloads.files.bbci.co.uk/fonts/ReithQalam/v1.210/bold.woff2') format('woff2'),
  url('https://ws-downloads.files.bbci.co.uk/fonts/ReithQalam/v1.210/bold.woff') format('woff');
  font-display: optional;
}

/* Override font list for weirdly named classes starting with "bbc-" */
[class*="bbc-"]{
  font-family:BBCReithQalam,"BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif !important;
}
}


(5) In the left column, enter a name for your style and click the Save button (second attached screenshot).

(6) When you return to the page, the font should be changed (third attached screenshot).

從原來的回覆中察看解決方案 👍 1

所有回覆 (4)

more options

For me, Firefox is using Arial and Arial Bold on the BBC site. But BBC intends for you to use a web font from its site, which is what is showing in MS Edge (I don't have Vivaldi).

The problem is that Firefox requires multi-word font names like BBC Reith Qalam to be surrounded by quotation marks ("BBC Reith Qalam"). If I go into the Style Editor and add those missing quotation marks, it works!

But obviously no one wants to or should have to do that.

First, please tell BBC about this problem so they can fix it.

Second, if there is a way to tell Firefox to ignore coding errors with font names, I don't know what it's called. That would be the next best thing.

Third, you can inject correct style rules into pages on the site using an add-on for modifying pages. {To be posted after testing.}

由 jscher2000 - Support Volunteer 於 修改

more options

Sorry, that reply wasn't finished! Please let me complete work on the Stylus fix before trying it.

more options

選擇的解決方法

Here's how to use a font override if you decide to give it a try:

(1) Install the Stylus extension from the Add-ons site.

(2) Click its toolbar button to open its drop-down menu, then click Manage to open its dashboard view.

(3) In the left column, click the "Write new style" button.

(4) Click in the code editor box on the right and paste the following code block, making sure to copy/paste both of the } at the end. Stylus should display the importer shown in the first attached screenshot. Click the Overwrite style button to accept the conversion.

@-moz-document url-prefix("https://www.bbc.com/urdu") {
/*** Fix custom web font definition for BBC Urdu ***/

/* Create new font name definitions */
@font-face {
  font-family:BBCReithQalam;
  font-weight:400;
  font-style:normal;
  src:url('https://ws-downloads.files.bbci.co.uk/fonts/ReithQalam/v1.210/normal.woff2') format('woff2'),
  url('https://ws-downloads.files.bbci.co.uk/fonts/ReithQalam/v1.210/normal.woff') format('woff');
  font-display: optional;
}
@font-face {
  font-family:BBCReithQalam;
  font-weight:700;
  font-style:normal;
  src:url('https://ws-downloads.files.bbci.co.uk/fonts/ReithQalam/v1.210/bold.woff2') format('woff2'),
  url('https://ws-downloads.files.bbci.co.uk/fonts/ReithQalam/v1.210/bold.woff') format('woff');
  font-display: optional;
}

/* Override font list for weirdly named classes starting with "bbc-" */
[class*="bbc-"]{
  font-family:BBCReithQalam,"BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif !important;
}
}


(5) In the left column, enter a name for your style and click the Save button (second attached screenshot).

(6) When you return to the page, the font should be changed (third attached screenshot).

more options

Yes, it worked! I will let BBC know about this. Thank you very much for the help. Now I can read much easily! :)