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

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

Issue 10532105: Use ICU script code "Jpan" instead of "Hrkt" in Japanese pref names (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better sample texts Created 8 years, 6 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 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note:
2 1) The <head> information in this page is significant, should be uniform 2 1) The <head> information in this page is significant, should be uniform
3 across api docs and should be edited only with knowledge of the 3 across api docs and should be edited only with knowledge of the
4 templating mechanism. 4 templating mechanism.
5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
6 browser, it will be re-generated from the template, json schema and 6 browser, it will be re-generated from the template, json schema and
7 authored overview content. 7 authored overview content.
8 4) The <body>.innerHTML is also generated by an offline step so that this 8 4) The <body>.innerHTML is also generated by an offline step so that this
9 page may easily be indexed by search engines. 9 page may easily be indexed by search engines.
10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head>
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 Simplified Chinese may be different than the font used for serif Japanese.</p> 302 Simplified Chinese may be different than the font used for serif Japanese.</p>
303 <p>The generic font families supported by Chrome are based on 303 <p>The generic font families supported by Chrome are based on
304 <a href="http://www.w3.org/TR/CSS21/fonts.html#generic-font-families">CSS generi c font families</a> 304 <a href="http://www.w3.org/TR/CSS21/fonts.html#generic-font-families">CSS generi c font families</a>
305 and are listed in the API reference below. When a webpage specifies a generic 305 and are listed in the API reference below. When a webpage specifies a generic
306 font family, Chrome selects the font based on the corresponding setting. If no 306 font family, Chrome selects the font based on the corresponding setting. If no
307 generic font family is specified, Chrome uses the setting for the "standard" 307 generic font family is specified, Chrome uses the setting for the "standard"
308 generic font family.</p> 308 generic font family.</p>
309 <p>When a webpage specifies a language, Chrome selects the font based on the 309 <p>When a webpage specifies a language, Chrome selects the font based on the
310 setting for the corresponding language script. If no language is specified, 310 setting for the corresponding language script. If no language is specified,
311 Chrome uses the setting for the default, or global, script.</p> 311 Chrome uses the setting for the default, or global, script.</p>
312 <p>The supported language scripts are based on ISO 15924 script codes and listed 312 <p>The supported language scripts are specified by ISO 15924 script code and
313 in the API reference below. Technically, Chrome settings are not strictly 313 listed in the API reference below. Technically, Chrome settings are not strictly
314 per-script but also depend on language. For example, Chrome chooses the font for 314 per-script but also depend on language. For example, Chrome chooses the font for
315 Hangul (ISO 15924 script code "Hang") when a webpage specifies Korean language, 315 Cyrillic (ISO 15924 script code "Cyrl") when a webpage specifies the Russian
316 and uses this font not just for Hangul script but for everything the font 316 language, and uses this font not just for Cyrillic script but for everything the
317 covers, such as Hanja.</p> 317 font covers, such as Latin.</p>
318 <p>Although ISO 15924 provides script codes like "Japn" for Japanese and "Kore"
319 for Korean, these codes are newer than "Hrkt" and "Hang" which Chrome continues
320 to use for compatibility purposes.</p>
321 <h2 id="examples">Examples</h2> 318 <h2 id="examples">Examples</h2>
322 <p>The following code gets the standard font for Arabic.</p> 319 <p>The following code gets the standard font for Arabic.</p>
323 <pre>chrome.experimental.fontSettings.getFont( 320 <pre>chrome.experimental.fontSettings.getFont(
324 { genericFamily: 'standard', script: 'Arab' }, 321 { genericFamily: 'standard', script: 'Arab' },
325 function(details) { console.log(details.fontName); } 322 function(details) { console.log(details.fontName); }
326 ); 323 );
327 </pre> 324 </pre>
328 <p>The next snippet sets the sans-serif font for Japanese.</p> 325 <p>The next snippet sets the sans-serif font for Japanese.</p>
329 <pre>chrome.experimental.fontSettings.setFont( 326 <pre>chrome.experimental.fontSettings.setFont(
330 { genericFamily: 'sansserif', script: 'Hrkt', fontName: 'IPAPGothic' } 327 { genericFamily: 'sansserif', script: 'Jpan', fontName: 'IPAPGothic' }
331 ); 328 );
332 </pre> 329 </pre>
333 <p>You can find a sample extension using the Font Settings API in the 330 <p>You can find a sample extension using the Font Settings API in the
334 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension s/docs/examples/api/fontSettings/">examples/api/fontSettings</a> 331 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension s/docs/examples/api/fontSettings/">examples/api/fontSettings</a>
335 directory. For other examples and for help in viewing the source code, see 332 directory. For other examples and for help in viewing the source code, see
336 <a href="samples.html">Samples</a>.</p> 333 <a href="samples.html">Samples</a>.</p>
337 <!-- END AUTHORED CONTENT --> 334 <!-- END AUTHORED CONTENT -->
338 </div> 335 </div>
339 <!-- API PAGE --> 336 <!-- API PAGE -->
340 <div class="apiPage"> 337 <div class="apiPage">
(...skipping 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after
2582 <div> 2579 <div>
2583 <dt> 2580 <dt>
2584 <em> 2581 <em>
2585 <!-- TYPE --> 2582 <!-- TYPE -->
2586 <div style="display:inline"> 2583 <div style="display:inline">
2587 ( 2584 (
2588 <span class="enum">enumerated</span> 2585 <span class="enum">enumerated</span>
2589 <span id="typeTemplate"> 2586 <span id="typeTemplate">
2590 <span> 2587 <span>
2591 <span>string</span> 2588 <span>string</span>
2592 <span>["Afak", "Arab", "Armi", "Armn", "Avst", "Bali", " Bamu", "Bass", "Batk", "Beng", "Blis", "Bopo", "Brah", "Brai", "Bugi", "Buhd", " Cakm", "Cans", "Cari", "Cham", "Cher", "Cirt", "Copt", "Cprt", "Cyrl", "Cyrs", " Deva", "Dsrt", "Dupl", "Egyd", "Egyh", "Egyp", "Elba", "Ethi", "Geor", "Geok", " Glag", "Goth", "Gran", "Grek", "Gujr", "Guru", "Hang", "Hani", "Hano", "Hans", " Hant", "Hebr", "Hluw", "Hmng", "Hrkt", "Hung", "Inds", "Ital", "Java", "Jurc", " Kali", "Khar", "Khmr", "Khoj", "Knda", "Kpel", "Kthi", "Lana", "Laoo", "Latf", " Latg", "Latn", "Lepc", "Limb", "Lina", "Linb", "Lisu", "Loma", "Lyci", "Lydi", " Mand", "Mani", "Maya", "Mend", "Merc", "Mero", "Mlym", "Moon", "Mong", "Mroo", " Mtei", "Mymr", "Narb", "Nbat", "Nkgb", "Nkoo", "Nshu", "Ogam", "Olck", "Orkh", " Orya", "Osma", "Palm", "Perm", "Phag", "Phli", "Phlp", "Phlv", "Phnx", "Plrd", " Prti", "Rjng", "Roro", "Runr", "Samr", "Sara", "Sarb", "Saur", "Sgnw", "Shaw", " Shrd", "Sind", "Sinh", "Sora", "Sund", "Sylo", "Syrc", "Syre", "Syrj", "Syrn", " Tagb", "Takr", "Tale", "Talu", "Taml", "Tang", "Tavt", "Telu", "Teng", "Tfng", " Tglg", "Thaa", "Thai", "Tibt", "Tirh", "Ugar", "Vaii", "Visp", "Wara", "Wole", " Xpeo", "Xsux", "Yiii", "Zmth", "Zsym", "Zyyy"]</span> 2589 <span>["Afak", "Arab", "Armi", "Armn", "Avst", "Bali", " Bamu", "Bass", "Batk", "Beng", "Blis", "Bopo", "Brah", "Brai", "Bugi", "Buhd", " Cakm", "Cans", "Cari", "Cham", "Cher", "Cirt", "Copt", "Cprt", "Cyrl", "Cyrs", " Deva", "Dsrt", "Dupl", "Egyd", "Egyh", "Egyp", "Elba", "Ethi", "Geor", "Geok", " Glag", "Goth", "Gran", "Grek", "Gujr", "Guru", "Hani", "Hano", "Hans", "Hant", " Hebr", "Hluw", "Hmng", "Hung", "Inds", "Ital", "Java", "Jpan", "Jurc", "Kali", " Khar", "Khmr", "Khoj", "Knda", "Kore", "Kpel", "Kthi", "Lana", "Laoo", "Latf", " Latg", "Latn", "Lepc", "Limb", "Lina", "Linb", "Lisu", "Loma", "Lyci", "Lydi", " Mand", "Mani", "Maya", "Mend", "Merc", "Mero", "Mlym", "Moon", "Mong", "Mroo", " Mtei", "Mymr", "Narb", "Nbat", "Nkgb", "Nkoo", "Nshu", "Ogam", "Olck", "Orkh", " Orya", "Osma", "Palm", "Perm", "Phag", "Phli", "Phlp", "Phlv", "Phnx", "Plrd", " Prti", "Rjng", "Roro", "Runr", "Samr", "Sara", "Sarb", "Saur", "Sgnw", "Shaw", " Shrd", "Sind", "Sinh", "Sora", "Sund", "Sylo", "Syrc", "Syre", "Syrj", "Syrn", " Tagb", "Takr", "Tale", "Talu", "Taml", "Tang", "Tavt", "Telu", "Teng", "Tfng", " Tglg", "Thaa", "Thai", "Tibt", "Tirh", "Ugar", "Vaii", "Visp", "Wara", "Wole", " Xpeo", "Xsux", "Yiii", "Zmth", "Zsym", "Zyyy"]</span>
2593 </span> 2590 </span>
2594 </span> 2591 </span>
2595 ) 2592 )
2596 </div> 2593 </div>
2597 </em> 2594 </em>
2598 </dt> 2595 </dt>
2599 <dd>An ISO 15924 script code. The default, or global, script is repres ented by script code "Zyyy".</dd> 2596 <dd>An ISO 15924 script code. The default, or global, script is repres ented by script code "Zyyy".</dd>
2600 <!-- OBJECT PROPERTIES --> 2597 <!-- OBJECT PROPERTIES -->
2601 <!-- OBJECT METHODS --> 2598 <!-- OBJECT METHODS -->
2602 <!-- OBJECT EVENT FIELDS --> 2599 <!-- OBJECT EVENT FIELDS -->
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
2687 _uff=0; 2684 _uff=0;
2688 urchinTracker(); 2685 urchinTracker();
2689 } 2686 }
2690 catch(e) {/* urchinTracker not available. */} 2687 catch(e) {/* urchinTracker not available. */}
2691 </script> 2688 </script>
2692 <!-- end analytics --> 2689 <!-- end analytics -->
2693 </div> 2690 </div>
2694 </div> <!-- /gc-footer --> 2691 </div> <!-- /gc-footer -->
2695 </div> <!-- /gc-container --> 2692 </div> <!-- /gc-container -->
2696 </body></html> 2693 </body></html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698