Page 1 of 2

Add New Font

PostPosted: 09 Dec 2015 17:45
by ariopax
Hi

How to add new font to font family property?
I want add Persian font to font family property.




Best Regards.

Re: Add New Font

PostPosted: 09 Dec 2015 17:49
by Alexander Bulei
Hi ariopax,

How to add new font to font family property?


By using the Intraweb Font property or by our Style property.

Best Regards.

Re: Add New Font

PostPosted: 12 Jan 2016 21:56
by aftabgardan2006
Hi
Please explain more ,how to use you'r Style property.
Best Regards

Re: Add New Font

PostPosted: 13 Jan 2016 10:24
by Alexander Bulei
Hi aftabgardan2006,

Please explain more ,how to use you'r Style property.


If you want custom font-family, you need load the font by using ContentFiles, and then add the style via Style.

e.g:

css code
font-famaly: "Roboto"


Best Regards.

Re: Add New Font

PostPosted: 18 Jan 2016 06:47
by ariopax
Hi

Where need load ContentFiles? by what command?
Where need copy font files,in any arbitrary folder in wwwroot?
Where need use css code?

Have you any example for it?


Best Regards.

Re: Add New Font

PostPosted: 18 Jan 2016 16:21
by Alexander Bulei
Hi ariopax,

Where need load ContentFiles? by what command?


About the new fonts: http://www.w3schools.com/css/css3_fonts.asp

Where need copy font files,in any arbitrary folder in wwwroot?


Yes, the font files should be in wwwroot folder.

Where need use css code?


Where you want..in certain component or whole region.

Best Regards.

Re: Add New Font

PostPosted: 19 Jan 2016 14:23
by ariopax
Hi

I create a testcase,create a Setfont folder in wwwroot folder,and then create a fonts folder in Setfont folder and a css file that its name is css1.
Image

Now in ServerController use below code:
Code: Select all
procedure TIWServerController.IWServerControllerBaseCreate(Sender: TObject);
begin
  ContentFiles.Add('Setfont/css1');
end;

and then put a IWCGJQLabelEx in iwform1,then in style property i write

Image

but dont apply my font!

What is my erroe?

Best Regards.

Re: Add New Font

PostPosted: 19 Jan 2016 15:17
by Jorge Sousa
Hi

then create a fonts folder in Setfont folder and a css file that its name is css1.


ok, but you're link should be like

src: url(SetFont/fonts/BBadr.woff)
src: url(SetFont/fonts/BBadr.eot)

Re: Add New Font

PostPosted: 19 Jan 2016 15:38
by assapan
is this property name really font-famaly ? not font-family ?

Re: Add New Font

PostPosted: 19 Jan 2016 15:44
by ariopax
HI


Tankssssssssssssssssssss!


Best Regards.