Ce site disposera de fonctionnalités limitées pendant que nous effectuons des opérations de maintenance en vue de vous proposer un meilleur service. Si un article ne règle pas votre problème et que vous souhaitez poser une question, notre communauté d’assistance est prête à vous répondre via @FirefoxSupport sur Twitter, et /r/firefox sur Reddit.

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

En savoir plus

Firefox does not use locally installed font for rendering SVG content.

  • 1 réponse
  • 1 a ce problème
  • 3 vues
  • Dernière réponse par Thomas S

more options

Firefox 91.7.0esr (64-bit) Windows 10 The local system has the font OCRB (also named OcrbATA) installed in the normal windows location: c:\windows\fonts\ocrbata.ttf

The SVG graphic is loaded from the local file system directly (FILE: not via HTTP: or HTTPS:) by using the Windows File Explorer.

The text in the graphic is specified to use the font family OCRB and I also tried OcrbATA (because Windows font naming is odd and has two different names displayed: the font name: Ocrb and the Full Name: OcrbATA.

The text in the graphic is only displayed in a fallback font (such as the browser specified default font), which produces the wrong rendering.

Looking for the font in the Firefox 'settings' for the "Fonts and Colors" dialog drop down, I see that this font is NOT shown in the list. OCR A is show, which is also installed on the system, but OCRB is not shown. I suspect this may be a symptom of why Firefox isn't making use of the installed OCRB font.

Having looked at a similar thread, I confirmed that "privacy.resistFingerprinting" is at its default of false. And "layout.css.font-visibility.level" is at the default of "3".

Any idea why Firefox, will not make use of the system installed font, when the file to display wants to use that font?

I would attach the SVG to this but the 'Upload Images' dialog only accepts raster images, not vector types like SVG. The attached images show the Windows 10 font dialog for the OCRB font with a sample string rendered, the Character Map for that font, so you can see the glyphs it uses, and the Firefox rendering of the SVG file which is just using the default firefox font to render, despite the text specifying OcrbATA as the font family in the SVG. For example:

 <tspan  font-family="OcrbATA" fill="rgb(120,120,120)"  font-size="332"  >Special Symbol Testing:</tspan>
Firefox 91.7.0esr (64-bit) Windows 10 The local system has the font OCRB (also named OcrbATA) installed in the normal windows location: c:\windows\fonts\ocrbata.ttf The SVG graphic is loaded from the local file system directly (FILE: not via HTTP: or HTTPS:) by using the Windows File Explorer. The text in the graphic is specified to use the font family OCRB and I also tried OcrbATA (because Windows font naming is odd and has two different names displayed: the font name: Ocrb and the Full Name: OcrbATA. The text in the graphic is only displayed in a fallback font (such as the browser specified default font), which produces the wrong rendering. Looking for the font in the Firefox 'settings' for the "Fonts and Colors" dialog drop down, I see that this font is NOT shown in the list. OCR A is show, which is also installed on the system, but OCRB is not shown. I suspect this may be a symptom of why Firefox isn't making use of the installed OCRB font. Having looked at a similar thread, I confirmed that "privacy.resistFingerprinting" is at its default of false. And "layout.css.font-visibility.level" is at the default of "3". Any idea why Firefox, will not make use of the system installed font, when the file to display wants to use that font? I would attach the SVG to this but the 'Upload Images' dialog only accepts raster images, not vector types like SVG. The attached images show the Windows 10 font dialog for the OCRB font with a sample string rendered, the Character Map for that font, so you can see the glyphs it uses, and the Firefox rendering of the SVG file which is just using the default firefox font to render, despite the text specifying OcrbATA as the font family in the SVG. For example: <tspan font-family="OcrbATA" fill="rgb(120,120,120)" font-size="332" >Special Symbol Testing:</tspan>
Captures d’écran jointes

Toutes les réponses (1)

more options

For what it is worth, an HTML file making use of the OCRB font also doesn't work: (with OCRB, Ocrb, or OcrbATA specified as the font-family.

style = "font-family:OcrbATA;font-size:36px;" Special Symbol Testing:
Other symbols °±öÄÙ­©ª§ì

And for what it is worth, MS Internet Explorer 11, does use the local font when rendering the HTML file, but not the SVG file.

Modifié le par Thomas S