| |
BGonline.org Forums
Testing Font Embedding
Posted By: Michael Petch In Response To: Testing Font Embedding (eXtreme Gammon)
Date: Thursday, 16 February 2012, at 7:28 p.m.
Howdy Xavier.
This is actually by design. Firefox enforces a strict cross site scripting security model. I am surprised that more browsers don't do the same thing. There is a standard (CORS) or cross origin resource sharing that can be implemented on a webserver hosting remote file, and is honored by most browsers (including Firefox since around version 4).
The trick to getting this going actually lies in modifying the webserver where the Fonts are being hosted (on www.extremegammon.com). You want your server to respond with an HTTP header that allows other websites to embed your content. If you want all sites to have access to the fonts then you can return this HTTP Header on each request:
Access-Control-Allow-Origin: *
I use Apache and I have the headers mod enabled. In my .htaccess file I added this command to the directory hosting your fonts (I copied them to my server as a test):
Access-Control-Allow-Origin *
This will return that header on all resources for that directory. This tells a browser that your server allows any site to request that resource in an embedded (referral) type fashion. As an experiment the output below is using your fonts from my server and I took a snippet of your original post and pointed it to my location. Here is the result (Please note the formatting is munged, but the fonts should be accessed properly even under Firefox):
ñ¡²±²¢ò
ðPUFAZA@ @ZKZAFAð
ðQVGB[B@ @[L[BGBð
ðHWHC\C@ @\CHCHCð
ðIDIDID@ @IDIDIDð
ðJEJEJE@ @JEJEJEð
'ð @ @ 5 3 ð
ðejejej@ @Ðjejejð
ðdididi@ @nididið
ðwhchch@ @mhchchð
ðvgbqlg@ @lgbglgð
ðufapkz@ @kfafkfð
ó£´³´¤ô
Û is Player 2
score: 7
pip: 140Unlimited Game
Jacobypip: 134
score: 13
Ð is Player 1XGID=----BbC-C--CbC--bbAe---b--:0:0:-1:53:7:13:1:0:10
Ð to play 53
1. Rollout1 8/5 8/3 eq: +0.002
Player:
Opponent:49.97% (G:7.79% B:0.11%)
50.03% (G:4.16% B:0.20%)Conf.: ± 0.005 (-0.003...+0.007) - [57.8%]
Duration: 18 minutes 05 seconds2. Rollout2 6/3 6/1 eq: +0.001 (-0.001)
Player:
Opponent:49.64% (G:8.86% B:0.09%)
50.36% (G:4.75% B:0.24%)Conf.: ± 0.005 (-0.004...+0.006) - [42.2%]
Duration: 19 minutes 23 seconds1 6552 Games rolled with Variance Reduction.
Moves: 3-ply, cube decisions: XG Roller
2 6948 Games rolled with Variance Reduction.
Moves: 3-ply, cube decisions: XG Rollerwww.eXtremeGammon.com>> Version: 2.02.181.pre-release
| |
BGonline.org Forums is maintained by Stick with WebBBS 5.12.