Open Bug 1186408 Opened 10 years ago Updated 3 years ago

Fonts installed using shortcut are not usable in Firefox

Categories

(Core :: Graphics: Text, defect)

x86_64
Windows 8.1
defect

Tracking

()

Tracking Status
firefox42 --- affected

People

(Reporter: xidorn, Unassigned)

Details

(Whiteboard: [gfx-noted])

Windows allows user to install fonts using a shortcut, but those fonts are not usable in Firefox. They are not shown in the font list in Options either. Steps to reproduce: 1. Open Font settings of Windows (For Windows 8.1, it's Control Panel\Appearance and Personalization\Fonts\Font settings), and enable "Allow fonts to be installed using a shortcut (advanced)" there 2. Right click any font which has not been installed yet, and click "Install as shortcut" 3. Visit page like data:text/html,<html style="font-family: 'Your New Font'">Test 4. Open Inspector and check the Fonts tab. Expected result: The newly installed font is used Actual result: It is still using the default font
Does this work with other 3rd party browsers?
Chrome doesn't work either. (IE works as expected.) As of other 3rd party software, Evernote seem to work properly. I also tested Paint.NET which shows the shortcut font in the list, but doesn't work properly.
Could you check some older Firefox versions to see if this ever worked correctly? Since other applications don't work either it's probably not a Firefox "bug" as much as it is a "feature" we should look to supporting.
I tested the current release, which doesn't work either. I agree it is not a regression.
(In reply to Xidorn Quan [:xidorn] (UTC+12) from comment #4) > I tested the current release, which doesn't work either. I agree it is not a > regression. Thank you for checking and thank you for filing the report. I'll leave it up to the developers to decide if this is something we should support.
John, can you answer to the bug?
Flags: needinfo?(jdaggett)
Whiteboard: [gfx-noted]
I think the immediate question is whether these fonts show up in the enumerated fontlist calls in GDI and DirectWrite. If they don't, I don't really understand how this feature was intended to work. Xidorn, a few quick questions: 1. Does your testcase fail for both the DirectWrite enabled and DirectWrite disabled cases? Use about:config to enable/disable and about:support to confirm. 2. Does your testcase work if you restart the browser? 3. What are the specifics of the font you are attempting to install via the way you describe? Does this happen for all fonts or only some?
Flags: needinfo?(jdaggett)
(In reply to John Daggett (:jtd) from comment #7) > 1. Does your testcase fail for both the DirectWrite enabled and DirectWrite > disabled cases? Use about:config to enable/disable and about:support to > confirm. How can I disable DirectWrite and confirm that? It seems to me the pref "gfx.font_rendering.directwrite.enabled" is false by default, but "DirectWrite Enabled" always shows "true (6.3.9600.17795)". > 2. Does your testcase work if you restart the browser? No. > 3. What are the specifics of the font you are attempting to install via the > way you describe? Does this happen for all fonts or only some? According to the description of the setting, those fonts are not copied to the system fonts directory. The original font files are used directly instead. Hence if the original file is not available, the font is not usable then. AFAICS, all fonts installed via that way cannot be used properly.
Use 'gfx.direct2d.disabled' to force use of GDI.
(In reply to John Daggett (:jtd) from comment #9) > Use 'gfx.direct2d.disabled' to force use of GDI. Thanks. With DirectWrite disabled, yes, the testcase works properly, and the font also appears in the font list in Options.
I'm seeing slightly funky behavior under Windows 7 but after restarting the browser, the font displays correctly. I'm running with DirectWrite enabled. Xidorn, could you test with these steps with your default, DirectWrite-enabled settings? Confirm that 'Fira Sans' is not installed: 1. Run latest Firefox Nightly 2. Open Preferences > Content > Advanced... 3. Under 'Serif' scroll through the list to confirm that 'Fira Sans' is not in the list 4. Click on 'Cancel' (don't quit!) Install the font and confirm that Firefox picks it up: 1. Download Fira Sans fonts (https://www.mozilla.org/en-US/styleguide/products/firefox-os/typeface/) 2. Create a new directory named 'fonttest' 3. Copy FiraSans-Regular.otf to 'fonttest' 4. Open Explorer, right-click on the font in 'fonttest', select 'Install as Shortcut' 5. In Firefox, open Preferences > Content > Advanced... 6. Under 'Serif' scroll through the list and select 'Fira Sans' 7. Click 'OK' Is the default font now 'Fira Sans'? If not, quit the browser and restart. Does the default font now show up as 'Fira Sans'? The question we need to figure out whether this is a problem with not picking up the font itself (i.e. from the DirectWrite system font collection) or with the re-initialize code for DirectWrite. I suspect there's a bug in the way the fontlist is updated, based on how this behaved for me. But I'd like you to confirm that.
I'm running Windows 8.1. I tried your steps, but cannot find "Fira Sans" in any list there, with DirectWrite enabled in about:support.
I ran through the same steps on a Win 8.1en VM and I see the same results I see on Windows 7. The body content is changed to using 'Fira Sans' after selecting 'Install as shortcut'. Does the acct you're using have admin privs? Does a shortcut end up in the Fonts folder?
I have admin privs, and yes, I can see a shortcut named "Fira Sans Regular" in the Fonts folder, and I can see the font when I disable direct2d. If I leave the Fira as the default font, and re-enable direct2d and restart the browser, the default font is reset to the first font in the list, and I still cannot find that font there.
Xidorn, what's the locale of your Windows 8.1 install? Are you using a Chinese or English install? If you install the font (rather than install as shortcut) does the font display in the fontlist? I had Kato-san run through the steps in comment 11 and he sees the same problem you're seeing under Windows 8.1 JA.
I believe it is en-us. I have never reinstalled or change locale settings on that since I got the laptop from the US. But one thing may be related is that, I have a Japanese input method and a Chinese input method installed, which I believe Kato-san also has but your system in the virtual machine doesn't.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.