Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Side by Side Diff: chrome/common/extensions/docs/static/experimental.fontSettings.html

Issue 10108007: Font Settings Extension API: Rename get/setFontName to get/setFont. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!-- BEGIN AUTHORED CONTENT --> 1 <!-- BEGIN AUTHORED CONTENT -->
2 2
3 <p>The Font Settings API allows you to manage Chrome's font settings.</p> 3 <p>The Font Settings API allows you to manage Chrome's font settings.</p>
4 4
5 <h2 id="manifest">Manifest</h2> 5 <h2 id="manifest">Manifest</h2>
6 <p>The Font Settings API is currently experimental, so you must declare the 6 <p>The Font Settings API is currently experimental, so you must declare the
7 "experimental" permission to use it. For example:</p> 7 "experimental" permission to use it. For example:</p>
8 <pre>{ 8 <pre>{
9 "name": "My Font Settings Extension", 9 "name": "My Font Settings Extension",
10 "description": "Customize your fonts", 10 "description": "Customize your fonts",
(...skipping 24 matching lines...) Expand all
35 and uses this font not just for Hangul script but for everything the font 35 and uses this font not just for Hangul script but for everything the font
36 covers, such as Hanja.</p> 36 covers, such as Hanja.</p>
37 37
38 <p>Although ISO 15924 provides script codes like "Japn" for Japanese and "Kore" 38 <p>Although ISO 15924 provides script codes like "Japn" for Japanese and "Kore"
39 for Korean, these codes are newer than "Hrkt" and "Hang" which Chrome continues 39 for Korean, these codes are newer than "Hrkt" and "Hang" which Chrome continues
40 to use for compatibility purposes.</p> 40 to use for compatibility purposes.</p>
41 41
42 <h2 id="examples">Examples</h2> 42 <h2 id="examples">Examples</h2>
43 <p>The following code gets the standard font for Arabic.</p> 43 <p>The following code gets the standard font for Arabic.</p>
44 <pre> 44 <pre>
45 chrome.experimental.fontSettings.getFontName( 45 chrome.experimental.fontSettings.getFont(
46 { genericFamily: 'standard', script: 'Arab' }, 46 { genericFamily: 'standard', script: 'Arab' },
47 function(details) { console.log(details.fontName); } 47 function(details) { console.log(details.fontName); }
48 ); 48 );
49 </pre> 49 </pre>
50 50
51 <p>The next snippet sets the sans-serif font for Japanese.</p> 51 <p>The next snippet sets the sans-serif font for Japanese.</p>
52 <pre> 52 <pre>
53 chrome.experimental.fontSettings.setFontName( 53 chrome.experimental.fontSettings.setFont(
54 { genericFamily: 'sansserif', script: 'Hrkt', fontName: 'IPAPGothic' } 54 { genericFamily: 'sansserif', script: 'Hrkt', fontName: 'IPAPGothic' }
55 ); 55 );
56 </pre> 56 </pre>
57 57
58 <p>You can find a sample extension using the Font Settings API in the 58 <p>You can find a sample extension using the Font Settings API in the
59 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension s/docs/examples/api/fontSettings/">examples/api/fontSettings</a> 59 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension s/docs/examples/api/fontSettings/">examples/api/fontSettings</a>
60 directory. For other examples and for help in viewing the source code, see 60 directory. For other examples and for help in viewing the source code, see
61 <a href="samples.html">Samples</a>.</p> 61 <a href="samples.html">Samples</a>.</p>
62 62
63 <!-- END AUTHORED CONTENT --> 63 <!-- END AUTHORED CONTENT -->
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/samples.json ('k') | chrome/test/data/extensions/api_test/font_settings/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698