dev-master
9999999-dev
Apache License 2.0
The Requires
The SinkinSansBundle loads the SinkinSans 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/sinkin-sans": "dev-master" } }
Define the bundle's mode
via its configuration. The default value is individual
., (*4)
sinkin_sans: mode: single|individual
single
modeIn single
mode, a single Sinkin Sans font is defined, available in 9 different weights., (*5)
Include the sinkin-sans.css
stylesheet in your page template using one of the 3 methods below:, (*6)
<link href="bundles/sinkinsans/css/sinkin-sans.css" rel="stylesheet" type="text/css">
javascripts
twig tag{% stylesheets filter="cssrewrite" "bundles/sinkinsans/css/sinkin-sans.css" %} {% endstylesheets %}
javascripts
twig tag with the bundle's formula{% stylesheets filter="cssrewrite" "@sinkin_sans" %} {% endstylesheets %}
In your stylesheet, apply the font to the elements of you choice via the font-*
CSS rules, as per the example below:, (*7)
body { font-family: "Sinkin Sans", sans-serif; } h1 { font-weight: 600; } .italic { font-style: italic; }
individual
modeIn individual
mode, seperate fonts are loaded for each 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., (*8)
Each font weight is define in a separate stylesheet and is represented by a different assetic named asset:, (*9)
@sinkin_sans_100
)@sinkin_sans_200
)@sinkin_sans_300
)@sinkin_sans_400
)@sinkin_sans_500
)@sinkin_san_6100
)@sinkin_sans_700
)@sinkin_sans_800
)@sinkin_sans_900
)Note that in this mode each weight is a separate font with a different name., (*10)
Each font weight includes both normal and italic styles., (*11)
Include the relevant stylesheets into your template as per the example below. In this case we are loading the Sinkin Sans
, Sinkin Sans ExtraLight
and Sinkin Sans Bold
fonts (of respective weights 400, 200 and 700)., (*12)
<link href="bundles/sinkinsans/css/sinkin-sans-400.css" rel="stylesheet" type="text/css"> <link href="bundles/sinkinsans/css/sinkin-sans-200.css" rel="stylesheet" type="text/css"> <link href="bundles/sinkinsans/css/sinkin-sans-700.css" rel="stylesheet" type="text/css">
javascripts
twig tag{% stylesheets filter="cssrewrite" "bundles/sinkinsans/css/sinkin-sans-400.css" "bundles/sinkinsans/css/sinkin-sans-200.css" "bundles/sinkinsans/css/sinkin-sans-700.css" %} {% endstylesheets %}
javascripts
twig tag with the bundle's formula{% stylesheets filter="cssrewrite" "@sinkin_sans_400" "@sinkin_sans_200" "@sinkin_sans_700" %} {% 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., (*13)
body { font-family: "Sinkin Sans", sans-serif; } h1 { font-family: "Sinkin Sans Bold", sans-serif; } .italic { font-family: "Sinkin Sans ExtraLight", sans-serif; font-style: italic; }
Apache License 2.0