Design and CSS styles
Version 5.x > Design and CSS styles > Custom fonts View modes: 
User avatar
Member
Member
Nico - 6/21/2011 3:35:40 AM
   
Custom fonts
Hi,

I'm trying to convert a design into a Kentico website but I'm having problems integrating custom fonts through @font-face. My idea was to create a folder "fonts" and add the different font files to link to them from my CSS. However, the system does not allow me to upload these file types (.eot, .svg, .ttf, .woff).

Is there any way I can achieve this? I'm not interested in using/being dependent on other solutions like Typekit, Cufon, etc.

Thanks!

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 6/21/2011 4:04:47 AM
   
RE:Custom fonts
Hi,

you could allow listed extensions in the Site Manager - Settings - Files - Upload extensions. Then the system should allow you to upload font files.

But if you need to link file in the css definition, you could upload it directly (using ftp for example) to the App_Themes directory for example:
@font-face {
font-family: Delicious;
font-weight: bold;
src: url('../App_Themes/Delicious-Bold.otf');
}

Best regards,
Ivana Tomanickova

User avatar
Member
Member
Nico - 6/21/2011 4:25:18 AM
   
RE:Custom fonts
Sweet! That did the trick!

I chose the FTP-upload way not to clutter the "front-end" file structure. The content admin does not need to care about the fonts.

How did you know I wanted to embed 'Delicious'? :) Love that font!

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 6/21/2011 5:48:17 AM
   
RE:Custom fonts
Hi,

I did not know, but google did:) It was the first example I found.

Have a nice day.

Ivana Tomanickova

User avatar
Member
Member
Orefus - 11/25/2012 3:46:18 PM
   
RE:Custom fonts
Hi.

It's not possible to add extensions for upload ttf files to Theme into separeted folder !!!
In version CMS 7 ...

regards
Vasko

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 11/28/2012 3:31:54 AM
   
RE:Custom fonts
Hi Vasko,

could you please describe your scenario in more details? Maybe provide me with the example.
Thank you.

Best regards,
Martin Danko