Page 1 of 2

Report.JS custom font

Posted: Tue Jan 12, 2016 12:48 pm
by Ehsan
Hello,

How can I embed and use custom font in Report Js designer and viewer??
I did it by font name in mrt file, but it doesn't change fonts in print mode.
Please Help me how should I do it.

Thank you.

Re: Report.JS custom font

Posted: Wed Jan 13, 2016 5:55 am
by HighAley
Hello.

Yes, it's possible.

You could use next code to add custom font:

Code: Select all

Stimulsoft.Base.StiFontCollection.addOpentypeFontFile(filePath: string, fontName: string = null)
Also you could try to use CSS:

Code: Select all

@font-face {
    font-family: myFirstFont;
    src: url(sansation_light.woff);
}
Thank you.

Re: Report.JS custom font

Posted: Sat Jan 16, 2016 7:23 am
by Ehsan
Hello,

none of above code work,
first code require opentype library,
after adding that library to project,
it doesn't add any font file to Stimulsoft.Base.StiFontCollection ( Stimulsoft.Base.StiFontCollection.getFontFamilies() ).
and the font list in Report JS designer doesn't show any thing.

Thank you.

Re: Report.JS custom font

Posted: Mon Jan 18, 2016 9:18 am
by HighAley
Hello.

There was no opentype library in our trial build. We have added it.
Also we have found a bug. The bug is fixed.
Please, check our next prerelease build on Friday.

Thank you.

Re: Report.JS custom font

Posted: Sat Mar 05, 2016 7:30 am
by Ehsan
Hello,

So I cannot use this
Stimulsoft.Base.StiFontCollection.addOpentypeFontFile(filePath: string, fontName: string = null)
code in trial version?

or this issue already exist in project? Cause there is still Uncaught ReferenceError: opentype is not defined(…) error when I use above code.

Thank you!

Re: Report.JS custom font

Posted: Mon Mar 07, 2016 9:10 am
by HighAley
Hello.

Sorry, for the issue.
We have found a bug in our minified build.
We have made an improvement.
Please, check our next build on Friday.

Thank you.

Re: Report.JS custom font

Posted: Sat Mar 12, 2016 9:00 am
by Ehsan
Hello,

Thank you for your efforts,
Sorry, there wasn't any prerelease build in Friday,
so which Friday exactly your prerelease build will be prepare?
thank you

Re: Report.JS custom font

Posted: Mon Mar 14, 2016 6:02 am
by Andrew
Hello,

The pre-release build will be today on Monday.

Thank you.

Re: Report.JS custom font

Posted: Mon Mar 14, 2016 6:39 am
by HighAley
Hello.

Sorry, the prerelease build was postponed for today.
It will be available in a few hours.

Thank you.

Re: Report.JS custom font

Posted: Tue Mar 15, 2016 5:55 am
by Ehsan
Hello,

Thank you :_)
:(