We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Este site está com funcionalidades limitadas enquanto realizamos manutenção para melhorar sua experiência de uso. Se nenhum artigo resolver seu problema e você quiser fazer uma pergunta, nossa comunidade de suporte pode te ajudar em @FirefoxSupport no Twitter e /r/firefox no Reddit.

Pesquisar no site de suporte

Evite golpes de suporte. Nunca pedimos que você ligue ou envie uma mensagem de texto para um número de telefone, ou compartilhe informações pessoais. Denuncie atividades suspeitas usando a opção “Denunciar abuso”.

Saiba mais

Esta discussão foi arquivada. Faça uma nova pergunta se precisa de ajuda.

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

  • 1 resposta
  • 1 tem este problema
  • 12 visualizações
  • Última resposta de 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>
Capturas de tela anexadas

Todas as respostas (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.

Alterado por Thomas S em