Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

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

  • 1 reply
  • 1 has this problem
  • 3 views
  • Last reply by 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>
Attached screenshots

All Replies (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.

Modified by Thomas S