OLD | NEW |
1 <h2 id="manifest">Manifest</h2> | 1 <h2 id="manifest">Manifest</h2> |
2 <p>To use the Font Settings API, you must declare the "fontSettings" permission | 2 <p>To use the Font Settings API, you must declare the "fontSettings" permission |
3 in the <a href="manifest.html">extension manifest</a>. | 3 in the <a href="manifest">extension manifest</a>. |
4 For example:</p> | 4 For example:</p> |
5 <pre data-filename="manifest.json"> | 5 <pre data-filename="manifest.json"> |
6 { | 6 { |
7 "name": "My Font Settings Extension", | 7 "name": "My Font Settings Extension", |
8 "description": "Customize your fonts", | 8 "description": "Customize your fonts", |
9 "version": "0.2", | 9 "version": "0.2", |
10 <b>"permissions": [ | 10 <b>"permissions": [ |
11 "fontSettings" | 11 "fontSettings" |
12 ]</b>, | 12 ]</b>, |
13 ... | 13 ... |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 <p>The next snippet sets the sans-serif font for Japanese.</p> | 49 <p>The next snippet sets the sans-serif font for Japanese.</p> |
50 <pre> | 50 <pre> |
51 chrome.fontSettings.setFont( | 51 chrome.fontSettings.setFont( |
52 { genericFamily: 'sansserif', script: 'Jpan', fontId: 'MS PGothic' } | 52 { genericFamily: 'sansserif', script: 'Jpan', fontId: 'MS PGothic' } |
53 ); | 53 ); |
54 </pre> | 54 </pre> |
55 | 55 |
56 <p>You can find a sample extension using the Font Settings API in the | 56 <p>You can find a sample extension using the Font Settings API in the |
57 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/fontSettings/">examples/api/fontSettings</a> | 57 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/fontSettings/">examples/api/fontSettings</a> |
58 directory. For other examples and for help in viewing the source code, see | 58 directory. For other examples and for help in viewing the source code, see |
59 <a href="samples.html">Samples</a>.</p> | 59 <a href="samples">Samples</a>.</p> |
OLD | NEW |