@@ -1760,142 +1760,182 @@ The <dfn id="at-font-face-rule">''@font-face''</dfn> rule</h3>
17601760 <td> .woff2
17611761 </table>
17621762
1763- Given the overlap in common usage between TrueType and OpenType, the
1764- format hints "truetype" and "opentype" must be considered as synonymous;
1765- a format hint of "opentype" does not imply that the font contains
1766- Postscript CFF style glyph data or that it contains OpenType layout
1767- information (see <a href="#platform-props-to-css">Appendix A</a> for more background on this).
1768-
1769- A value of "woff-variations", "truetype-variations", "opentype-variations", or "woff2-variations" imply support
1770- of the "woff", "truetype", "opentype", or "woff2" formats respectively along with additional support for
1771- font variations. Web authors can specify this format to indicate that variation support is required
1772- for correct rendering of a font. This mechanism can be used for gracefully falling back to an
1773- ancillary font when variation support is not present.
1774-
1775- When authors would prefer to use a locally available
1776- copy of a given font and download it if it's not, <code> local()</code>
1777- can be used. The locally-installed <<font-face-name>>
1778- argument to <code> local()</code> is a format-specific string that
1779- uniquely identifies a single font face within a larger family. The name can optionally be
1780- enclosed in quotes. If unquoted, the unquoted font family name
1781- processing conventions apply; the name must be a sequence of
1782- identifiers separated by <a href="https://www.w3.org/TR/css3-syntax/#whitespace">whitespace</a>
1783- which is converted to a string by joining the identifiers together
1784- separated by a single space.
1763+ Given the overlap in common usage between TrueType and OpenType,
1764+ the format hints "truetype" and "opentype"
1765+ must be considered as synonymous;
1766+ a format hint of "opentype" does not imply
1767+ that the font contains Postscript CFF style glyph data
1768+ or that it contains OpenType layout information
1769+ (see <a href="#platform-props-to-css">Appendix A</a> for more background on this).
1770+
1771+ A value of "woff-variations",
1772+ "truetype-variations",
1773+ "opentype-variations", or
1774+ "woff2-variations"
1775+ imply support of the "woff",
1776+ "truetype",
1777+ "opentype", or
1778+ "woff2" formats respectively
1779+ along with additional support
1780+ for font variations.
1781+ Web authors can specify this format
1782+ to indicate that variation support is
1783+ required for correct rendering of a font.
1784+ This mechanism can be used for gracefully falling back
1785+ to an ancillary font
1786+ when variation support is not present.
1787+
1788+ When authors would prefer to use
1789+ a locally available copy of a given font
1790+ and download it if it's not,
1791+ <code> local()</code> can be used.
1792+ The locally-installed <<font-face-name>> argument to <code> local()</code>
1793+ is a format-specific string
1794+ that uniquely identifies a single font face
1795+ within a larger family.
1796+ The name can optionally be enclosed in quotes.
1797+ If unquoted,
1798+ the unquoted font family name processing conventions apply;
1799+ the name must be a sequence of identifiers
1800+ separated by <a href="https://www.w3.org/TR/css3-syntax/#whitespace">whitespace</a>
1801+ which is converted to a string
1802+ by joining the identifiers together
1803+ separated by a single space.
17851804
1786- <pre>
1787- /* regular face of Gentium */
1788- @font-face {
1789- font-family: MyGentium;
1790- src: local(Gentium), /* use locally available Gentium */
1791- url(Gentium.woff); /* otherwise, download it */
1792- }
1793- </pre>
1805+ <pre>
1806+ /* regular face of Gentium */
1807+ @font-face {
1808+ font-family: MyGentium;
1809+ src: local(Gentium), /* prefer locally available Gentium */
1810+ url(Gentium.woff); /* otherwise, download it */
1811+ }
1812+ </pre>
17941813
1795- For OpenType and TrueType fonts, this string is used to match only
1796- the Postscript name or the full font name in the name table of locally
1797- available fonts. Which type of name is used varies by platform and
1798- font, so authors should include both of these names to assure proper
1799- matching across platforms. Platform substitutions for a given font
1800- name must not be used.
1814+ For OpenType and TrueType fonts,
1815+ this string is used to match only the Postscript name
1816+ or the full font name
1817+ in the name table of locally available fonts.
1818+ Which type of name is used varies by platform
1819+ and font,
1820+ so authors should include both of these names
1821+ to assure proper matching across platforms.
1822+ Platform substitutions for a given font name must not be used.
18011823
1802- <pre>
1803- /* bold face of Gentium */
1804- @font-face {
1805- font-family: MyGentium;
1806- src: local(Gentium Bold), /* full font name */
1807- local(Gentium-Bold), /* Postscript name */
1808- url(GentiumBold.woff); /* otherwise, download it */
1809- font-weight: bold;
1810- }
1811- </pre>
1824+ <pre>
1825+ /* bold face of Gentium */
1826+ @font-face {
1827+ font-family: MyGentium;
1828+ src: local(Gentium Bold), /* full font name */
1829+ local(Gentium-Bold), /* Postscript name */
1830+ url(GentiumBold.woff); /* otherwise, download it */
1831+ font-weight: bold;
1832+ }
1833+ </pre>
18121834
1813- Just as a ''@font-face'' rule specifies the characteristics of a single font
1814- within a family, the unique name used with <code> local()</code> specifies a single
1815- font, not an entire font family. Defined in terms of
1816- OpenType font data, the Postscript name is found in the font's
1817- <a href="https://www.microsoft.com/typography/otspec/name.htm">name table</a> ,
1818- in the name record with nameID = 6 (see
1819- [[!OPENTYPE]] for more details). The Postscript name is the commonly
1820- used key for all fonts on OSX and for Postscript CFF fonts under
1821- Windows. The full font name (nameID = 4) is used as a unique key for
1822- fonts with TrueType glyphs on Windows.
1823-
1824- For OpenType fonts with multiple localizations of the full font name, the US
1825- English version is used (language ID = 0x409 for Windows and language ID = 0 for Macintosh)
1826- or the first localization
1827- when a US English full font name is not available (the OpenType
1828- specification recommends that <a
1829- href="https://www.microsoft.com/typography/otspec/recom.htm"> all fonts
1830- minimally include US English names</a> ). User agents that also match
1831- other full font names, e.g. matching the Dutch name when the current
1832- system locale is set to Dutch, are considered non-conformant. This is
1833- done not to prefer English but to avoid matching inconsistencies across
1834- font versions and OS localizations, since font style names (e.g. "Bold")
1835- are frequently localized into many languages and the set of
1836- localizations available varies widely across platform and font version.
1837- User agents that match a concatenation of family name (nameID = 1) with
1838- style name (nameID = 2) are considered non-conformant.
1839-
1840- This also allows for referencing faces that belong to larger
1841- families that cannot otherwise be referenced.
1835+ Just as an ''@font-face'' rule specifies
1836+ the characteristics of a single font
1837+ within a family,
1838+ the unique name used with <code> local()</code>
1839+ specifies a single font,
1840+ not an entire font family.
1841+ Defined in terms of OpenType font data,
1842+ the Postscript name is found in
1843+ the font's
1844+ <a href="https://www.microsoft.com/typography/otspec/name.htm">name table</a> ,
1845+ in the name record with nameID = 6
1846+ (see [[!OPENTYPE]] for more details).
1847+ The Postscript name is the commonly used key for all fonts on OSX
1848+ and for Postscript CFF fonts under Windows.
1849+ The full font name (nameID = 4) is used as a unique key
1850+ for fonts with TrueType glyphs on Windows.
1851+
1852+ For OpenType fonts with multiple localizations of the full font name,
1853+ the US English version must be used
1854+ (language ID = 0x409 for Windows and language ID = 0 for Macintosh)
1855+ or the first localization
1856+ when a US English full font name is not available
1857+ (the OpenType specification recommends that
1858+ <a
1859+ href="https://www.microsoft.com/typography/otspec/recom.htm"> all fonts
1860+ minimally include US English names</a> ).
1861+ User agents that also match other full font names,
1862+ e.g. matching the Dutch name when the current system locale is set to Dutch,
1863+ are considered non-conformant.
1864+ This is done
1865+ not to prefer English
1866+ but to avoid matching inconsistencies
1867+ across font versions and OS localizations,
1868+ since font style names (e.g. "Bold")
1869+ are frequently localized into many languages
1870+ and the set of localizations available
1871+ varies widely across platform and font version.
1872+ User agents that match a concatenation of
1873+ family name (nameID = 1) with
1874+ style name (nameID = 2)
1875+ are considered non-conformant.
1876+
1877+ This also allows for referencing faces
1878+ that belong to larger families
1879+ that cannot otherwise be referenced.
18421880
1843- <div class="example">
1844- Use a local font or reference images/ an SVG font in another document:
1881+ <div class="example">
1882+ Use a local font or reference an SVG font in another document:
18451883
1846- <pre>
1847- @font-face {
1848- font-family: Headline;
1849- src: local(Futura-Medium),
1850- url(images/fonts.svg#MyGeometricModern) format("svg");
1851- }
1852- </pre>
1884+ <pre>
1885+ @font-face {
1886+ font-family: Headline;
1887+ src: local(Futura-Medium),
1888+ url(images/fonts.svg#MyGeometricModern) format("svg");
1889+ }
1890+ </pre>
18531891
1854- Create an alias for local Japanese fonts on different platforms:
1892+ Create an alias for local Japanese fonts on different platforms:
18551893
1856- <pre>
1857- @font-face {
1858- font-family: jpgothic;
1859- src: local(HiraKakuPro-W3), local(Meiryo), local(IPAPGothic);
1860- }
1861- </pre>
1894+ <pre>
1895+ @font-face {
1896+ font-family: jpgothic;
1897+ src: local(HiraKakuPro-W3), local(Meiryo), local(IPAPGothic);
1898+ }
1899+ </pre>
18621900
1863- Reference a font face that cannot be matched within a larger family:
1901+ Reference a font face that cannot be matched within a larger family:
18641902
1865- <pre>
1866- @font-face {
1867- font-family: Hoefler Text Ornaments;
1868- /* has the same font properties as Hoefler Text Regular */
1869- src: local(HoeflerText-Ornaments);
1870- }
1871- </pre>
1903+ <pre>
1904+ @font-face {
1905+ font-family: Hoefler Text Ornaments;
1906+ /* has the same font properties as Hoefler Text Regular */
1907+ src: local(HoeflerText-Ornaments);
1908+ }
1909+ </pre>
18721910
1873- Since localized fullnames never match, a document with the header
1874- style rules below would always render using the default serif font, regardless
1875- whether a particular system locale parameter is set to Finnish or not:
1911+ Since localized fullnames never match,
1912+ a document with the header style rules below
1913+ would always render using the default serif font,
1914+ regardless whether a particular system locale parameter is set to Finnish or not:
18761915
1877- <pre>
1878- @font-face {
1879- font-family: SectionHeader;
1880- src: local("Arial Lihavoitu"); /* Finnish fullname for Arial Bold, should fail */
1881- font-weight: bold;
1882- }
1916+ <pre>
1917+ @font-face {
1918+ font-family: SectionHeader;
1919+ src: local("Arial Lihavoitu"); /* Finnish fullname for Arial Bold, should fail */
1920+ font-weight: bold;
1921+ }
18831922
1884- h2 { font-family: SectionHeader, serif; }
1885- </pre>
1923+ h2 { font-family: SectionHeader, serif; }
1924+ </pre>
18861925
1887- A conformant user agent would never load the font 'gentium.eot' in the
1888- example below, since it is included in the first definition of the 'src' descriptor
1889- which is overridden by the second definition in the same ''@font-face'' rule:
1926+ A conformant user agent would never load the font 'gentium.eot'
1927+ in the example below,
1928+ since it is included in the first definition of the 'src' descriptor
1929+ which is overridden by the second definition in the same ''@font-face'' rule:
18901930
1891- <pre>
1892- @font-face {
1893- font-family: MainText;
1894- src: url(gentium.eot); /* for use with older user agents */
1895- src: local("Gentium"), url(gentium.woff); /* Overrides src definition */
1896- }
1897- </pre>
1898- </div>
1931+ <pre>
1932+ @font-face {
1933+ font-family: MainText;
1934+ src: url(gentium.eot); /* for use with older user agents */
1935+ src: local("Gentium"), url(gentium.woff); /* Overrides src definition */
1936+ }
1937+ </pre>
1938+ </div>
18991939
19001940<h3 id="font-prop-desc">
19011941Font property descriptors: the 'font-style!!descriptor', 'font-weight!!descriptor', and
0 commit comments