搜尋 Mozilla 技術支援網站

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

Learn More

Configuring fonts for Unicode PUA characters, like icons or Klingon?

more options

Hi folks. So here's the situation. I'm a developer and burgeoning font nerd, and I'm really into shell configuration for Zsh, which requires some custom fontography.

These overlapping areas use various fonts that provide glyphs for characters inside the Unicode Private Use Areas. Examples are:

So, I'd like to set up my browser to be able to display a few, or all of these things. For example, in the discussion going on at the GitHub issue https://github.com/ryanoasis/nerd-fonts/issues/409.

But I don't see any way in Firefox to set up a chain of "fallback fonts" or something like that. In Preferences > Language and Appearance > Fonts and Colors > Advanced, it gives me a selection for "Fonts for:", which allows me to assign fonts on a per-script basis. But:

a) assigning a single font for "Other Writing Systems" (assuming that encompasses the Unicode PUA areas) is not sufficient, and b) uh-oh, maybe bug! When I select "Other Writing Systems" and choose a new font for it (like the Klingon font "plqaD"), it changes the main "Default font" for me back in the main preferences screen! That doesn't seem right?

Thing is, there are a lot of these "long tail" little special-purpose fonts, that it would be nice to aggregate into a single viewing context. It would be nice if Firefox supported defining an arbitrarily-long list of "fallback" fonts to use in the case where a web page uses a character which is not assigned a glyph in any of the normal fonts.

Hi folks. So here's the situation. I'm a developer and burgeoning font nerd, and I'm really into shell configuration for Zsh, which requires some custom fontography. These overlapping areas use various fonts that provide glyphs for characters inside the Unicode Private Use Areas. Examples are: * All the things aggregated into NerdFonts - https://github.com/ryanoasis/nerd-fonts * The Powerline shell-prompt symbols - https://github.com/powerline/powerline * Klingon - https://www.evertype.com/standards/csur/klingon.html * Anything else in the ConScript Registry - https://www.evertype.com/standards/csur/ So, I'd like to set up my browser to be able to display a few, or all of these things. For example, in the discussion going on at the GitHub issue https://github.com/ryanoasis/nerd-fonts/issues/409. But I don't see any way in Firefox to set up a chain of "fallback fonts" or something like that. In Preferences > Language and Appearance > Fonts and Colors > Advanced, it gives me a selection for "Fonts for:", which allows me to assign fonts on a per-script basis. But: a) assigning a single font for "Other Writing Systems" (assuming that encompasses the Unicode PUA areas) is not sufficient, and b) uh-oh, maybe bug! When I select "Other Writing Systems" and choose a new font for it (like the Klingon font "plqaD"), it changes the main "Default font" for me back in the main preferences screen! That doesn't seem right? Thing is, there are a lot of these "long tail" little special-purpose fonts, that it would be nice to aggregate into a single viewing context. It would be nice if Firefox supported defining an arbitrarily-long list of "fallback" fonts to use in the case where a web page uses a character which is not assigned a glyph in any of the normal fonts.

所有回覆 (2)

more options

Fonts for the PUA Unicode range are normally loaded from the server via @font-face CSS rules. This might work with a locally installed version of this font as well, but isn't guaranteed and on Mac you also can get sandbox related issues because only a few known folders for such fonts are allowed. Current Firefox releases also can have issues related to file_unique_origin (privacy.file_unique_origin => false) to load font files via a file:// URI.

more options

Okay, clearly I'm out of my depth here and need to do more research.

Thank you!