dev-master
9999999-dev
SIL Open Font License 1.1
The Requires
Wallogit.com
2017 © Pedro Peláez
The EncodeSansBundle loads the EncodeSans font families into your symfony project., (*1)
If your project uses the AsseticBundle, the fonts are made available as assetic named assets., (*2)
Update the project's composer.json file as follows:, (*3)
{
"repositories": [
{
"type": "composer",
"url": "http://satis.united-asian.com/fonts"
}
],
require: {
"fonts/encode-sans": "dev-master"
}
}
Define the bundle's mode via its configuration. The default value is individual., (*4)
encode_sans:
mode: families|individual
families modeIn families mode, 5 Encode Sans font families are defined, each available in 9 different weights., (*5)
Each font family is defined in a separate stylesheet and is represented by a different assetic named asset:, (*6)
@encode-sans)@encode_sans_condensed)@encode_sans_compressed)@encode_sans_narrow)@encode_sans_wide)Include the relevant stylesheet(s) in your page template using one of the 3 methods below. In this example we load the Encode Sans, Encode Sans Narrow and Encode Sans Wide font families:, (*7)
<link href="bundles/encodesans/css/encode-sans-all.css" rel="stylesheet" type="text/css"> <link href="bundles/encodesans/css/narrow/encode-sans-narrow-all.css" rel="stylesheet" type="text/css"> <link href="bundles/encodesans/css/wide/encode-sans-wide-all.css" rel="stylesheet" type="text/css">
javascripts twig tag{% stylesheets filter="cssrewrite"
"bundles/encodesans/css/encode-sans.css"
"bundles/encodesans/css/encode-sans-narrow.css"
"bundles/encodesans/css/encode-sans-wide.css"
%}
{% endstylesheets %}
javascripts twig tag with the bundle's formula{% stylesheets filter="cssrewrite"
"@encode_sans"
"@encode_sans_narrow"
"@encode_sans_wide"
%}
{% endstylesheets %}
In your stylesheet, apply the font to the elements of you choice via the font-* CSS rules, as per the example below:, (*8)
body {
font-family: "Encode Sans", sans-serif;
}
h1 {
font-family: "Encode Sans Wide", sans-serif;
font-weight: 600;
}
h3 {
font-family: "Encode Sans Narrow", sans-serif;
}
individual modeIn individual mode, seperate fonts are loaded for each combination of widget and weight. In most cases, your app will only use a subset of all the available font's weights. Rather than load them all, this mode allows you to load only what you require. This is the bundle's default mode., (*9)
Each combination of font width and font weight represents a different font and is defined in a separate stylesheet; each is represented by a different assetic named asset., (*10)
@encode_sans)@encode_sans_medium)@encode_sans_semibold)@encode_sans_bold)@encode_sans_extrabold)@encode_sans_black)@encode_sans_light)@encode_sans_extralight)@encode_sans_thin)@encode_sans_condensed)@encode_sans_condensed_medium)@encode_sans_condensed_semibold)@encode_sans_condensed_bold)@encode_sans_condensed_extrabold)@encode_sans_condensed_black)@encode_sans_condensed_light)@encode_sans_condensed-extralight)@encode_sans_condensed_thin)@encode_sans_compresssed)@encode_sans_compresssed_medium)@encode_sans_compresssed_semibold)@encode_sans_compresssed_bold)@encode_sans_compresssed_extrabold)@encode_sans_compresssed_black)@encode_sans_compresssed_light)@encode_sans_compresssed_extralight)@encode_sans_compresssed_thin)@encode_sans_narrow)@encode_sans_narrow_medium)@encode_sans_narrow_semibold)@encode_sans_narrow_bold)@encode_sans_narrow_extrabold)@encode_sans_narrow_black)@encode_sans_narrow_light)@encode_sans_narrow_extralight)@encode_sans_narrow_thin)@encode_sans_wide)@encode_sans_wide_medium)@encode_sans_wide_semibold)@encode_sans_wide_bold)@encode_sans_wide_extrabold)@encode_sans_wide_black)@encode_sans_wide_light)@encode_sans_wide_extralight)@encode_sans_wide_thin)Include the relevant stylesheets into your template as per the example below. In this case we are loading the Encode Sans, Encode Sans Bold and Encode Sans Wide Black fonts., (*11)
<link href="bundles/encodesans/css/encode-sans.css" rel="stylesheet" type="text/css"> <link href="bundles/encodesans/css/encode-sans-bold.css" rel="stylesheet" type="text/css"> <link href="bundles/encodesans/css/wide/encode-sans-wide-black.css" rel="stylesheet" type="text/css">
javascripts twig tag{% stylesheets filter="cssrewrite"
"bundles/encodesans/css/encode-sans.css"
"bundles/encodesans/css/encode-sans-bold.css"
"bundles/encodesans/css/wide/encode-sans-wide-black.css"
%}
{% endstylesheets %}
javascripts twig tag with the bundle's formula{% stylesheets filter="cssrewrite"
"@encode_sans"
"@encode_sans_bold"
"@encode_sans_wide_black"
%}
{% endstylesheets %}
In your stylesheet, apply the font to the elements of you choice via the font-* CSS rules, as per the example below. Make sure to use the appropriate font name for each weight. There is no need to specify the font-weight, since it is already part of the font definition., (*12)
body {
font-family: "Encode Sans", sans-serif;
}
.jumbotron h1 {
font-family: "Encode Sans Wide Black", sans-serif;
}
strong {
font-family: "Encode Sans Bold", sans-serif;
}
SIL Open Font License 1.1