[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

BGonline.org Forums

Testing Font Embedding

Posted By: Michael Petch
Date: Thursday, 16 February 2012, at 7:28 p.m.

In Response To: Testing Font Embedding (eXtreme Gammon)

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: 140
Unlimited Game
Jacoby
pip: 134
score: 13

is Player 1
XGID=----BbC-C--CbC--bbAe---b--:0:0:-1:53:7:13:1:0:10

to play 53

1.Rollout18/5 8/3eq: +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 seconds
2.Rollout26/3 6/1eq: +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 seconds
1 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 Roller

www.eXtremeGammon.com>> Version: 2.02.181.pre-release

Messages In This Thread

 

Post Response

Your Name:
Your E-Mail Address:
Subject:
Message:

If necessary, enter your password below:

Password:

 

 

[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

BGonline.org Forums is maintained by Stick with WebBBS 5.12.